Skip to main content
POST
cURL
Saves the customer’s own auto top-up, which replaces their plan’s default whole. enabled: false turns the plan’s default off; autoTopUp: null clears the customer’s setting so the plan’s applies again. Saving restarts a cooldown or suspension after failures. It buys a credit pack (addOnId) or an amount (amountCents, within the catalog’s topUps), one of the two: otherwise 400 invalid_auto_top_up, add_on_not_found, top_ups_not_configured or top_up_amount_out_of_range. The response is what Get a customer’s auto top-up returns. Needs the Customers permission.

Authorizations

Authorization
string
header
required

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

Query Parameters

customerId
string
required

Your ID for the customer, such as your user ID.

Required string length: 1 - 255

Body

application/json
autoTopUp
object | null
required

The customer's own setting, or null to follow the plan's default.

Response

Saved; the auto top-up that now applies

customerId
string
required
autoTopUp
object | null
required
suspended
boolean
required

Three failures in a row: no attempt until the setting is saved again or the default card changes.

coolingDownUntil
string<date-time> | null
required

After a failure, no attempt before this (unless the card changes).

recent
object[]
required

The last 10 top-ups, newest first.