- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have business and personal account set up, subscriptions, plans... all setup for simple paypal button POC in sandbox.
This is my code:
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width" /> <title></title> </head> <body> <script src="https://www.paypal.com/sdk/js?client-id=xxxx&vault=true&intent=subscription"></script> <div id="paypal-button-container"></div> <script> paypal.Buttons({ createSubscription: function(data, actions) { return actions.subscription.create({ 'plan_id': 'P-66899082RN487441DMXZKF7I' }); }, onApprove: function(data, actions) { console.log(data, '\n', actions); alert('You have successfully subscribed to ' + data.subscriptionID); } }).render('#paypal-button-container'); </script> </body> </html>
(I've replaced the client id with xxxx, but in reality I've put valid client id instead. This is definately the right client ID, we use only one client ID!)
However, I got 404 in the first place, when paypal plugin starts pinging its own endpoint: https://www.sandbox.paypal.com/v1/billing/subscriptions 404 error
following the bunch of errors in the console:
rest_api_v1_billing_subscriptions_create_error , create_order_error , Uncaught Error: Create Subscription Api response error ...etc.
I used the exact form form the official integration manual: https://developer.paypal.com/docs/subscriptions/integrate/
Here is the plan in the dashboard:
The colleagues have created it by following steps 1 and 2: https://developer.paypal.com/docs/subscriptions/integrate/#link-createproduct
They created several plans. I tried 3 of those plans, same result. (You can see only one plan in the capture because I deleted it from the capture)
Here are the errors I got in the console:
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I apologize to all who spent time analyzing this question.
Colleague gave me the wrong client ID / client secret in the first place 😞
Once I applied the right client ID, it went well
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I apologize to all who spent time analyzing this question.
Colleague gave me the wrong client ID / client secret in the first place 😞
Once I applied the right client ID, it went well

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- How to enable on-demand / recurring payments to existing PayPal checkout? in SDKs
- Disable shipping address in Pay with Credit or Debit card button integration in SDKs
- Integrating PayPal's smart button into Shopify without specifying the price or shipping rates. in PayPal Payments Standard
- PayPal Redirection Issue After Successful Payment in Photobooth Integration in Sandbox Environment
- Playwright test failing in headless mode due to Paypal button in SDKs