Saltar al contenido principal

SubscriptionUpdatePreview

creditinteger<int32>required

Unused time that would be credited at the current price, in the smallest currency unit.

Example: 500
chargeinteger<int32>required

Time that would be charged at the new price, in the smallest currency unit. An interval change charges the full new price rather than a fraction of it.

Example: 1200
netinteger<int32>required

The computed difference, charge minus credit. This is the amount that would move, except when refundCapped is true: a refund cannot exceed what the payment funding the current period received, so less than net would be refunded.

Example: 700
directionstringrequired

Whether the difference would be charged, refunded, or neither. none means the difference rounds to zero and no money moves.

Possible values: [charge, refund, none]

Example: charge
refundCappedbooleanrequired

True when the refund would be smaller than the magnitude of net, because a refund cannot exceed the amount the payment funding the current period received.

Example: false
effectiveAtinteger<int64>required

The date the change would take effect.

Example: 1636366897
currentPeriodEndnumber<int64>required

The end date of the current subscription period. Measured in seconds since the Unix epoch.

Example: 1636366897
newPeriodEndinteger<int64>

The end of the billing period the change would start. Present only for an interval or intervalCount change, which restarts the period.

Example: 1667902897
nextPaymentAtinteger<int64>

When the next payment would be taken. Present only for an interval or intervalCount change.

Example: 1667902897
SubscriptionUpdatePreview
{
"credit": 500,
"charge": 1200,
"net": 700,
"direction": "charge",
"refundCapped": false,
"effectiveAt": 1636366897,
"currentPeriodEnd": 1636366897,
"newPeriodEnd": 1667902897,
"nextPaymentAt": 1667902897
}