POST /v1/payments/{paymentId}/refund.
What can be refunded
The eligibility rules are enforced server-side when you callPOST /v1/payments/{paymentId}/refund. The payment detail response does not
carry an eligibility field: an ineligible payment is reported by the refund
call itself.
A refund issued for a non-eligible payment returns a
400 with one of the
codes above.
Issue a refund
Send noamount to refund the full payment, or an amount between 0.01 and
the payment amount for a partial refund. A payment can be refunded once, fully
or partially: after a partial refund, the rest of the payment cannot be
refunded.
Partial refunds are conditional: they require a payment that has already settled
and a processing route that supports them. When either condition is missing
the request fails with PARTIAL_REFUND_NOT_SUPPORTED and the payment stays
fully refundable. A full refund is always available on a refundable payment.
Refunds on split payments
When the payment carries splits, the refund is apportioned: every party is debited in proportion to what it received, the originating company included. A partial refund uses the same proportions as a full one. A recipient that has already withdrawn its share goes negative. The shortfall is never moved onto the originating company, andINSUFFICIENT_BALANCE_FOR_REFUND is evaluated against the originating
company’s share only — a recipient never blocks a refund. When a debit lands on
a share that is still in the recipient’s rolling reserve, that payment’s reserve
hold is released first and the debit is written against it.
A PIX MED freezes each party’s proportional share the same way.
Fees on refunds, MED and chargebacks
A refund you issue debits your balance net of the processing fee: the fee is returned in proportion to the refunded amount, except in the case described in refunds below a redeemed rewards prize. A PIX MED that returns funds, a chargeback and a refund YuvexPay makes after a refund request from the payer debit the full amount returned to the payer, and the processing fee is not returned. On a split payment the debit of a PIX MED or a chargeback is apportioned across the parties the same way. If the card dispute is won, the amount debited for the chargeback is credited back to your balance, the processing fee stays with YuvexPay, and the payment returns to the status it had before the chargeback:PAID, CONFIRMED, REFUNDED or PARTIAL_REFUND. On a split payment each party is credited back the
share it was debited. You are notified in the dashboard, and the payment’s
PAYMENT_PAID or PAYMENT_CONFIRMED webhook is sent again for its restored
status; a payment restored to REFUNDED or PARTIAL_REFUND sends no webhook.
A cardholder can still open a chargeback on a card payment you already
refunded. The chargeback is debited from your balance, even if it goes
negative, and YuvexPay contests it with the refund receipt. If the dispute is
won, the refunded part is credited back to your balance.
Refunds below a redeemed rewards prize
A refund you issue keeps the processing fee when your verified CPF or CNPJ has redeemed a rewards prize that YuvexPay approved, and the refund takes that document’s counted volume below the threshold of the highest such prize. The counted volume is the sum, across every company with that document, of the production payments that arePAID, CONFIRMED, PARTIAL_REFUND or
MED_FROZEN, net of what was refunded, once they are 30 days old for PIX and
boleto and 90 days old for card. In that case:
- Your balance is debited the full amount returned to the payer, and YuvexPay keeps the processing fee in proportion to the refunded amount.
INSUFFICIENT_BALANCE_FOR_REFUNDis still evaluated against the debit of a normal refund. The kept fee is debited on top of it and can take your available balance negative.- On a split payment, the kept fee is debited from the originating company only. The recipients are debited as in any other refund.
- If the refund fails at the underlying network, the whole amount, fee included, is returned to your balance.
Refunds requested by the payer
In production, the payer of a paid payment can ask for a refund on the purchase page YuvexPay shows them after they pay, for up to 90 days after the payment, or through YuvexPay support. Support finds the payment by the payer’s Pix receipt or YuvexPay purchase receipt (its end-to-end id, txid or transaction id, and the amount paid) or by the payer’s verified e-mail, records what was bought, whether it arrived, what is wrong and each contact the payer had with you, and opens the request when it meets YuvexPay’s criteria. Each payment gets one request, wherever it was made. You answer the request in the dashboard, under Vendas > Disputas > Reembolsos (Sales > Disputes > Refunds). A request opened by support shows the payer’s report: product, delivery, problem, contacts with you and your answer. Screenshots the payer sent stay with YuvexPay support; you see how many there are. There is no API to read or answer requests.- Approving a request issues a full refund exactly like
POST /v1/payments/{paymentId}/refund: the same eligibility rules, the same fees and the sameINSUFFICIENT_BALANCE_FOR_REFUNDcheck. With Aprovar automaticamente pedidos em até 7 dias (Approve requests within 7 days automatically) turned on under Configurações > Empresa, a request made within 7 days of the payment is approved without you. If its refund cannot be issued, for example for lack of balance, the request stays open. - If you refuse the request, do not answer it, or its refund fails, YuvexPay
support can take it over. As a last resort, YuvexPay can refund the payment
itself. That refund debits your balance the full amount returned to the
payer, and YuvexPay keeps the processing fee, as with a PIX MED or a
chargeback. It is not held back by
INSUFFICIENT_BALANCE_FOR_REFUND, so it can take your available balance negative. You are notified in the dashboard. - A payment with an open PIX MED or a chargeback cannot be refunded through a request, and an open request is closed when either is opened. A refund you issue yourself closes the open request of that payment once it completes.
PAYMENT_REFUNDED or
PAYMENT_REFUND_FAILED with the usual body, and an entry in
GET /v1/payments/{paymentId}/refunds. The webhook body has no reason; the
refund’s reason tells them apart:
Because these refunds do not go through your integration, your own
POST /v1/payments/{paymentId}/refund can meet one that is in progress
(REFUND_IN_PROGRESS) or already completed (ALREADY_REFUNDED). Update your
order from the webhook, not only from your own refund calls.
Refund lifecycle
A refund can be in one of these statuses:
Listen for
PAYMENT_REFUNDED and PAYMENT_REFUND_FAILED webhook events to
react to status changes.
Idempotency
SendingPOST /v1/payments/{paymentId}/refund requires an
X-Idempotency-Key header. Reusing the same key with the same body returns
the original response. Reusing the key with a different body returns
409 IDEMPOTENCY_PAYLOAD_MISMATCH.
While a refund is being processed for a given payment, additional refund
requests fail with 400 REFUND_IN_PROGRESS until the current refund settles.
If it completes, the payment cannot be refunded again. If it fails, you can
refund the payment again.
Listing refunds for a payment
reason is the one you sent with the refund, one of the two reasons in
Refunds requested by the payer, or null
when none was sent and on refunds that reached YuvexPay from the payment
network, such as the return of a PIX MED.

