billing
POST /v1/payment-methods
Begin adding a payment method (on-session).
Autenticazione
Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione billing.payment.manage; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.
L'ID della tua organizzazione va qui
Questo endpoint accetta org_id come campo nel corpo JSON.
L'identificativo della tua organizzazione si trova nella schermata delle chiavi API nella tua dashboard, accanto alla chiave stessa. È lo stesso identificativo in ogni chiamata che effettui.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.
curl -X POST https://api.zinndigital.com/v1/payment-methods \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
Opens a gateway SetupIntent and returns its short-lived `client_secret` for the browser SDK to confirm, completing 3-D Secure there. **No payment method is created by this call** — a mandate is consent, and the row is written only when the gateway confirms it on its webhook (ADR 0011 §3). Requires `billing.payment.manage` in the target organization.
Corpo della richiesta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
org_id | string | No | Organization to attach the mandate to. The caller must hold `billing.payment.manage` in **that** organization. |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
setup_intent_id | string | Sì | — |
client_secret | string | Sì | — |
Errori che questo endpoint può restituire
401 · 403 · 422 · 429