Sandbox works but live => INVALID_RESOURCE_ID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings!
I have been using Sandbox successfully for a couple weeks via https://www.npmjs.com/package/@paypal/paypal-js
Sandbox => Click buttons => Create Order
Sandbox => Post Create Order => Update Client Config
I just switched to live using these instructions https://developer.paypal.com/reference/production/#link-obtainyourlivecredentials
On the live site when I click buttons this is the request sent @ /create-order
URL: https://api-m.paypal.com/v2/checkout/orders
Params:
{
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: 'Bearer removed'
},
body: `{"intent":"CAPTURE","purchase_units":[{"reference_id":"d00cb4bf-84f8-4544-86b1-dfc87cc5770e","description":"Feeling Lovely Now Online Store Purchase","amount":{"currency_code":"USD","value":"94.83","breakdown":{"item_total":{"value":"81.00","currency_code":"USD"},"shipping":{"value":"6.00","currency_code":"USD"},"tax_total":{"value":"7.83","currency_code":"USD"}}},"items":[{"sku":"0xfffd8d6ad3a1ea04","quantity":3,"name":"Size: L 100% Organic Cotton Gold Metatron's Cube + Fruit of Life Embroidery Men's T-Shirt Black","unit_amount":{"currency_code":"USD","value":"27.00"}}]}],"payment_source":{"paypal":{"experience_context":{"locale":"en-US","landing_page":"LOGIN","user_action":"PAY_NOW","brand_name":"Feeling Lovely Now","payment_method_selected":"PAYPAL","shipping_preference":"GET_FROM_FILE","payment_method_preference":"IMMEDIATE_PAYMENT_REQUIRED"}}}}
@ Live => Click buttons => Create Order
@ Live => Post Create Order => Update Client Config
Here is the full error
{
"errors":[
{
"data":{
"message":"The specified resource does not exist."
},
"message":"RESOURCE_NOT_FOUND",
"path":[
"updateClientConfig"
],
"extensions":{
"class":"ERROR"
},
"_name":"RESOURCE_NOT_FOUND",
"checkpoints":[
"patchClientConfig"
],
"meta":{
},
"contingency":true,
"statusCode":200
}
],
"data":{
"updateClientConfig":null
},
"extensions":{
"tracing":{
"version":1,
"startTime":"2023-11-14T16:11:16.830Z",
"endTime":"2023-11-14T16:11:16.928Z",
"duration":97534213,
"execution":{
"resolvers":[
{
"path":[
"updateClientConfig"
],
"parentType":"Mutation",
"fieldName":"updateClientConfig",
"returnType":"Boolean",
"startOffset":1225364,
"duration":95683296
}
]
}
},
"correlationId":"f4397533eb9ab"
}
}
In the live version the request sent @ /create-order to https://api-m.paypal.com/v2/checkout/orders is not the sandbox url but for some reason all the requests made by paypal in the network tab after /create-order are to the sandbox url, failing with the error above and I don't know why yet
/create-order => https://github.com/feelinglovelynow/feelinglovelynow/blob/main/src/routes/paypal/create-order/%2Bser...
apiPayl => https://github.com/feelinglovelynow/feelinglovelynow/blob/main/src/lib/store/apiPaypal.ts
frontend load script => https://github.com/feelinglovelynow/feelinglovelynow/blob/main/src/lib/store/PaypalCheckout.ts
![Moderator Moderator](https://www.paypalobjects.com/webstatic/icon/pp32.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good day @feelinlovelynow
Thank you for posting to the PayPal community.
This looks like an issue with your internal website code, which is triggering API calls to "Sandbox Endpoint" environment.
https://developer.paypal.com/api/rest/requests/
The URL to the API service is either:
- Sandbox. https://api-m.sandbox.paypal.com
- Live. https://api-m.paypal.com
PayPal system is a payment gateway, which will receive the payment request payload (i.e Payment and Item details, Shipping details, Invoice number, Amount details etc.) from merchant websites(built via third party platforms eCommerce ) and process the payments accordingly.
Merchants should handle their internal website code and pass the appropriate payment API calls to PayPal system.
I would suggest to please contact your website developer or the third party eCommerce support. Please ensure that when making API calls in a LIVE environment, you are using the correct LIVE REST API Credentials(Client ID & Secret) .
https://developer.paypal.com/api/rest/authentication/
https://developer.paypal.com/api/rest/postman/
https://developer.paypal.com/api/rest/
If your still facing issues, please create an MTS ticket via - https://www.paypal-support.com/s/?language=en_US with the detailed information and error details.
Sincerely,
Kavya
PayPal MTS
If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.
![](/skins/images/0FF1A2F377A75DEEE7D9B96ED67745BD/responsive_peak/images/icon_anonymous_message.png)
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Sandbox business account - Webhook not working in Sandbox Environment
- OXXO payment source error PAYEE_COUNTRY_NOT_SUPPORTED_FOR_PAYMENT_SOURCE error in production in REST APIs
- Using Sandbox credentials at checkout loops PayPal to sign up page in Sandbox Environment
- PERMISSION_DENIED | Billing Subscriptions | LIVE API in REST APIs
- Redirecting from our site to PayPal URL to approve a setup token sometimes gives an error in REST APIs