The API endpoint (URI or URL) must point to either the Test or Production (live) environment.
- Test API endpoint: https://api.test.paysafe.com/
For example: https://api.test.paysafe.com/subscriptionsplans/monitor
- Production API endpoint: https://api.paysafe.com/
For example: https://api.paysafe.com/subscriptionsplans/monitor
API Endpoint Patterns
The API endpoints typically conform to a pattern similar to the example below:
Replace the elements in the API endpoint example above as follows:
|Use test for a test transaction. Remove the word test for a live transaction.|
If required for the request, replace with the unique plan ID, which is returned in the response to your initial plan creation request. For some subscription requests, this will be a subscription ID, which is the unique ID returned in the response to your initial subscription creation request.
Replace with the type of API request, such as plans or subscriptions.
|v1||This is the version of the API. Currently all APIs are on version 1.|
The following table lists endpoints for typical requests for the Subscriptions API.
|API Request||Used To||Endpoint Pattern|
|Create a plan to be used as part of a subscription.|| |
|Copy Plans||Create a copy or a new version of an existing plan.|| |
|Get Plans||Look up a plan.|| |
|Update Plans||Update a plan.|| |
|Activate Plans||Activate a plan to be used in a subscription.|| |
|Delete Plans||Delete a plan that does not have any subscriptions associated with it.|| |
|Create Subscriptions||Create a subscription based on a previously created plan.|| |
|Get Subscriptions||Look up a subscription.|| |
|Update Subscriptions||Update a subscription.|| |
Cancel a Subscription
|Cancel a subscription that was set up for a consumer.|| |
|Delete a Subscription||Delete a subscription that does not have any payments associated with it.|| |
In the above examples:
- plan_id represents the unique id returned in response to a plan creation request.
- subscription_id represents the unique id returned in response to a subscription creation request.