प्रमाणीकरण
बेरर टोकन म्हणून API की पाठवा. की मध्ये billing.payment.manage परवानगी असणे आवश्यक आहे; ती नसलेली की 404 ऐवजी 403 सह नाकारली जाते.
जिथे तुमचा ऑर्गनायझेशन आयडी (organization id) जाईल
हे एंडपॉइंट org_id ला क्वेरी पॅरामीटर म्हणून स्वीकारते. ते वगळल्यास कॉल तुमच्या संपूर्ण टेनन्सी सबट्रीला कव्हर करतो; ते एका संस्थेपुरता कॉल मर्यादित करण्यासाठी पाठवा.
तुमची संस्था आयडी (organisation id) तुमच्या डॅशबोर्डवरील API की स्क्रीनवर, की च्या बाजूला आहे. तुम्ही केलेल्या प्रत्येक कॉलमधील तोच आयडी असतो.
प्रयत्न करा
कोनसांस्कृतिक कंसात (<>) असलेली कोणतीही गोष्ट तुमच्या स्वतःच्या मूल्यांनी बदला आणि key प्लेसहोल्डरला तुमच्या डॅशबोर्डवरील किने बदला.
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> }'साइन इन केलेले आहे? तुमच्या डॅशबोर्डमधील API कन्सोल तुमची खरी संस्था आयडी आणि तुमची स्वतःची की आपोआप भरतो आणि लाइव्ह API विरुद्ध विनंती कार्यान्वित करतो जेणेकरून तुम्हाला वास्तविक प्रतिसाद पाहता येईल. एपी कन्सोलमध्ये हा एंडपॉइंट उघडा
तपशील
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.
पॅरामीटर्स
| नाव | प्रकार | आवश्यक | हे काय आहे |
|---|---|---|---|
org_id (query) | Uuid | नाही | The organization to update. Omitted or empty means the caller's own. |
विनंती मुख्य भाग
| नाव | प्रकार | आवश्यक | हे काय आहे |
|---|---|---|---|
pays_by_crypto | boolean | होय | 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 cha… |
प्रतिसाद
| नाव | प्रकार | आवश्यक | हे काय आहे |
|---|---|---|---|
org_id | string | होय | — |
pays_by_crypto | boolean | होय | 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 | होय | The mandate charged first, or `null` if none is nominated or usable. |
backup_payment_method_id | string | होय | The mandate charged if the primary declines. |
auto_renew_possible | boolean | होय | 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 | होय | 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 gate… |
ही एंडपॉइंट परत करू शकेल अशा त्रुटी
401 · 403 · 409 · 422