Help Article

Before June 30th, 2018 PayPal is requiring all account users to update their browsers to remain compliant with new security standards. You won't be able to access your PayPal account after June 30th if your browser isn’t updated. Learn how to upgrade your browser.

How do I integrate the PayPal REST API for Recurring Payments?

Here's how:
  1. Create a billing plan.
  2. Activate the billing plan.
  3. Create a billing agreement.
  4. Execute the billing agreement.
Use cURL to set up these plans. Before you begin, check your REST API apps settings to make sure your REST API apps subscriptions are turned on.

Create a billing plan

The following example shows how to define parameters for your billing plan:
curl -k -v -H 
-H “Authorization: Bearer ACCESS_TOKEN” 
-d '{“name”:”Test REST Club Plan”,
“description”:”Template creation.”,
“payment_definitions”:[{“name”:”Regular Payments”,

PayPal returns a Billing Plan ID starting with “P-”.

Activate the billing plan

Next, use these commands to activate the billing plan:
curl -k -v -H 
-H “Authorization: Bearer ACCESS_TOKEN” 
-d '[{“path”:”/”,

Create a billing agreement

Now, define parameters for your billing agreement, as shown here:
curl -k -v -H 
-H “Authorization: Bearer ACCESS_TOKEN” 
-d '{“name”:”Test REST Club Plan”,
“description”:”Template creation.”,
“shipping_address”:{“line1”:”111 First Street”,
PayPal returns an Express Checkout redirect URL with an EC token, similar to this one:

You’ll need to redirect your customer to PayPal via the returned URL. Once the billing agreement is authorized, the customer is redirected to your site, which is the return_url you set under Create billing plan.

Execute the billing agreement

The following commands activate the billing agreement:
curl -k -v -H 
-H “Authorization: Bearer ACCESS_TOKEN” 
-d '{}'
We’re sorry. The page you’re looking for is no longer available. To search again or contact us, please visit our Help Centre.