Skip to main content
POST
/
v1
/
refunds
/
{refund_id}
/
unblock
Unblock a Pix Refund
curl --request POST \
  --url https://plugin-pix-indirect.api.lerian.net/v1/refunds/{refund_id}/unblock \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Account-Id: <x-account-id>' \
  --data '
{
  "allowNotFoundUnblock": false
}
'
{
  "refund": {
    "id": "019c96a0-0c53-7a8d-8e29-67971d96d0e3",
    "originalEndToEndId": "E123456789BR1234567890123456789",
    "returnEndToEndId": "D123456789BR1234567890123456789",
    "amount": "100.00",
    "status": "COMPLETED",
    "reason": "FR01",
    "createdAt": "2024-01-15T10:30:00Z"
  },
  "btgStatus": "CONFIRMED",
  "message": "Reversal successfully unblocked."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Account-Id
string
required

Unique identifier of the Midaz Ledger Account (UUID format).

Path Parameters

refund_id
string
required

Unique identifier of the refund request (UUID format).

Body

application/json
allowNotFoundUnblock
boolean
default:false

Opts into the not-found resolution path for CASHOUT refunds. When true and BTG reports the reversal as absent (404), the refund is resolved as FAILED (with idempotent Midaz revert and client webhook) instead of returning a provider error.

Response

Refund unblock processed successfully.

refund
object
required
btgStatus
string

Status retrieved from BTG (for transparency).

Example:

"CONFIRMED"

message
string

Additional context about the unblock result.

Example:

"Reversal successfully unblocked."