4

Some fairly basic questions as I don't seem to be able to find simple answers in API documentation.

I have a shop selling magazines + other items. Currently selling individual items or in groups and charging using PayPal REST API.

We want to add subscriptions - which I gather means using their Billing Plan + Billing Agreement. Have some Questions:

  1. Does every sale need it's own Plan + Agreement ? (Or can I just pre set-up 4 plans (different postage options), and add all the agreements to one of those 4 plans)

  2. I can't see a list of acceptable Frequency values- Is "Yearly" an option?

  3. Do I specifically need to call "Bill outstanding agreement amounts" i.e. "POST /v1/payments/billing-agreements//bill-balance" to charge it in a years time - or should it in theory be charged automatically?

  4. To check it's been paid - I need to search for transactions - right ? ("GET /v1/payments/billing-agreements//transactions? start_date=yyyy-mm-dd&end_date=yyyy-mm-dd")

Thanks.

Daf
  • 61
  • 7

1 Answers1

6

Let me answer one by one:

  1. A Billing Plan (or a Billing Agreement) is an agreement made between the seller and a specific buyer. The answer at this question is yes: every sale needs its plan.
  2. Yes, yearly is a valid option. The variable “frequency” accepts the following value: WEEK, DAY, YEAR, MONTH. Please, find here our REST API Reference: https://developer.paypal.com/docs/api/#billing-plans-and-agreements.
  3. Buyer will be charged yearly (for example) automatically. You need to call “Bill outstanding agreement amounts” only if there is an outstanding amount to resolve. For example, if a payment failed.
  4. Yes, you are right. Please note, dates should be in this: yyyy-MM-ddTHH:mm:ssZ. Here our documentation: https://developer.paypal.com/docs/rest/api/payments.billing-agreements/

If you need more information, please let me know.

  • 3
    I'd love to understand the reason behind splitting creating + activating of Billing Plans. – wasabigeek Aug 04 '16 at 15:51
  • @paypal could you clarify for 1), can a Plan be reusable on different Agreements ? – user7180 Oct 18 '16 at 14:07
  • 1
    Why do you say "Billing Plan (or Billing Agreement)"? You use the 2 terms as they refer to the same thing, but on PayPal Docs they are very different. – JustTrying Oct 21 '16 at 09:04
  • yes, if the plan attributes are same, save the plan-id and reuse. @LawrenceMok your question is answered here: https://github.com/paypal/PayPal-PHP-SDK/issues/506 – ankitjaininfo Dec 25 '18 at 18:04