POST
/
subscription
/
edit
cURL
curl --request POST \
  --url https://api.xpaycheckout.com/subscription/edit \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "subscriptionId": "sub_fooBOwYsaK50AEfK",
  "newAmount": 1000,
  "newCycleCount": 6,
  "newNextPaymentDate": 1753104947000
}'
This response does not have an example.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
subscriptionId
string
required

Unique identifier of the subscription

Example:

"sub_fooBOwYsaK50AEfK"

newAmount
integer

New recurring amount for the subscription, if changed. The amount in lowest count unit. e.g.: For USD 1, amount is 100 representing 100 cents (The minimum amount should be greater than 1 USD).

šŸ”’ Can only be edited if the subscription is in one of: TRIALING, ACTIVE, UNPAID

Example:

1000

newCycleCount
integer

New number of billing cycles for the subscription, if changed.

šŸ”’ Can only be edited if the subscription is in one of: TRIALING, ACTIVE, UNPAID

Example:

6

newNextPaymentDate
integer

New next payment date in epoch milliseconds, if changed. Future payments will be deducted at the frequency interval defined in the subscription, calculated from the new next payment date.

šŸ”’ Can only be edited if the subscription is in one of: TRIALING, ACTIVE, UNPAID

Example:

1753104947000

Response

Subscription edited successfully