Roman Shevchenko
Roman Shevchenko

Reputation: 133

How can i change plan for subscription in paypal api

I want integrate paypal to my membership site. After i checked paypal documentation i realised that i cant find any information about how to change user subscription plan, for example some users become with "basic" plan but after asked to use "pro".

Can't find this function in api docs https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions

What is best practice to do it?

Upvotes: 3

Views: 3305

Answers (2)

Cavalier
Cavalier

Reputation: 91

I had the same problem getting the PAYMENT_IN_PROGRESS error, and finally I found the answer after speaking with a paypal rep.

If your subscription is within 24 hours of renewing, then you will receive the PAYMENT_IN_PROGRESS error.

If you are doing subscription testing and have a 1 day recurring subscription, then you will not be able to upgrade/downgrade the subscription. You need to use at least a 2 day subscription plan.

Upvotes: 0

slightlyoverwhelmed
slightlyoverwhelmed

Reputation: 125

Per https://developer.paypal.com/docs/subscriptions/customize/revise-subscriptions/

You can upgrade or downgrade a subscription by changing the plan and/or quantity of the subscription. Changing from one plan to another is allowed only across plans within the same product.

For example, you can revise a subscription from a $10 basic plan to a $14 premium plan, or revise a five software licenses monthly subscription to 10 licenses per month.

Subscription revisions require the buyer's consent. If the buyer doesn't consent, they continue to be billed according to their current subscription. All successful revisions are effective in the next billing cycle.

It's documented here, although sometimes the "Revise Subscription" section is not rendered correctly. https://developer.paypal.com/api/subscriptions/v1/#subscriptions_revise

Upvotes: 1

Related Questions