Forgedocs

Request refund of received payment (Refund-In)

POST /api/pix/refund-in/{id}

Requests a refund of a received PIX payment. The refund can be partial or full, as long as it is within the 89-day deadline.

Authentication

Requires a Bearer token in the Authorization header.

Path Parameters

ParameterTypeRequiredDescription
idstringYesID of the original transaction to be refunded

Request Body

FieldTypeRequiredDescription
refundValuenumberYesAmount to be refunded in BRL (can be partial). Minimum: 0.01
reasonstringNoReason for the refund
externalIdstringNoExternal ID for identifying the refund. In the BACEN API, this corresponds to the id URL parameter
{
  "refundValue": 50.00,
  "reason": "Cliente solicitou devolução",
  "externalId": "D123456789"
}

Response (201)

FieldTypeDescription
transactionIdstringID of the generated refund transaction
externalIdstringExternal ID of the refund transaction
statusstringCurrent refund transaction status (PENDING, CONFIRMED, ERROR)
refundValuenumberRefund amount in BRL
providerTransactionIdstringProvider transaction ID (used for correlation with webhooks)
generateTimestringRefund transaction generation date/time (ISO 8601)
{
  "transactionId": "789",
  "externalId": "D123456789",
  "status": "PENDING",
  "refundValue": 50.00,
  "providerTransactionId": "7ef4fc3f-a187-495e-857c-e84d70612761",
  "generateTime": "2024-01-15T10:30:00.000Z"
}

Errors

StatusDescription
400Invalid data, transaction not found, deadline exceeded, or invalid amount
401Missing or invalid token
404Parent transaction not found
500Error processing refund request

On this page