Cobre um cartão em uma única etapa
Autorize e capture um pagamento em uma única requisição. Use para bens digitais ou qualquer pedido que você cumpre de imediato.
POST /payment/purchase autoriza e captura fundos em uma única ida e volta. Use quando você pode cumprir o pedido de imediato — bens digitais, assinaturas SaaS ou varejo com estoque. Para bens físicos que são enviados depois, considere Authorize + Capture para reter fundos até o cumprimento sem liquidar antes da hora.
A forma completa da requisição e da resposta — cada campo de card/shopper/amount, os valores de status e o detalhe de refusalCode/actionRequired/token — está documentada nos painéis de parâmetros e resposta acima (gerados a partir da especificação da API).
id da resposta é o UUID de pagamento do Therius — guarde-o, é o identificador para uma chamada posterior a Refund ou Cancel or Refund. paymentCode (p. ex. "PC-1234567890") é uma referência separada para conciliação, suporte e Inquiry — não é aceito para reembolso/cancelamento.Exemplos
Cobrar um cartão
amount.value está sempre em unidades menores. 1999 = $19.99 para USD (exponent 2). 5000 = ¥5000 para JPY (exponent 0). Use sempre o campo exponent para determinar a posição decimal.status for "pending_3ds", redirecione o titular do cartão para actionRequired.url para concluir o desafio 3D Secure. Assim que ele terminar, chame POST /payment/resume com o sessionId da resposta pending_3ds para continuar. Se você usa o SDK JS do Therius, chame sdk.handleAction(result.actionRequired) — ele trata o redirecionamento e o resume automaticamente.Autorizações
Your secret API key: Bearer prv_production_xxx (production) or Bearer prv_sandbox_xxx (sandbox).
Cabeçalhos
A UUID you generate per operation. Required in production. Retrying with the same key returns the original response.
Corpo
Your merchant account identifier. Validated against the Bearer key's merchant; required if the key maps to more than one merchant account.
Your internal order reference. Must be unique per merchant — use it to correlate Therius payments with your own records.
Card input for one-off payments: exactly one instrument (cardData / nonceData / tokenData) plus optional stored-credential and installment modifiers.
- Raw card (PCI DSS)
- SDK nonce
- Vault token
Alternative payment method data — use instead of card for APMs such as Pix, ACH or Boleto. Structure varies by method.
Payment method code. Omit for card payments; for APMs pass the code, e.g. pix, ach, boleto.
Shopper information. Required when tokenizing a card (card.<instrument>.tokenize: true).
Per-payment webhook URL override (HTTPS only). Therius posts the final payment status here when it changes asynchronously.
Pin this payment to a specific gateway connection. Omit to use your routing rules.
Cardholder's IP address, passed to fraud scoring when available.
Arbitrary string key/value pairs, echoed back in webhook payloads.
Resposta
Payment processed
The Therius payment id. Returned by POST /payment/authorization and POST /payment/purchase; use it as the {id} path segment for capture, refund, cancel and cancel_or_refund.
"9f8b2c1e-4d5a-6b7c-8d9e-0f1a2b3c4d5e"
captured - funds settled; authorized - funds reserved, call capture to settle; declined - issuer declined, see refusalCode; pending_3ds - a 3DS challenge is required, see actionRequired; pending_action - an external action (redirect, voucher) is required, see actionRequired; failed - processing error unrelated to the issuer; cancelled - authorization voided; refunded - captured funds returned.
captured, authorized, declined, pending_3ds, pending_action, failed, cancelled, refunded Therius receipt ID, for reconciliation, support and Inquiry. NOT the handle for capture/refund/cancel — use id for that.
"PC-1234567890"
Your orderCode, echoed back.
Your merchantCode, echoed back.
Issuer authorization code on an approved payment. The field name is misspelled on the wire (no h) - this is intentional and stable.
Payment method used, e.g. card, pix, ach.
Code of the gateway connection that processed the payment.
Display name of the gateway connection that processed the payment.
Card details from the response: masked PAN, brand, type, and the network transaction/reference IDs to cite on future MIT charges.
Alternative-payment-method details (redirect URL, QR code, barcode) when paymentMethod is an APM.
Present when the card was tokenized (tokenize: true).
Present when status is pending_3ds or pending_action. Describes what the cardholder must do next — with the Therius JS SDK, pass the whole object to sdk.handleAction().
Present when status is declined. See the Declined Payments concept page for the full code table and how to react to each recoveryAction.

