billing
PATCH /v1/payment-methods/{paymentMethodId}
Nominate a stored payment method as primary or backup.
ದೃಢೀಕರಣ
ಬೀರರ್ ಟೋಕನ್ ಆಗಿ API ಕೀಯನ್ನು ಕಳುಹಿಸಿ. ಈ ಎಂಡ್ಪಾಯಿಂಟ್ ಸ್ಪೆಸಿಫಿಕೇಶನ್ನಲ್ಲಿ ನಿರ್ದಿಷ್ಟ ಅನುಮತಿಯನ್ನು ಸೂಚಿಸುವುದಿಲ್ಲ, ಆದ್ದರಿಂದ ಊಹಿಸುವ ಬದಲು ನಿಮ್ಮ ಕೀಗೆ ಕನಿಷ್ಠ ಅಗತ್ಯವಿರುವದನ್ನು ನೀಡಿ ಮತ್ತು ಪ್ರತಿಕ್ರಿಯೆಯನ್ನು ಪರಿಶೀಲಿಸಿ.
ಈ ಎಂಡ್ಪಾಯಿಂಟ್ ಯಾವುದೇ ಸಂಸ್ಥೆಯ ಐಡಿಯನ್ನು ತೆಗೆದುಕೊಳ್ಳುವುದಿಲ್ಲ. ನಿಮ್ಮ ಕೀ ಯು ಈಗಾಗಲೇ ಅದು ಸೇರಿರುವ ಸಂಸ್ಥೆಯನ್ನು ಗುರುತಿಸುತ್ತದೆ ಮತ್ತು ಪ್ರತಿಕ್ರಿಯೆಯನ್ನು ಅದಕ್ಕೆ ಸೀಮಿತಗೊಳಿಸಲಾಗಿದೆ.
ಪ್ರಯತ್ನಿಸಿ
ಕೋನೀಯ ಬ್ರಾಕೆಟ್ಗಳಲ್ಲಿರುವ ಯಾವುದೇ ಅಂಶವನ್ನು ನಿಮ್ಮ ಸ್ವಂತ ಮೌಲ್ಯಗಳೊಂದಿಗೆ ಮತ್ತು ಕೀ ಪ್ಲೇಸ್ಹೋಲ್ಡರ್ ಅನ್ನು ನಿಮ್ಮ ಡ್ಯಾಶ್ಬೋರ್ಡ್ನಲ್ಲಿರುವ ಕೀಯೊಂದಿಗೆ ಬದಲಾಯಿಸಿ.
curl -X PATCH https://api.zinndigital.com/v1/payment-methods/{paymentMethodId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "role": <string<, primary, backup>> }'ಸೈನ್ ಇನ್ ಆಗಿದ್ದೀರಾ? ನಿಮ್ಮ ಡ್ಯಾಶ್ಬೋರ್ಡ್ನಲ್ಲಿರುವ API ಕನ್ಸೋಲ್ ನಿಮ್ಮ ನೈಜ ಸಂಸ್ಥೆಯ ID ಮತ್ತು ನಿಮ್ಮ ಸ್ವಂತ ಕೀಲಿಯನ್ನು ಭರ್ತಿ ಮಾಡುತ್ತದೆ, ಮತ್ತು ಲೈವ್ API ವಿರುದ್ಧ ವಿನಂತಿಯನ್ನು ರನ್ ಮಾಡುತ್ತದೆ ಆದ್ದರಿಂದ ನೀವು ನಿಜವಾದ ಪ್ರತಿಕ್ರಿಯೆಯನ್ನು ನೋಡಬಹುದು. API ಕನ್ಸೋಲ್ನಲ್ಲಿ ಈ ಎಂಡ್ಪಾಯಿಂಟ್ ತೆರೆಯಿರಿ
ವಿವರಗಳು
Sets the mandate's account-wide `role`, demoting whichever method held that slot. A method that is not usable (unconfirmed, revoked, or past its printed expiry) is rejected with 422 rather than silently accepted — the customer must not believe their renewals are covered when they are not. Nominating the current primary as backup (or the reverse) **swaps** them atomically, so the account is never left holding two of one slot and none of the other. Promoting a method that currently has **no role** demotes the outgoing primary to `backup` when — and only when — the backup slot is empty (owner ruling 2026-08-24, #3798). A backup the customer nominated deliberately is never overwritten; the outgoing primary simply loses its role, as before. Without this the account could end up with a primary and no fallback without being told, and the automatic backup-on-decline charge could not fire. ⛔ This operation described a field named `is_default` until 2026-08-25. No such field has existed since roles replaced it — the request schema has required `role` throughout — so the published description named a parameter no client could send (D13613).
ಪ್ಯಾರಾಮೀಟರ್ಗಳು
| ಹೆಸರು | ಪ್ರಕಾರ | ಅಗತ್ಯವಿದೆ | ಏನಿದು |
|---|---|---|---|
paymentMethodId (path) | string | ಹೌದು | The stored payment method's id. |
ಅನ್ವಯದ ದೇಹ
| ಹೆಸರು | ಪ್ರಕಾರ | ಅಗತ್ಯವಿದೆ | ಏನಿದು |
|---|---|---|---|
role | string<, primary, backup> | ಹೌದು | Nominate this mandate as the account's `primary` or `backup`, or send `""` to clear its role. Roles are **account-wide**: promoting a method demotes whichever method held that s… |
ಪ್ರತಿಕ್ರಿಯೆ
| ಹೆಸರು | ಪ್ರಕಾರ | ಅಗತ್ಯವಿದೆ | ಏನಿದು |
|---|---|---|---|
id | string | ಹೌದು | — |
gateway | string<stripe, paypal> | ಹೌದು | The rail holding the mandate. Crypto (NOWPayments) is absent by design — it has no mandate primitive, so those customers are invoiced ahead rather than rebilled (ADR 0011 §6). |
status | string<pending, active, expired, revoked> | ಹೌದು | Only `active` is chargeable; `pending` means the gateway has not confirmed it yet. |
role | string<, primary, backup> | ಹೌದು | Which job this mandate does for the **organisation**. `primary` is charged first; `backup` is charged immediately if the primary declines; `""` is simply stored. ⛔ Replaced `is_… |
removal_blocked_by | string<, subscription, adhoc_charge, reseller_programme> | ಹೌದು | Empty when this method may be removed. Otherwise the obligation that keeps the **floor** binding: this is the account's last operational way to pay and the named thing is still… |
method_type | string | ಹೌದು | The gateway's own name for what kind of mandate this is — Stripe's `PaymentMethod.type` (`card`, `sepa_debit`, `klarna`, `kakao_pay`, …). Empty on a rail that does not type its… |
can_auto_renew | boolean | ಹೌದು | Whether this mandate can be charged **off-session**, i.e. whether a renewal can be taken without the customer present. `false` means the subscription renews **manually**: the cu… |
brand | string | ಹೌದು | — |
last4 | string | ಹೌದು | — |
exp_month | integer | ಇಲ್ಲ | — |
exp_year | integer | ಇಲ್ಲ | — |
holder_name | string | ಇಲ್ಲ | — |
confirmed_at | string | ಇಲ್ಲ | When the gateway confirmed the mandate. Null while `pending`. |
created_at | string | ಹೌದು | — |
ಈ ಎಂಡ್ಪಾಯಿಂಟ್ ಹಿಂತಿರುಗಿಸಬಹುದಾದ ದೋಷಗಳು
401 · 403 · 404 · 422