Skip to main content

Refund Charge

Refund a previously paid PIX charge.

Base URLs​

EnvironmentURL
Productionhttps://api-pix.crypto2pay.app/v2/pix/refund
Sandboxhttps://sandbox-pix.crypto2pay.app/v2/pix/refund

Request​

POST /v2/pix/refund

Headers​

HeaderValue
AuthorizationYOUR_API_KEY
Content-Typeapplication/json

Body Parameters​

ParameterTypeRequiredDescription
idintegerrequiredInternal charge ID

Example Request​

curl -X POST https://api-pix.crypto2pay.app/v2/pix/refund \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": 59276
}'

Success Response (200)​

{
"id": 59276,
"transaction_id": "12345678933",
"status": 4,
"currency": "BRL",
"amount": 145,
"refund_status": "processing"
}

Response Fields​

FieldTypeDescription
idintegerInternal charge ID
transaction_idstringYour platform's transaction identifier
statusintegerCharge status (4 = Refunded)
currencystringTransaction currency
amountnumberRefunded amount
refund_statusstringCurrent refund processing status (processing)

Error Responses​

StatusDescription
404Charge not found — no charge exists with the provided id
400Charge must be paid to be refunded — the charge has not been paid
400Charge already refunded — a refund has already been issued for this charge