Skip to main content
A refund returns funds to the payer’s source of funds. The money comes out of your YuvexPay balance — or, when the payment carries splits, out of every party’s balance in proportion to what it received. Refunds are issued via POST /v1/payments/{paymentId}/refund.

What can be refunded

The eligibility rules are enforced server-side and surfaced in the payment detail response under refundEligibility. A refund issued for a non-eligible payment returns a 400 with one of the codes above.

Issue a refund

Send no amount to refund the full remaining balance, or an amount between 0.01 and the remaining refundable amount for a partial refund. Partial refunds are conditional: they require a payment that has already settled and a routing provider 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.
The response contains the refund record:

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, and INSUFFICIENT_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.

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

Sending POST /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 409 REFUND_IN_PROGRESS until the current refund settles.

Listing refunds for a payment

Returns every refund that has been attempted or completed against a payment, in chronological order. Useful for reconciling refund flows or showing a history to your operations team.

Common error codes