v1
latestOpenAPI 3.0.02026-07-24103118224.7 KBSubscription
Upgrade a subscription
Upgrades an existing subscription to a new offer with prorated billing
post/subscription/{id}/upgrade
Path parameters
idstring required
Example:sub_1234567890abcdef
Unique identifier of the subscription to upgrade
Request body
Example request
{
"upgradeAmountInCents": 2999,
"threeDsSuccessUrl": "https://yourapp.com/payment/success?paymentId=pay_123",
"threeDsFailureUrl": "https://yourapp.com/payment/failure?paymentId=pay_123",
"upgradeSubscriptionName": "Premium Plan",
"upgradeSubscriptionDescription": "Access to all features of the premium plan",
"pricingMode": "TAX_EXCLUSIVE"
}Response
Upgrade a subscription successful
Example response
{
"payment": {
"lastDepositAttempt": {
"status": "succeeded",
"amount": 10000,
"paymentMethod": "CARD",
"error": "card_declined",
"attemptedAt": "2025-10-24T14:35:00Z"
},
"taxRateInPercentage": 20,
"pricingMode": "TAX_EXCLUSIVE",
"lastThreeDsAttempt": {
"status": "succeeded",
"cardBrand": "Visa",
"createdDate": "2025-11-12T21:51:33.530Z"
},
"invoiceUrl": "https://api.inflowpay.com/invoice/download?token=abc123xyz",
"customerPaymentMethod": {
"id": "cpm_abc123",
"type": "card",
"cardBrand": "visa",
"cardLast4": "4242"
}
},
"subscriptionUpgrade": {
"subscriptionId": "sub_1234567890abcdef",
"currentAmountInCents": 2999,
"upgradeAmountInCents": 4999,
"dueAmountInCents": 2000
}
}