PayPal

Subscriptions

You can use billing plans and subscriptions to create subscriptions that process recurring PayPal payments for physical or digital goods, or services. A plan…

Payments#openapi

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

You can use billing plans and subscriptions to create subscriptions that process recurring PayPal payments for physical or digital goods, or services. A plan includes pricing and billing cycle information that defines the amount and frequency of charge for a subscription. You can also define a fixed plan, such as a $5 basic plan or a volume- or graduated-based plan with pricing tiers based on the quantity purchased. For more information, see Subscriptions Overview .

Endpoints 16

plans

  • GETList plans/v1/billing/plans?product_id=string&page_size=10&page=1&total_required=falseLists billing plans.
  • POSTCreate plan/v1/billing/plansCreates a plan that defines pricing and billing cycle details for subscriptions.
  • GETShow plan details/v1/billing/plans/:idShows details for a plan, by ID.
  • PATCHUpdate plan/v1/billing/plans/:idUpdates a plan with the CREATED or ACTIVE status. For an INACTIVE plan, you can make only status updates.<br/>You can patch these attributes and…
  • POSTActivate plan/v1/billing/plans/:id/activateActivates a plan, by ID.
  • POSTDeactivate plan/v1/billing/plans/:id/deactivateDeactivates a plan, by ID.
  • POSTUpdate pricing/v1/billing/plans/:id/update-pricing-schemesUpdates pricing for a plan. For example, you can update a regular billing cycle from $5 per month to $7 per month.

subscriptions

  • POSTCreate subscription/v1/billing/subscriptionsCreates a subscription.
  • GETShow subscription details/v1/billing/subscriptions/:id?fields=stringShows details for a subscription, by ID.
  • PATCHUpdate subscription/v1/billing/subscriptions/:idUpdates a subscription which could be in <code>ACTIVE</code> or <code>SUSPENDED</code> status. You can override plan level default attributes by providing…
  • POSTRevise plan or quantity of subscription/v1/billing/subscriptions/:id/reviseUpdates the quantity of the product or service in a subscription. You can also use this method to switch the plan and update the shipping_amount,…
  • POSTSuspend subscription/v1/billing/subscriptions/:id/suspendSuspends the subscription.
  • POSTCancel subscription/v1/billing/subscriptions/:id/cancelCancels the subscription.
  • POSTActivate subscription/v1/billing/subscriptions/:id/activateActivates the subscription.
  • POSTCapture authorized payment on subscription/v1/billing/subscriptions/:id/captureCaptures an authorized payment from the subscriber on the subscription.
  • GETList transactions for subscription/v1/billing/subscriptions/:id/transactions?start_time=string&end_time=stringLists transactions for a subscription.

API details

Base URL
https://api-m.sandbox.paypal.com
https://api-m.paypal.com
Authentication
OAuth 2.0 (client credentials flow) with 1 scope
Operations
16 operations on 13 pathsPOST 10GET 4PATCH 2
Main resources
subscriptions 9plans 7
Response formats
application/json
Description format
OpenAPI 3.0.3, API version 1.8

How to test the Subscriptions in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Subscriptions collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (client credentials flow) with 1 scope. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “List plans” (GET /v1/billing/plans?product_id=string&page_size=10&page=1&total_required=false), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Subscriptions?

You can use billing plans and subscriptions to create subscriptions that process recurring PayPal payments for physical or digital goods, or services. A plan… It is listed under Payments and has 16 endpoints.

Who publishes the Subscriptions?

It is listed from PayPal's public API description (an OpenAPI document), not published by PayPal on Swastik Codes. Anyone who controls paypal.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Subscriptions?

Its description lists 2 base URLs: https://api-m.sandbox.paypal.com, https://api-m.paypal.com. The first is the usual one; the others are typically sandbox or regional servers.

How do I authenticate with the Subscriptions?

With OAuth 2.0 (client credentials flow) with 1 scope.

How many endpoints does the Subscriptions have?

16 operations on 13 paths (10 POST, 4 GET, 2 PATCH). The largest groups are subscriptions, plans.

Is forking the Subscriptions free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.