Top up credit
POST/v1/users/me/top-ups
Buys model credit for the caller's account. Once the card is charged the full amount is added to credit_balance_usd as purchased credit, which never expires. The card fee is not deducted. amount_usd is what is credited; a card issued in Brazil is charged its equivalent in Brazilian reais at the Banco Central's latest closing PTAX selling rate, and a checkout shows reais to a payer in Brazil.
With saved_card: true the saved card is charged at once and the answer is status: paid. When the card needs authentication or is declined, nothing is charged and the answer falls back to a checkout.
A checkout (status: checkout) is a hosted page: send the caller to checkout_url. Creating it charges nothing, and one left unpaid lapses at expires_at. The card paid with there becomes the account's saved card, replacing any other. After paying, the browser returns to the console's billing page.
Request
Responses
- 201
- 400
- 401
- 409
- 502
- 503
The paid top-up, or the checkout to send the caller to.
The request was malformed or failed validation.
Missing or invalid credentials.
saved_card with no saved card (payment_method_required).
The payment provider could not be reached (payment_provider_error). Nothing was charged.
Card payments are not available on this deployment (payments_not_configured), or the exchange rate for a card charged in reais could not be read (exchange_rate_unavailable). Nothing was charged.