Skip to content

PIX Refund

Initiates a refund (total or partial) of a received PIX transaction.

Endpoint

POST /api/v2/external/pix/refund

Headers

HeaderTypeRequiredDescription
AuthorizationStringYesBearer {access_token}
Content-TypeStringYesapplication/json
hmacStringYesHMAC-SHA512 signature of the body (learn more)

Request Body

FieldTypeRequiredDescriptionExample
transaction_idStringYesID of the original received PIX transaction"PIXIN20260307a1b2c3d4e5f6"
amountIntegerNoAmount to refund in cents. If omitted, refunds the full amount.5000 (BRL 50.00)
reasonStringYesBACEN refund code (see table below)"MD06"

Partial refund

For partial refunds, provide an amount less than the original value. The total of all refunds for a single transaction cannot exceed the original amount received.

Refund Codes

CodeDescription
MD06Refund by agreement between parties
BE08Fraud
AM09Incorrect amount
SL02Settlement error
RR04Unrecognized transaction

Example

bash
BODY='{"transaction_id":"PIXIN20260307a1b2c3d4e5f6","amount":10000,"reason":"MD06"}'
HMAC=$(echo -n "$BODY" | openssl dgst -sha512 -hmac "$CLIENT_SECRET" | awk '{print $2}')

curl -X POST https://api.owem.com.br/api/v2/external/pix/refund \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "hmac: $HMAC" \
  -d "$BODY"

Success Response (200)

json
{
  "worked": true,
  "refund_id": "PIXRET20260307a1b2c3d4e5f6",
  "transaction_id": "PIXIN20260307a1b2c3d4e5f6",
  "amount": 10000,
  "status": "processing"
}
FieldTypeDescription
workedBooleantrue indicates operation success
refund_idStringUnique refund identifier
transaction_idStringOriginal transaction ID
amountIntegerRefund amount in cents
statusStringInitial status: processing

Error Response (404)

json
{
  "worked": false,
  "detail": "Original transaction not found"
}

Error Response (422)

json
{
  "worked": false,
  "detail": "Insufficient balance for refund"
}

Error Response (422) -- Amount exceeded

json
{
  "worked": false,
  "detail": "Refund amount exceeds the original transaction amount"
}

Refund deadline

Refunds with code MD06 (agreement) can be made up to 90 days after receipt. Fraud refunds (BE08) follow the MED deadlines defined by BACEN.

Owem Pay Instituição de Pagamento — ISPB 37839059