billing

PUT /v1/billing/payment-preferences

Elect (or stop) paying by crypto.

Vituo vyote vya billing

Uthibitishaji

Tuma ufunguo wa API kama tokeni ya kubeba. Ufunguo lazima uwe na ruhusa ya billing.payment.manage; ufunguo usio nayo unakataliwa kwa 403, si 404.

Mahali ambapo kitambulisho cha shirika lako huwekwa

Kigezo hiki kinachukua org_id kama kigezo cha utafutaji. Iache wazi na simu itashughulikia tawi lako lote la wapangaji; itume ili kupunguza simu iwe ya shirika moja tu.

Kitambulisho cha shirika lako kipo kwenye skrini ya funguo za API katika dashibodi yako, kando ya ufunguo wenyewe. Ni kitambulisho kile kile katika kila ombi unalofanya.

Jaribu

Badilisha chochote kilicho ndani ya mabano ya pembe na maadili yako mwenyewe, na kishikiliaji cha ufunguo na ufunguo kutoka kwa dashibodi yako.

curl -X PUT https://api.zinndigital.com/v1/billing/payment-preferences \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "pays_by_crypto": <boolean> }'

Umeingia kwenye akaunti? Dashibodi yako ya kiweko cha API inajaza kitambulisho chako halisi cha shirika na ufunguo wako mwenyewe, na kuendesha ombi dhidi ya API ya moja kwa moja ili uweze kuona jibu halisi. Fungua sehemu hii ya mwisho (endpoint) kwenye konsole ya API

Maelezo

Requires `billing.payment.manage` — the same key that gates adding and removing a payment method, because this **is** a payment-method decision. ⛔ Not `billing.invoice.manage`: it changes what we can charge, not what prints on an invoice. Turning crypto **off** answers `409` when it is currently the only way the account can be charged and something is still going to charge it. The floor is on the resulting **state**, not on one of the two actions that can breach it — otherwise a customer could satisfy it with crypto, delete their last card, then switch crypto off.

Vigezo

JinaAinaInayohitajikaKilicho hiki
org_id (query)UuidHapanaThe organization to update. Omitted or empty means the caller's own.

Mwili wa ombi

JinaAinaInayohitajikaKilicho hiki
pays_by_cryptobooleanNdiyoElect (or stop) paying by crypto. ⛔ Turning it **off** is refused with `409` when crypto is currently the only way the account can be charged and something is still going to cha…

Majibu

JinaAinaInayohitajikaKilicho hiki
org_idstringNdiyo
pays_by_cryptobooleanNdiyoThe account pays in crypto (NOWPayments). Satisfies the "at least one operational payment method" floor with no card on file, and moves the account to **invoice-ahead** renewal…
primary_payment_method_idstringNdiyoThe mandate charged first, or `null` if none is nominated or usable.
backup_payment_method_idstringNdiyoThe mandate charged if the primary declines.
auto_renew_possiblebooleanNdiyoWhether this account can be charged unattended at all. `false` for a crypto-only account, and for one whose only mandates are rails Stripe will not let us reuse — both renew by…
fallback_reachablebooleanNdiyoWhether the nominated backup could actually catch the primary's decline. `false` when there is no backup, or when it sits on a **different gateway** — a charge resolves one gate…

Hitilafu ambazo mwisho huu unaweza kurudisha

401 · 403 · 409 · 422