0
votes

I see paypal is upgrading their APIs. I want to collect recurring payments and provide a feature to upgrade / downgrade the plans.

In the samples, paypal is using billing agreements and when I see the docs, it says the API is deprecated please use subscriptions API. I am confused which one to use.

Please help me in this.

PS: Also my product includes one time payments

1

1 Answers

-1
votes

The PayPal Subscriptions API uses billing agreements and plans, and there are multiple versions. Everything linked from https://developer.paypal.com/docs/subscriptions/integrate/ will be the most recent version.


For one-time (non-subscription) payments, the most robust integration is to have two routes on your server that implement v2/checkout/orders API calls to "create order" and "capture order", combined with this front end: https://developer.paypal.com/demo/checkout/#/pattern/server

For a subscription integration to be similarly robust (in that your server gets an immediate API response of profile activation), you can have those buttons call your server as well: PayPal Smart Subscribe server side