billing
POST /v1/payment-methods
Begin adding a payment method (on-session).
Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão billing.payment.manage; uma chave sem ela é recusada com 403, e não 404.
Onde vai o ID da sua organização
Este endpoint aceita org_id como um campo no corpo JSON.
O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
curl -X POST https://api.zinndigital.com/v1/payment-methods \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
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 da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
org_id | string | Não | Organization to attach the mandate to. The caller must hold `billing.payment.manage` in **that** organization. |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
setup_intent_id | string | Sim | — |
client_secret | string | Sim | — |
Erros que este endpoint pode retornar
401 · 403 · 422 · 429