billing

PATCH /v1/payment-methods/{paymentMethodId}

Nominate a stored payment method as primary or backup.

모든 billing 엔드포인트

인증

Bearer 토큰으로 API 키를 전송하세요. 이 엔드포인트는 명세에 특정 권한을 명시하지 않으므로, 가정하기보다는 키에 필요한 최소한의 권한을 부여하고 응답을 확인하세요.

이 엔드포인트는 조직 ID를 받지 않습니다. 사용자의 키가 이미 속한 조직을 식별하며, 응답은 해당 조직으로 한정됩니다.

무료 체험하기

대괄호 안에 있는 모든 내용을 사용자 지정 값으로 바꾸고, 키 플레이스홀더는 대시보드의 키로 바꾸세요.

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)stringThe stored payment method's id.

요청 본문

이름유형필수설명
rolestring<, 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…

응답

이름유형필수설명
idstring
gatewaystring<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).
statusstring<pending, active, expired, revoked>Only `active` is chargeable; `pending` means the gateway has not confirmed it yet.
rolestring<, 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_bystring<, 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_typestringThe 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_renewbooleanWhether 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…
brandstring
last4string
exp_monthinteger아니요
exp_yearinteger아니요
holder_namestring아니요
confirmed_atstring아니요When the gateway confirmed the mandate. Null while `pending`.
created_atstring

이 엔드포인트가 반환할 수 있는 오류

401 · 403 · 404 · 422