invalid_amount means a billing request carried an amount OpenType will not charge. Read this page when buying credits or configuring auto-recharge fails with a 400.
What happened
Routes:POST /v1/billing/checkoutPUT /v1/billing/auto-recharge
The bounds:
How to fix
- Convert dollars to micros by multiplying by 1,000,000, and round to whole cents first: $25.00 is
25000000. - Keep
amount_microsbetween5000000and1000000000. - When you enable auto-recharge, send
enabled,threshold_microsandamount_microstogether. - Send the corrected request. The refused one changed nothing.
Example
billing_write and returns a hosted Stripe checkout page; the credit arrives after payment.
Related
- Credits and billing - balance, checkout and the transaction list.
- Auto-recharge - how the threshold and the top-up amount work.
- Billing in the console - add credit without writing code.
- Problem codes - every code, its status, and whether a retry can help.