POST /payment aplica à sua empresa: se o 3DS está ligado, o valor mínimo a partir do qual ele é exigido e qual SDK carregar.x-api-key usado em POST /payment.GET /payment/tds-token, este endpoint não gera token no autenticador. Pode ser chamado mesmo quando o 3DS está desligado.{
"threeDsEnabled": true,
"threeDsMinAmountInCents": 5000,
"threeDsProvider": "STONE"
}| Campo | Tipo | Descrição |
|---|---|---|
threeDsEnabled | boolean | true quando o pagamento com cartão da sua empresa exige 3DS. |
threeDsMinAmountInCents | number | null | Valor mínimo, em centavos, a partir do qual o 3DS é eabled: true` significa que o 3DS é exigido em qualquer valor. |
threeDsProvider | "STONE" | "BRASPAG" | null | SDK que deve ser carregado no navegador. |
{
"threeDsEnabled": false,
"threeDsMinAmountInCents": null,
"threeDsProvider": null
}threeDsEnabled && (threeDsMinAmountInCents === null || valorTotal >= threeDsMinAmountInCents)valorTotal é o total cobrado no POST /payment, em centavos.GET /payment/tds-token.threeDsProvider.creditCard.threeDsAuthentication no POST /payment.POST /payment responde 400 com COMPANY_E028.creditCardToken (cartão já salvo) nunca exige 3DS.| Código | Motivo |
|---|---|
401 | API key ausente ou inválida |
403 | API key revogada |
404 | COMPANY_E002: a empresa da API key não existe mais |
curl --location 'https://api.bestfy.io/payment/three-ds-configuration' \
--header 'User-Agent: <nome-do-projeto>' \
--header 'x-api-key: <api-key>' \
--header 'x-end-user-ip: <ip-do-usuário>' \
--header 'Content-Type: application/json'{
"threeDsEnabled": true,
"threeDsMinAmountInCents": 5000,
"threeDsProvider": "STONE"
}