greg
greg

Reputation: 1416

Some questions about billing plans & agreements REST API

I have some questions about subscription functionality using REST API. We have implemented recurring payments using "Express Checkout NVP/SOAP Integration" but for us it isn't optimal, because:

That's why I want to rewrite it with REST API. I think the flow will be like:

My questions are:

  1. Is this flow correct?
  2. To redirect customer for approving payment we need to make four requests to PayPal API servers, is it normal?
  3. Should I create and activate a billing plan for every customer or I can use one plan for all customers?
  4. If so can I create the plan in the merchant's profile page or I can do it only programmatically?

Upvotes: 4

Views: 1341

Answers (1)

Jonathan LeBlanc
Jonathan LeBlanc

Reputation: 788

Let me see if I can answer your questions and provide some samples.

  1. Yes, that flow is correct for the first request. If you already have a plan that you'd like to subscribe people to created, you can skip those billing plan steps. More on that below.
  2. For the REST APIs, yes that's the normal flow for PayPal. Think of the plan as setting up the architecture of the payment that you'd like to offer (such as a subscription plan for a service). You set this up once and then can subscribe many people to that same subscription plan using a billing agreement.
  3. If the details of the plan are the same for each person, then create one plan and then use a billing agreement for each person to subscribe them all to that same plan.
  4. I haven't seen an integration of this with the profile system, but it's an interesting idea. For the time being, as far as I know you'll need to do this programmatically.

I've also created some new quickstart guides on the site that should help through creating the billing plan and agreements:

I have a more practical example of this billing plan / agreement integration in a Slack bot payment sample, if that helps: https://developer.paypal.com/docs/api/service-integrations/slack-bot/subscribe/

Upvotes: 11

Related Questions