INVALID_RESOURCE_ID in the error logs
-
Hi
I’m using the WooCommerce PayPal Payments plugin on my ecommerce store. Some of the orders on our website fail regularly that are paid via PayPal or PayPal debit cards. So out of 100 orders around 5 – 6 would fail daily. Order begin at “Pending Payment” status and their status then changes to “Failed” even though the users checkout successfully on the checkout page.
Within the order notes I see “Payment provider declined the payment, please use a different payment method. OrderEndpoint.php:239 Order status changed from Pending payment to Failed.”
I enabled the logs for the plugin on the website and noticed a few log entries associated with the failed orders.
2025-07-11T10:29:25+00:00 DEBUG #4124
[New Request] POST /
URL: https://api-m.paypal.com/v2/checkout/orders/5HL95543AB864264R
Response Debug ID: I have removed this
Response:
code: 404
message: Not Found
Response Body:
{
"name": "RESOURCE_NOT_FOUND",
"details": [
{
"issue": "INVALID_RESOURCE_ID",
"description": "Specified resource ID does not exist. Please check the resource ID and try again."
}
],
"message": "The specified resource does not exist.",
"debug_id": "I have removed this",
"links": [
{
"href": "https://developer.paypal.com/api/rest/reference/orders/v2/errors/#INVALID_RESOURCE_ID",
"rel": "information_link",
"method": "GET"
}
]
}
2025-07-11T10:29:25+00:00 WARNING #4124
Failed to reload PayPal order in the session: Could not retrieve order.And then I also get a third entry (I have removed all the confidential information and replaced it with dummy information before posting here)
2025-07-11T10:29:26+00:00 DEBUG #4124
POST https://api-m.paypal.com/v2/checkout/orders/{{ORDER_ID}}
Request Body:
{
"intent": "CAPTURE",
"purchase_units": [
{
"reference_id": "default",
"amount": {
"currency_code": "USD",
"value": "123.45",
"breakdown": {
"item_total": { "currency_code": "USD", "value": "100.00" },
"shipping": { "currency_code": "USD", "value": "15.00" },
"tax_total": { "currency_code": "USD", "value": "8.45" }
}
},
"description": "Lorem ipsum dolor sit amet",
"items": [
{
"name": "Lorem Ipsum Product",
"unit_amount": { "currency_code": "USD", "value": "100.00" },
"quantity": 1,
"description": "Consectetur adipiscing elit",
"sku": "SKU-1234",
"category": "PHYSICAL_GOODS",
"url": "https://example.com/product/lorem-ipsum",
"image_url": "https://example.com/images/product.jpg",
"cart_item_key": "abcdef1234567890"
}
],
"shipping": {
"name": { "full_name": "Lorem Ipsum" },
"address": {
"country_code": "US",
"address_line_1": "1234 Lorem St.",
"address_line_2": "Apt. 567",
"admin_area_2": "Ipsumville",
"postal_code": "90210"
}
},
"custom_id": "custom_order_123456789"
}
],
"payer": {
"email_address": "[email protected]",
"name": {
"given_name": "John",
"surname": "Doe"
},
"address": {
"country_code": "US",
"address_line_1": "1234 Lorem St.",
"address_line_2": "Apt. 567",
"admin_area_2": "Ipsumville",
"postal_code": "90210"
}
},
"payment_source": {
"paypal": {
"experience_context": {
"return_url": "https://example.com/?wc-ajax=return-url",
"cancel_url": "https://example.com/checkout",
"brand_name": "Lorem Ipsum Store",
"locale": "en-US",
"landing_page": "LOGIN",
"shipping_preference": "SET_PROVIDED_ADDRESS",
"user_action": "PAY_NOW",
"payment_method_preference":"UNRESTRICTED",
"contact_preference": "NO_CONTACT_INFO"
}
}
}
}
Response Debug ID: {{DEBUG_ID}}
Response:
code: 200
message: OKCan you help me identify why this order failed?
The topic ‘INVALID_RESOURCE_ID in the error logs’ is closed to new replies.