Recurring Payments
Update a subscription with a new product / amount to pay - replacing the existing product
If the new subscription amount is higher than the existing amount, a pro-rata charge will be made to cover the cost of the new price up until the next billing date.
This endpoint requires prior approval - please contact your account manager.
put/recurring-payments/{reference}
Path parameters
referencestring required
Example:tbx-r-55fff4107740a1f40d844ff89607557f45bfafb3
The recurring payment reference to fetch.
Request body
Example request
{
"items": [
{
"type": "subscription",
"qty": 1,
"revenue_share": [],
"package": {
"name": "1000 Gold",
"price": 1.27,
"type": "subscription",
"qty": 1,
"expiry_period": "month",
"expiry_length": 3,
"custom": {
"foo": "bar"
}
}
}
]
}Response
Successfully updated subscription. The updated RecurringPayment is returned.
Example response
{
"id": 5000,
"created_at": "2022-12-16T16:43:06.000000Z",
"updated_at": "2022-12-16T16:43:06.000000Z",
"next_payment_date": "2022-12-30T16:43:06",
"reference": "88",
"account_id": 1,
"interval": "P2W",
"cancellation_requested_at": "2024-07-25 14:01:03",
"status": {
"id": 2,
"class": "success",
"description": "Active",
"active": 1
},
"amount": {
"amount": 7,
"tax": 1.4,
"period": "P2W"
},
"links": {
"initial_payment": "https://checkout.tebex.io/api/payments/tbx-123123aabccd123-bf71ad?type=txn_id",
"payment_history": [
"https://checkout.tebex.io/api/payments/tbx-123123aabccd123-bf71ad?type=txn_id"
]
}
}