PUT /v1/subscriptions/{id} endpoint lets you modify an existing subscription. You can cancel a subscription by setting status to CANCELLED, adjust the recurring amount by passing a new amount, or do both in a single request. At least one field must be included in the request body. This endpoint requires the subscriptions:write permission on your API key.
Path parameters
The unique identifier of the subscription to update, for example
sub_01HABC1234MNOPQR.Request body
New status for the subscription. Accepted values:
ACTIVE, CANCELLED.New recurring charge amount in US dollars. Must be a positive number.
Response
On success the endpoint returns the updated Subscription object.Unique identifier for the subscription.
Updated subscription status. One of:
ACTIVE, CANCELLED.Updated recurring charge amount in US dollars.
Billing frequency. One of:
DAILY, WEEKLY, MONTHLY, ANNUALLY.ISO 8601 date of the next scheduled charge.
ISO 8601 date of the most recent successful charge.
ISO 8601 date when the subscription is scheduled to end.
Whether the donor elected to cover processing fees on each charge.
Response codes
| Code | Meaning |
|---|---|
200 | Subscription updated successfully. |
400 | Invalid status value or non-positive amount. |
403 | The subscription belongs to a different merchant account. |
404 | No subscription with that ID exists. |
Examples
Response