POST /v1/payments endpoint that creates payments across
three methods (PIX, CARD, BOLETO) and two presentation modes (headless
and hosted).
Methods at a glance
Pick
headless when you want to render the payment yourself; pick hosted
when you want YuvexPay to render the checkout, including method selection.
Amounts and currency
- All amounts are in BRL as decimal numbers (e.g.
49.90), not cents. - The minimum chargeable amount is
R$ 0.01. The maximum isR$ 1,000,000.00. - Card payments currently require
installments: 1(a single installment). Larger card transactions must be sent through the hosted multi-installment flow.
Identifiers
Every payment has two identifiers:id— an internal UUID. Use it as the path parameter forGET /v1/payments/{paymentId}andPOST /v1/payments/{paymentId}/refund.txId— a stable, prefixed transaction id (PAY+ 32 hex characters) that identifies the payment across logs, reports and the dashboard.
externalId on creation — typically your own order id —
which is stored on the payment for cross-referencing. externalId is unique
per company and environment.
Lifecycle
Listen for the corresponding webhook events to react to
status changes asynchronously.
Headless PIX
Headless PIX is the simplest flow. Create the payment, render the QR code or copy-paste string, and listen forPAYMENT_PAID:
methodData.pixCopyPaste (the BR-Code string) and
methodData.qrCodeBase64 (a data URI). Render either to the payer.
Headless direct credit card
Direct card payments charge the card immediately on creation. The payer never leaves your UI, but you assume PCI scope: card data flows through your servers.methods: ["CARD"] (a single method),
installments: 1, and require card.holderInfo and card.remoteIp. For
multi-method or multi-installment card flows, use the hosted checkout.
Hosted checkout
Setmode: "hosted" to receive a checkoutUrl. Redirect the payer there;
YuvexPay handles method selection, card capture and PIX rendering.
returnUrlis where YuvexPay sends the payer if they abandon the checkout.completionUrlis where YuvexPay redirects after a successful payment.
PENDING_METHOD_SELECTION until the payer picks a
method, then transition through the same lifecycle as a headless payment.
Fees and net amount
Each payment response includes:amount— the gross amount charged to the payer.feeAmount— the YuvexPay processing fee.netAmount— the amount credited to your balance once the payment settles.
passFeeToPayer: true shifts the fee onto the payer (the payer is charged
amount + feeAmount); when false, the fee is deducted from amount.
Pagination and filtering
GET /v1/payments supports the standard page (default 1) and limit
(default 20, max 100) parameters along with these filters:
status— filter byPaymentStatus.method— filter byPIX,CARDorBOLETO.startDate/endDate— ISO 8601 date or date-time bounds.minAmount/maxAmount— decimal BRL bounds.environment—SANDBOXorPRODUCTION(defaults to the API key’s environment).
Receipts
Once a payment isPAID or REFUNDED, you can fetch a printable receipt:

