v1

latestOpenAPI 3.1.02026-07-222392081.7 MB
Subscriptions

Simulate subscription updates

Simulate the effect of updates on a subscription without actually applying them.

post/v1/subscriptions/{id}/simulate-updates

Path parameters

idstring required

Request body

application_schedule'immediately' | 'scheduled' required
apply_atstring date-time

The date when the update should be applied. Required when application_schedule is 'scheduled'.

payment_schedule'immediately' | 'next_invoice' | 'custom' required
charge_atstring date-time

The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.

calculation_method'pro_rata' | 'pay_in_full' | 'do_not_charge' required
precision'calendar_days' | 'milliseconds'

Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.

refund_method'wallet' | 'original_payment_method' | 'external'

Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's creditNoteWalletRefundEnabled setting.

Example request

{
  "apply_at": "2024-12-20T16:04:11Z",
  "charge_at": "2024-12-20T16:04:11Z",
  "precision": "calendar_days",
  "updates": [
    {
      "payload": {
        "product_id": "itm_FJKlqUb8COXw55"
      }
    }
  ]
}

Response

Simulation results

amountnumber required