Subscriptions integration - creating a plan ID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm implementing an on-page payment solution using the Smart Payment Buttons, as described here:
https://developer.paypal.com/docs/subscriptions/integrate/
The process described requires to generate a plan ID and pass it to the Buttons createSubscription method.
It is suggested to use curl calls to generate said plan ID, but this may not cut it for us.
Our payment amounts will likely vary; it's a plugin meant for recurring donations, with user-selected amounts, so it would be important to be able to generate a plan on the fly.
This on-page solution is meant to replace an older SDK that we were using,
https://github.com/paypal/PayPal-PHP-SDK
which handled the creation of the plan and activation of the agreement on the server:
I tried reusing the existing server code to generate a plan on the back-end and pass its ID to the Buttons, but it's not working and I'm getting a 404 response when the button POSTs the plan ID to https://www.sandbox.paypal.com/v1/billing/subscriptions:
{issue: "INVALID_RESOURCE_ID", description: "Requested resource ID was not found."}
My question:
- Does the PayPal-PHP-SDK play well with the Buttons? Are these two solutions compatible?
- If it does not, is there a compatible/updated SDK to generate the plan ID, or am I expected to implement the code on my own, using the API curl calls as reference?
Thanks!

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- How do you create subscriptions with PayPal Advanced Checkout? in SDKs
- subscription_id has disappeared in REST APIs
- Recurring Payment issue in Braintree Client-side Integration (JS, iOS, Android SDKs)
- A gateway error log add to get detailed information response from paypal. in PayPal Payments Standard
- Created subscription failed to activate after few hours in Sandbox Environment