Saltar para o conteúdo principal
POST
POST /payment/authorization reserva fundos na conta do titular do cartão sem liquidá-los. A retenção de autorização costuma ser válida por 7 dias, embora a janela exata dependa do adquirente e da rede de cartão. Chame Capture para liquidar os fundos quando você estiver pronto para cumprir, ou Cancel para liberar a retenção se você não puder cumprir o pedido. Veja a referência de Purchase para a descrição completa dos campos de card/shopper/resposta — a forma da requisição e da resposta é idêntica, só muda o resultado (uma retenção em vez de uma cobrança liquidada).
A captura parcial é suportada. Quando você chama Capture, você pode passar um amount menor ou igual ao valor autorizado. Por exemplo, se você autorizou $99.00 mas enviou apenas $75.00 em bens, capture $75.00 e a retenção restante é liberada automaticamente.
As retenções de autorização expiram — normalmente após 7 dias, mas isso varia conforme o adquirente e a rede de cartão. Se você não chamar Capture antes do vencimento, a retenção é liberada e você precisará autorizar novamente. Monitore a idade da retenção no seu sistema de gestão de pedidos.

Autorizações

Authorization
string
header
obrigatório

Your secret API key: Bearer prv_production_xxx (production) or Bearer prv_sandbox_xxx (sandbox).

Cabeçalhos

Idempotency-Key
string<uuid>

A UUID you generate per operation. Required in production. Retrying with the same key returns the original response.

Corpo

application/json
merchantCode
string
obrigatório

Your merchant account identifier. Validated against the Bearer key's merchant; required if the key maps to more than one merchant account.

orderCode
string
obrigatório

Your internal order reference. Must be unique per merchant — use it to correlate Therius payments with your own records.

amount
object
obrigatório
paymentMethod
object
obrigatório

The payment instrument/method to charge. Always required.

Exemplo:
shopper
object

Shopper information. Required when tokenizing a card (card.<instrument>.tokenize: true).

webhookUrl
string

Per-payment webhook URL override (HTTPS only). Therius posts the final payment status here when it changes asynchronously.

connectionId
string

Pin this payment to a specific connection by its opaque id (as returned by POST /payment/bank-options). Takes precedence over connectionCode. Omit to use your routing rules.

connectionCode
string

Pin this payment to a specific gateway connection. Omit to use your routing rules.

ipAddress
string

Cardholder's IP address, used for fraud scoring and by some providers. If you omit it, Therius uses the address of the connecting client, which is your server when you call from a backend, so send the shopper's real IP in that case.

metadata
object

Arbitrary string key/value pairs, echoed back in webhook payloads.

lineItems
object[]

Shared, request-level line items (description, quantity, line total). On a card payment they also supply the Level 3 breakdown when commercialData is sent. Used by BNPL providers for credit scoring and generic across every Adyen bank-redirect method, not method-specific -- a sibling of paymentMethod, never nested inside it.

billingAddress
object

Shared, request-level billing address used by APM methods that need one (e.g. Boleto, Efecty).

deliveryAddress
object

Shared, request-level delivery address used by BNPL providers for fraud scoring.

commercialData
object

Opt in to Level 2/3 card data (customer reference, tax, freight, ship-to and, with lineItems that carry unitAmount, the per-line breakdown). Card payments only. See the Level 2 and 3 card data guide.

Resposta

200 - application/json

Authorization result

id
string<uuid>

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.

Exemplo:

"9f8b2c1e-4d5a-6b7c-8d9e-0f1a2b3c4d5e"

status
enum<string>

The payment's current status, composed from its lifecycle, its refunds and its disputes. pending - not final, see subStatus and actionRequired; authorized - funds reserved, call capture to settle; captured - funds settled (a partly refunded or partly disputed payment stays captured, see subStatus, refund and dispute); refunded - the whole captured amount was refunded; canceled - voided before capture or canceled before the shopper paid; refused - issuer or acquirer refused, see refusalCode; expired - the authorization or payment window passed; error - processing error; in_dispute - a chargeback covering everything captured is open; chargeback - a chargeback covering everything captured was lost.

Opções disponíveis:
pending,
authorized,
captured,
refunded,
canceled,
refused,
expired,
error,
in_dispute,
chargeback
subStatus
enum<string>

A finer reading of status. Absent when the status needs no detail. See the Payment Lifecycle concept page for the pairs.

Opções disponíveis:
created,
awaiting_3ds,
awaiting_customer,
awaiting_payment,
awaiting_provider,
fraud_review,
voided,
authorization_expired,
payment_window_expired,
partially_captured,
partially_refunded,
dispute_won,
partially_disputed,
partially_charged_back,
fully_refunded,
chargeback_open,
lost
paymentCode
string

Therius receipt ID, for reconciliation, support and Inquiry. NOT the handle for capture/refund/cancel — use id for that.

Exemplo:

"PC-1234567890"

orderCode
string

Your orderCode, echoed back.

merchantCode
string

Your merchantCode, echoed back.

autorizationCode
string

Issuer authorization code on an approved payment. The field name is misspelled on the wire (no h) - this is intentional and stable.

paymentMethod
string

Payment method used, e.g. card, pix, ach.

connectionCode
string

Code of the connection that processed the payment. Omitted for payfac merchants.

connectionName
string

Display name of the gateway connection that processed the payment.

amount
object
card
object

Card details from the response: masked PAN, brand, type, and the network transaction/reference IDs to cite on future MIT charges.

apm
object

Alternative-payment-method details (redirect URL, QR code, barcode) when paymentMethod is an APM.

token
object

Present when the card was tokenized (tokenize: true).

actionRequired
object

Present when status is pending and the shopper must act (subStatus awaiting_3ds or awaiting_customer). Describes what the cardholder must do next — with the Therius JS SDK, pass the whole object to sdk.handleAction().

refusalCode
object

Present when status is refused. See the Declined Payments concept page for the full code table and how to react to each recoveryAction. For alternative payment methods reasonCode is an APM_* code.