Ask for a top-up
A top-up of the account of the key's project: an amount in US dollars, in whole cents, $20 at the least (as the control plane is started by default) and $1,000,000 at the most. It is to_collect when this answers; collected, it is as many Credits as dollars, in a lot that lapses 365 days after. It moves no account's plan: on any plan it is the balance that pays for what is used past what the plan includes. With Idempotency-Key, the same key and body again, from any project of the account and however much later, is answered with the top-up they made, as it is then, and makes no other. Collected where the platform is registered for tax, the tax is added to what the card pays, and the Credits are the amount before tax: an Australian who tops up $20 pays $22 and has 20 Credits (tax of the charge, control/README.md, 税). An account that is no business, where only businesses are sold to, is refused (403 tax_region_business_only): where it is is its billing address, or, where it has none, the country of the address the call comes from (--ip-country-file). The address the call comes from is kept with the top-up, as one of the evidences of where its customer is. Takes admin.
https://api.glac.ai/v1/billing/topupsYetkilendirme
Başlık parametreleri
İstek gövdesiJSONzorunlu
- start_nowoptionalboolean
true: the account asks for what it buys to be provided at once, within the 14 days in which a consumer in the European Economic Area or the United Kingdom may withdraw from it, and acknowledges that it pays for what was provided if it withdraws and that a top-up whose Credits are all used has been provided in full and can no longer be withdrawn from (GET /v1/billing/withdrawals,right.start_now, has the words). Required of an account that buys as a consumer there (no tax id that is verified or being verified, and its billing address there, or, without one, the address the call comes from): 400start_now_requiredwithout it. Kept with the purchase wherever it is given: without it, a withdrawal gives back all that was paid (control/README.md, 撤回).
Returns
201
The top-up.
- stateto_collectveyacollectedveyafailedveyarefundedrequired
to_collect: it is to be collected, or is being collected.collected: a top-up is Credits in the account's ledger, and a subscription's charge has paid for a period.failed: nothing was taken, and nothing granted.refunded: a top-up that was collected and then taken back (refunded_at,refund_reason): what was left of its Credits was taken from the balance. - debt_usdnumber | nullrequired
Of a subscription's charge: what the account owed when it was made, less than a debt is (
--debt-charge-least), in whole cents rounded up, which it collects with the fee; collected, that is Credits, which pay what is owed first. 0 for one that carries nothing (nothing was owed, a debt was, or a top-up of the account was on its way). null for a top-up. - failureobject | nullrequired
That it failed; null unless
failed. To the account, never why (the reason a card's bank or Stripe gives helps whoever tries stolen cards):card_declined, "The card was declined." (its card was refused: by its bank, by Stripe, or as the card of as many accounts as one may pay for), orpayment_failed, "The payment failed." (anything else: no card on record, a payment page that ended unpaid, an invoice voided at Stripe, Stripe out of reach or refusing the request). What to do is the same for both: pay on a payment page (POST /v1/billing/checkout), whose card is the account's from then on. To the operator (GET /internal/charges), why, as whoever collects says it. Where Stripe collects: the decline code of the card's bank, or Stripe's own code, in Stripe's words;no_payment_method(the account has no card);authentication_required(the card's bank asks for the payment to be authenticated, and nobody was there to do it: it is paid on a payment page);invoice_voided,invoice_uncollectible(its invoice was voided, or marked uncollectible, at Stripe before it was paid). Of a charge paid on a payment page:checkout_expired(the page ended unpaid, or was never made),card_used_elsewhere(its card pays for as many accounts as one may; what was paid was refunded),payment_failed(what was paid on it did not come in),stripe_unavailable,stripe_refusedor Stripe's own code (no page was made). Of what stands in for a collector:stand_in. - refund_reasonrefundveyadisputeveyafraudveyawithdrawalveyanullrequired
Why it was taken back; null unless
refunded.withdrawal: its buyer, a consumer, withdrew from it (GET /v1/billing/withdrawals). To the account a fraud is arefund, which it is (the money went back to the card): that a payment was found to be made with a stolen card is the operator's to know. - invoice_idstring | nullrequired
Where Stripe collects: Stripe's invoice of the charge, made once Stripe is asked for it (by the collector; of a charge paid on a payment page, once the page is paid). It is kept when the charge fails: an invoice whose payment failed is voided. null for a charge with none (one what stands in for a collector took, one whose invoice is not made yet).