Skip to main content
POST
Replace a Subscription's Card
Send a card token created by the card element of the same account. The new card is validated before it replaces the current one; if the validation is declined, the subscription keeps its current card. On success, cardLast4 changes and subscription.updated is sent. Which subscriptions. Card subscriptions in active, trialing, past_due or unpaid. A subscription that is cancel_scheduled or canceled keeps its card. Nothing is charged. A past_due subscription is retried on the new card at its next scheduled retry. An unpaid subscription is charged only when you charge it. Retries. Send idempotency_key to retry safely: the same key does not replace the card twice.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Public subscription id (UUID).

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Body

application/json
token
string
required
Minimum string length: 6
idempotency_key
string
Required string length: 1 - 255

Response

Success

success
boolean
required
requestId
string
required
data
object
required