Receiving APPROVED Webhooks for Order, but capture leads to 404 or ORDER_NOT_APPROVED
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue has only started to appear around 2 weeks ago and does not affect all orders. The much more common one seems to be 404s on capture.
Here is an (redacted) example (from production):
Problem 1:
Webhook received:
{ "create_time": "2024-09-05T06:07:30.629Z", "event_type": "CHECKOUT.ORDER.APPROVED", "event_version": "1.0", "id": "WH-<Webhook ID>", "links": [..], "resource": { "create_time": "2024-09-05T06:06:39Z", "id": "<Order ID>", "intent": "CAPTURE", "links": ... "payer": ... "payment_source": ... "purchase_units": ... "status": "APPROVED" }, "resource_type": "checkout-order", "resource_version": "2.0", "summary": "An order has been approved by buyer" }
After trying to capture the order, PayPal returns a 404.
When retrieving Details of the Order:
{'id': '<ID>', 'intent': 'CAPTURE', 'status': 'COMPLETED', ..., 'final_capture': true, ...}
This is without any trace of a succesful capture on our side. Are there cases where a capture is not possible and the Order is automatically completed once the seller approves?
Problem 2:
<Webhook as before>
Response when trying to capture the order:
{'name': 'UNPROCESSABLE_ENTITY', 'details': [{'issue': 'ORDER_NOT_APPROVED', 'description': "Payer has not yet approved the Order for payment. Please redirect the payer to the 'rel':'approve' url returned as part of the HATEOAS links within the Create Order call or provide a valid payment_source in the request."}], 'message': 'The requested action could not be performed, semantically incorrect, or failed business validation.', 'debug_id': '<Debug ID>', 'links': [{'href': 'https://developer.paypal.com/docs/api/orders/v2/#error-ORDER_NOT_APPROVED', 'rel': 'information_link', 'method': 'GET'}]}
GET details of order from Paypal API:
{'id': '<Order ID>', 'intent': 'CAPTURE', 'status': 'PAYER_ACTION_REQUIRED', ....}
Considering this has not happened until recently, and does not always happen, I don't see the issue on our part here. The Webhook is received but the Order has a different state than the webhook suggests. What could this be caused by?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.