Saltar al contenido principal
POST
cURL
Top up a subscription’s balance. Charges the customer’s payment method for the specified amount.

Autorizaciones

x-api-key
string
header
requerido

Encabezados

Idempotency-Key
string

Unique key used to safely retry this write for 24 hours without applying it twice.

Required string length: 1 - 200
Commet-Version
string
predeterminado:2026-08-27

API version used by this reference. Send this header to select this contract explicitly.

Parámetros de ruta

id
string
requerido

Cuerpo

application/json
amount
integer
requerido

The amount to add, in minor units of the subscription currency (cents; whole units for zero-decimal currencies).

Rango requerido: x <= 9007199254740991
successUrl
string<uri>

Where the customer returns after paying. When it is set and the subscription has no saved payment method, or the saved method is declined or asks for authentication, the response has status requires_checkout and a checkoutUrl where the customer pays this purchase and saves the method in one step. Without it, the request is rejected in both cases. A saved method is always charged directly first, and a payment that fails for any other reason is rejected either way.

Respuesta

Success

amount
integer
requerido
Rango requerido: -9007199254740991 <= x <= 9007199254740991
status
enum<string>
requerido

succeeded when the payment was confirmed and the balance was added. processing when the payment method confirms later: the balance is added once the payment is confirmed, and nothing is added if it is declined. requires_checkout when successUrl was sent and the subscription has no saved payment method or the saved one was declined: the balance is added once the customer pays at checkoutUrl.

Opciones disponibles:
succeeded,
processing,
requires_checkout
object
string
requerido
Allowed value: "balance_topup"
livemode
boolean
requerido
checkoutUrl
string

Hosted checkout where the customer pays the purchase and saves the payment method. Present only when status is requires_checkout.