Subscriptions

Update a subscription (upgrades now with proration, downgrades and interval switches at the period end)

Update a subscription (upgrades now with proration, downgrades and interval switches at the period end). Use the response status and request ID to decide whether to retry, reconcile, or ask the customer for action.

patch/api/v1/subscriptions/{id}

Request

  • Base URL
    https://merchant.zahlo.eu
  • Auth
    API key in header x-api-key

Path parameters

idstring required

The resource identifier returned by the merchant API.

Headers

Idempotency-Keystring

Retry-safe key for create operations.

Request body

priceIdstring

Same currency. An upgrade or seat increase applies now and prorates; a downgrade or interval switch applies at the period end.

quantityinteger
paymentMethodIdstring
metadataobject

Up to 50 key-value pairs; keys up to 40 characters, values strings up to 500 characters.

Response

The updated subscription

idstring required
object'subscription' required
livemodeboolean
createdAtstring date-time
customerIdstring required
priceIdstring required
quantityinteger
status'incomplete' | 'trialing' | 'active' | 'past_due' | 'paused' | 'cancelled' required
currencystring required
amountMinorinteger required

The current or next period's charge, after discount.

couponIdstring nullable
discountEndsAtstring date-time nullable
paymentMethodIdstring nullable
rail'card' | 'sepa_debit'
trialEndstring date-time nullable
currentPeriodStartstring date-time nullable
currentPeriodEndstring date-time nullable
cancelAtPeriodEndboolean required
cancelledAtstring date-time nullable
cancellationReason'requested' | 'payment_failed' nullable
pastDueSincestring date-time nullable
latestPaymentIdstring nullable
prorationMinorinteger

Proration for an upgrade or seat increase, added to the next period's charge.

metadataobject

Up to 50 key-value pairs; keys up to 40 characters, values strings up to 500 characters.

Changes

No recorded changes to this operation across all 1 revision of this API.