{
"code": 200,
"msg": "success",
"data": {
"subscriptionId": "<string>",
"status": 1,
"code": "<string>",
"declinedCode": "<string>",
"message": "<string>",
"action": {
"redirectUrl": "<string>",
"method": "GET",
"type": "ALIPAY",
"walletHandleRedirectOrDisplayQrCode": {
"imageUrlPng": "<string>",
"imageUrlSvg": "<string>",
"imageDataUrl": "<string>",
"hostedInstructionsUrl": "<string>",
"mobileAuthUrl": "<string>",
"fallbackUrl": "<string>",
"packageName": "<string>",
"expiresAt": 123,
"expiresSecond": 123
},
"paymentMethodType": "<string>",
"postData": {}
},
"subscription": {
"subscriptionId": "<string>",
"customerId": "<string>",
"productId": "<string>",
"priceId": "<string>",
"priceSnapshotId": "<string>",
"createTime": 123,
"quantity": 123,
"paymentMethodType": "<string>",
"paymentInstrumentId": "<string>",
"status": "<string>",
"billing": "<string>",
"recurringInvoiceItem": {
"invoiceItemId": "<string>",
"amount": 123,
"discountAmount": 123,
"paymentAmount": 123,
"couponTerms": "<string>",
"promotionCode": "<string>",
"currency": "USD",
"periodStart": 123,
"periodEnd": 123,
"proration": true,
"price": {
"productId": "<string>",
"productName": "<string>",
"priceId": "<string>",
"priceSnapshotId": "<string>",
"unitAmount": 123,
"quantity": 123,
"recurring": {
"interval": "week",
"pricingModel": "flat_rate",
"trialPeriodDays": 123,
"tiersMode": "volume",
"intervalCount": 123
}
}
},
"merchantReference": "<string>",
"sessionId": "<string>",
"trialStart": 123,
"trialEnd": 123,
"currentPeriodStart": 123,
"currentPeriodEnd": 123,
"cancelAt": 123,
"cancelAtPeriodEnd": true,
"canceledAt": 123,
"cancelReason": "<string>",
"currency": "USD",
"upcomingInvoiceItem": {
"invoiceItemId": "<string>",
"amount": 123,
"discountAmount": 123,
"paymentAmount": 123,
"couponTerms": "<string>",
"promotionCode": "<string>",
"currency": "USD",
"periodStart": 123,
"periodEnd": 123,
"proration": true,
"price": {
"productId": "<string>",
"productName": "<string>",
"priceId": "<string>",
"priceSnapshotId": "<string>",
"unitAmount": 123,
"quantity": 123,
"recurring": {
"interval": "week",
"pricingModel": "flat_rate",
"trialPeriodDays": 123,
"tiersMode": "volume",
"intervalCount": 123
}
}
},
"scheduledPhases": [
{
"sequence": 2,
"effectiveCycle": 2,
"priceSnapshotId": "<string>",
"quantity": 2,
"metadata": {}
}
],
"elapsedCycles": 123,
"metadata": {}
}
}
}"<string>"Confirm Subscription Update
Confirm a subscription upgrade or downgrade using the target price snapshot returned by the preview API. Send the same quantity, promotionCode, immediate, billingCycleAnchor, and prorationBehavior values used in the preview request, including omitting options that were omitted during preview. These options are not stored in priceSnapshotId; confirmation recalculates the update. billingCycleAnchor and prorationBehavior may only be supplied with immediate=true. Immediate updates may require payment; period-end updates return success when no immediate payment is required.
{
"code": 200,
"msg": "success",
"data": {
"subscriptionId": "<string>",
"status": 1,
"code": "<string>",
"declinedCode": "<string>",
"message": "<string>",
"action": {
"redirectUrl": "<string>",
"method": "GET",
"type": "ALIPAY",
"walletHandleRedirectOrDisplayQrCode": {
"imageUrlPng": "<string>",
"imageUrlSvg": "<string>",
"imageDataUrl": "<string>",
"hostedInstructionsUrl": "<string>",
"mobileAuthUrl": "<string>",
"fallbackUrl": "<string>",
"packageName": "<string>",
"expiresAt": 123,
"expiresSecond": 123
},
"paymentMethodType": "<string>",
"postData": {}
},
"subscription": {
"subscriptionId": "<string>",
"customerId": "<string>",
"productId": "<string>",
"priceId": "<string>",
"priceSnapshotId": "<string>",
"createTime": 123,
"quantity": 123,
"paymentMethodType": "<string>",
"paymentInstrumentId": "<string>",
"status": "<string>",
"billing": "<string>",
"recurringInvoiceItem": {
"invoiceItemId": "<string>",
"amount": 123,
"discountAmount": 123,
"paymentAmount": 123,
"couponTerms": "<string>",
"promotionCode": "<string>",
"currency": "USD",
"periodStart": 123,
"periodEnd": 123,
"proration": true,
"price": {
"productId": "<string>",
"productName": "<string>",
"priceId": "<string>",
"priceSnapshotId": "<string>",
"unitAmount": 123,
"quantity": 123,
"recurring": {
"interval": "week",
"pricingModel": "flat_rate",
"trialPeriodDays": 123,
"tiersMode": "volume",
"intervalCount": 123
}
}
},
"merchantReference": "<string>",
"sessionId": "<string>",
"trialStart": 123,
"trialEnd": 123,
"currentPeriodStart": 123,
"currentPeriodEnd": 123,
"cancelAt": 123,
"cancelAtPeriodEnd": true,
"canceledAt": 123,
"cancelReason": "<string>",
"currency": "USD",
"upcomingInvoiceItem": {
"invoiceItemId": "<string>",
"amount": 123,
"discountAmount": 123,
"paymentAmount": 123,
"couponTerms": "<string>",
"promotionCode": "<string>",
"currency": "USD",
"periodStart": 123,
"periodEnd": 123,
"proration": true,
"price": {
"productId": "<string>",
"productName": "<string>",
"priceId": "<string>",
"priceSnapshotId": "<string>",
"unitAmount": 123,
"quantity": 123,
"recurring": {
"interval": "week",
"pricingModel": "flat_rate",
"trialPeriodDays": 123,
"tiersMode": "volume",
"intervalCount": 123
}
}
},
"scheduledPhases": [
{
"sequence": 2,
"effectiveCycle": 2,
"priceSnapshotId": "<string>",
"quantity": 2,
"metadata": {}
}
],
"elapsedCycles": 123,
"metadata": {}
}
}
}"<string>"Authorizations
Your secret API key obtained from the Clink dashboard (Developers section)
Headers
Current timestamp in milliseconds since Unix epoch (required for request signing)
"1783513683000"
Path Parameters
Unique identifier of the subscription
Body
Subscription update confirmation request
Parameters required to confirm a subscription upgrade or downgrade. Use the same quantity, promotionCode, and billing options as the preview request; priceSnapshotId does not preserve these options.
Target price snapshot ID returned by the preview API.
Number of units for the target price. Optional; defaults to 1 when omitted. null and values below 1 are invalid.
x >= 1Promotion code to apply to the updated subscription.
Whether to force the update to take effect immediately. true requests an immediate update; false schedules it for the end of the current billing or trial period. Omitted or null lets the system decide. Explicit true requires both current and target prices to use flat_rate pricing. Outside a free trial, the target full-cycle amount (unit amount multiplied by quantity) must be greater than the current full-cycle amount; immediate downgrades and equal-amount changes are rejected.
true
Billing cycle anchor for an immediate update. A non-null value requires immediate=true. now starts a new full billing cycle at the update time; unchanged preserves the current period end. Outside a free trial, omitted or null uses unchanged. For an immediate free-trial update, omit this field if the target still has trial time remaining; when switching directly to paid billing, only now or omitted/null is allowed, and now is used.
now, unchanged, null "now"
Proration policy for an immediate update. A non-null value requires immediate=true. always_invoice credits the unused portion of the current plan and charges the target plan for the remaining period with unchanged, or a full cycle with now. none gives no credit for the current plan and charges the target plan's full-cycle amount with either anchor; it does not waive payment. Discounts and tax are applied afterward. Outside a free trial, omitted or null uses always_invoice. For an immediate free-trial update, omit this field if the target still has trial time remaining; when switching directly to paid billing, only none or omitted/null is allowed, and none is used.
always_invoice, none, null "always_invoice"