billing
PUT /v1/billing/payment-preferences
Elect (or stop) paying by crypto.
Tabbatar da Asali
Aika maɓallin API azaman alamar ɗauka (bearer token). Dole ne maɓallin ya kasance yana da izinin billing.payment.manage; idan babu shi, za a ƙi amfani da maɓallin tare da lambar 403, ba 404 ba.
Inda ID ɗin kungiyar ku ke zuwa
Wannan mahadar ta na daukar org_id a matsayin sigar tambaya. Bar shi kuma kiran zai shafi daukacin rukunin haya naka; aika shi don takaita kiran zuwa kungiya daya tak.
Ana samun lambar kungiyar ku a kan shafin maɓallan API a cikin madanninku, kusa da maɓallin kansa. Shi ne lambar da ta dace a kowane kiran da kuka yi.
Gwada
May gurbin komai da ke cikin kusurwa da ƙimar ka, kuma may gurbin maballi da maballi daga allon sarrafa ka.
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> }'An shiga? Na'urar sarrafa API da ke cikin sashin kulawarka tana cika ainihin lambar ƙungiyarka da maɓallinka naka, sannan tana gudanar da buƙatar a kan ainihin API don haka zaka iya ganin amsar gaske. Buɗe wannan tashar a cikin na'urar kula da API
Bayani
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.
Sigogi
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
org_id (query) | Uuid | A'a | The organization to update. Omitted or empty means the caller's own. |
Jikin buƙata
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
pays_by_crypto | boolean | Eh | Elect (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… |
Martani
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
org_id | string | Eh | — |
pays_by_crypto | boolean | Eh | The 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_id | string | Eh | The mandate charged first, or null if none is nominated or usable. |
backup_payment_method_id | string | Eh | The mandate charged if the primary declines. |
auto_renew_possible | boolean | Eh | Whether 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_reachable | boolean | Eh | Whether 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… |
Kuskuren da wannan matsaya za ta iya maido wa
401 · 403 · 409 · 422