billing
GET /v1/billing/payment-preferences
How this account intends to pay.
Autenticação
Envie uma chave de API como um token bearer. Este endpoint não especifica uma permissão específica na documentação, portanto, conceda à sua chave o mínimo necessário e verifique a resposta em vez de assumir.
Onde vai o ID da sua organização
Este endpoint aceita org_id como parâmetro de consulta. Omita-o e a chamada abrangerá toda a sua subárvore de locatários; envie-o para restringir a chamada a uma única organização.
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 GET https://api.zinndigital.com/v1/billing/payment-preferences \
-H "Authorization: Bearer zdk_live_…"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
The crypto election, the nominated primary/backup, and the two derived answers a billing screen must not compute for itself: whether the account can be charged unattended at all, and whether its backup could actually catch the primary's decline. ⛔ Deliberately **not** part of `GET/PUT /v1/billing/profile`, even though it reads and writes the same row. That endpoint is a documented **full replace**, so folding the crypto election into it would mean a customer correcting a typo in their billing address silently switched their account off crypto — surfacing a month later as an unpaid invoice, with nothing in between to notice it.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
org_id (query) | Uuid | Não | The organization to read. Omitted or empty means the caller's own. |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
org_id | string | Sim | — |
pays_by_crypto | boolean | Sim | 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 | Sim | The mandate charged first, or `null` if none is nominated or usable. |
backup_payment_method_id | string | Sim | The mandate charged if the primary declines. |
auto_renew_possible | boolean | Sim | 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 | Sim | 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 gate… |
Erros que este endpoint pode retornar
401 · 403