Skip to main content
Create a partial or full PIX refund for an inbound payment owned by the authenticated target account.

Endpoint

POST /v3/refunds/pix

Authentication and target

Use an account credential for its bound account, or a user credential with both X-ISPB and X-Account-Number. If an account credential sends those headers, both must be present and must match its bound account. Platform credentials are not accepted. All requests require the standard HMAC-SHA256 headers. The route also enforces the applicable active-user and REFUND scene checks. The curl example below uses an ACCOUNT credential bound to the operated account, so it omits X-ISPB and X-Account-Number. If X-Client-ID identifies a USER credential, add both target headers and include their exact trimmed values in the canonical header set before calculating X-Signature.

Request body

Success data

The new refund identifiers, merchant order ID, decimal-string amount, and numeric transaction status. A newly accepted refund starts at status 1 (PENDING).

Behavior and validation

The original payment must be an inbound PIX payment owned by the selected payee account, remain refundable, and be no more than 90 days old. The service fixes the internal refund type to payee-request and reason code to MD06. Creation is asynchronous: 1 PENDING5 PROCESSING2 COMPLETED or 3 FAILED. The merchant order ID is protected by a 48-hour Redis idempotency record. Reusing it returns business code 4001013.

Errors

Every call can fail for missing or invalid signature headers, an expired timestamp, nonce replay, an invalid body hash or signature, insufficient permission, or a downstream service error. Endpoint-specific errors include:
  • 4000 for a missing settlement ID, merchant order ID, or amount.
  • 4002 for an invalid amount or merchant-order format; 400 when its date is stale.
  • 4001013 when the merchant order ID was already processed.
  • 4003003 when the original payment is missing or inaccessible; 4003005 for refund eligibility or processing rejection; 4001999 when the requested amount exceeds the refundable amount.

Example request

Example response