I am getting an "Uncaught Error: Expected an order id to be passed"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am getting an "Uncaught Error: Expected an order id to be passed" back even though I see an id being returned, and there are no errors in the event log for the Paypal sandbox request that was made.
JS return from createOrder:
ack | true | ||||
data | Object { id: "4R111128JP953492S" } | ||||
id | "4R111128JP953492S"
Corresponding event log entry:
|
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @C_Cataldo,
Thank you for posting to the PayPal Merchant Community.
Here are a few things to remember when creating and capturing orders:
- You must create an access token and pass an access token with every request
- Orders must be authorized
- Orders expire within 3 hours if not authorized
If you create an order, and attempt to capture the order without an access token (authorization header), you will receive an AUTHENTICATION_FAILURE error message.
If you capture an order without it being authorized, you will receive an error message ORDER_NOT_APPROVED.
If you attempt to capture an order that is over 3 hours old you will receive an error of RESOURCE_NOT_FOUND.
Make certain that when you create your order, you go through the sandbox buyer checkout process (you may need to paste the url into a browser).
After approving the order, capture the order, ensuring that you have an access token in the authorization header (to avoid order id errors).
Thank you,
Jennifer
MTS
PayPal
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Paypal 4X credit : translated message & currency error in PayPal Payments Standard
- what permissions to expect in oauth_third_party when tracking seller status in REST APIs
- JS SDK error with Safari 17.2 in SDKs
- Activating a subscription after capturing outstanding_balance will charge the customer again in REST APIs
- Issue with 403 Forbidden Error when Accessing PayPal Sandbox API. in Sandbox Environment