Top up the balance from a saved card, without a browser
Changed onCharges amount_usd to the saved default card (or payment_method_id) off-session and records the pending top-up; the balance is credited by the Stripe webhook, as after a Checkout. A bank that wants a confirmation answers 402 CARD_AUTHENTICATION_REQUIRED with a dashboard_url; a decline answers 402 CARD_DECLINED. After either 402, retry with a new idempotency_key (the same key replays the 402 for 24 hours and cannot charge twice). 202 processing: the row is not credited yet (first call or a repeat), or Stripe's answer to the charge call was lost. 200 succeeded only after the webhook marks the row COMPLETED. First and repeat read that same row, so a succeeded PaymentIntent stays processing until the credit. Do not repeat the call without the returned idempotency_key; with it the repeat is the same transaction. The same key with a different amount is a new charge. Session, or an API key with the billing scope.
Request
- Base URL: https://lium.io/api
- URL: https://lium.io/api/payments/topup
- Auth: one of:
- HTTP bearer
- API key in header X-API-Key
Request body
Response
Successful Response
Changes
- ○
endpoint added
- ○