billing
PUT /v1/billing/payment-preferences
Elect (or stop) paying by crypto.
প্রমাণীকরণ
একটি বিয়ারার টোকেন হিসেবে একটি এপিআই কি পাঠান। কি-টির অবশ্যই billing.payment.manage অনুমতি থাকতে হবে; এটি ছাড়া কোনো কি ৪০৪ নয়, বরং ৪০৩ ত্রুটি দিয়ে প্রত্যাখ্যাত হবে।
যেখানে আপনার অর্গানাইজেশন আইডি দেওয়া হবে
এই এন্ডপয়েন্টটি org_id-কে একটি কুয়েরি প্যারামিটার হিসেবে গ্রহণ করে। এটি বাদ দিলে কলটি আপনার পুরো টেনেন্সি সাবট্রিকে কভার করে; এটিকে পাঠালে কলটি একটি সংস্থায় সীমাবদ্ধ হয়।
আপনার ড্যাশবোর্ডের API কি স্ক্রিনে, কি-এর ঠিক পাশেই আপনার অর্গানাইজেশন আইডি রয়েছে। আপনি যে কলই করুন না কেন, সবগুলিতেই এই আইডি একই থাকে।
চেষ্টা করুন
কোণ বন্ধনীতে থাকা যেকোনো কিছু আপনার নিজস্ব মান দিয়ে এবং কী প্লেসহোল্ডারটি আপনার ড্যাশবোর্ডের একটি কী দিয়ে প্রতিস্থাপন করুন।
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> }'লগ ইন করা আছে? আপনার ড্যাশবোর্ডের এপিআই কনসোল আপনার আসল অর্গানাইজেশন আইডি এবং আপনার নিজের কি পূরণ করে দেয়, এবং লাইভ এপিআই-এর বিপরীতে অনুরোধটি চালায় যাতে আপনি প্রকৃত প্রতিক্রিয়া দেখতে পান। এই এন্ডপয়েন্টটি এপিআই কনসোলে খুলুন
বিবরণ
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… |
প্রতিক্রিয়া
| নাম | ধরন | আবশ্যক | এটি কী |
|---|---|---|---|
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… |
এই এন্ডপয়েন্ট থেকে যেসব ত্রুটি আসতে পারে
401 · 403 · 409 · 422