Automation of setting up subscriptions and related content for local development (Sandbox)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to figure out how to automate setting up subscriptions (and related) for local development.
I'm able to create a subscription using the REST API, but because the buyer didn't go through the web flow, I can't activate it:
{"name":"UNPROCESSABLE_ENTITY","message":"The requested action could not be performed, semantically incorrect, or failed business validation.","debug_id":"1f3c69a6f7771","details":[{"issue":"SESSION_STATE_NOT_VALID","description":"Buyer has not agreed to subscription"}]
This makes sense, as there's no payment info that was captured, either.
Does anyone have some pseudocode or step-wise examples of a process to automate seeding a Sandbox with the right things to support local development?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Drivewitherik, no code for auto approve subscriptions on Sandbox (unless somebody created something that works and can help this scenario) but what you could do is a manual approval of few sandbox subscriptions using sandbox buyer accounts. Once the subscription is created just call the approve link returned in the API response:
"href": "https://www.paypal.com/webapps/billing/subscriptions?ba_token=BA-2M539689T3856352J", "rel": "approve",
Then you can activate it.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Need Help Upgrading to PayPal complete payments in PayPal Upgrade Community
- Payments Plan in REST APIs
- Automation of setting up subscriptions and related content for local development (Sandbox) in REST APIs
- Subscription integration in REST APIs
- Allowing users to receive payment from a paypal button clicked by their customers in PayPal Payments Standard