Estornos
Estornar um Pix
Devolva um Pix que você recebeu, no valor cheio ou em parte. O estorno entra como pendente na hora e a PayZu confirma a conclusão depois por webhook.
Autorização
BearerAuth AutorizaçãoBearer <token>
Em: header
Parâmetros de path
transactionId*string
ID da transação a estornar.
Corpo da requisição
application/json
Definições TypeScript
Use o tipo request body no TypeScript.
Corpo da resposta
application/json
application/json
curl --request POST \ --url 'https://api.payzu.processamento.com/v1/refund/PAYZU2025081418333632CYKN8M' \ --header 'Authorization: Bearer $PAYZU_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "amount": 30.5, "description": "Estorno solicitado pelo cliente", "clientReference": "refund-2026-0001"}'const url = 'https://api.payzu.processamento.com/v1/refund/PAYZU2025081418333632CYKN8M';const response = await fetch(url, { method: 'POST', headers: { Authorization: `Bearer ${process.env.PAYZU_TOKEN}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ amount: 30.5, description: 'Estorno solicitado pelo cliente', clientReference: 'refund-2026-0001' }),});const data = await response.json();console.log(data);import osimport requestsresponse = requests.post( 'https://api.payzu.processamento.com/v1/refund/PAYZU2025081418333632CYKN8M', headers={ 'Authorization': f'Bearer {os.environ["PAYZU_TOKEN"]}', 'Content-Type': 'application/json', }, json={ 'amount': 30.5, 'description': 'Estorno solicitado pelo cliente', 'clientReference': 'refund-2026-0001' },)print(response.json()){
"id": "PAYZU20250810120000ABCD12",
"status": "COMPLETED",
"amount": 100,
"type": "DEPOSIT",
"method": "PIX",
"qrCodeText": null,
"qrCodeBase64": null,
"qrCodeUrl": null,
"generatedName": "Fulano de Tal",
"generatedDocument": "12345678901",
"generatedEmail": null,
"payerName": "Fulano de Tal",
"payerDocument": "12345678901",
"payerInstitutionIspb": "12345678",
"payerInstitutionName": "Banco X",
"payerAccountNumber": null,
"serviceFeeCharged": 1.5,
"withdrawPixKey": null,
"withdrawPixType": null,
"receiverName": "Loja Exemplo",
"receiverDocument": "11222333000181",
"receiverInstitutionIspb": "00000000",
"receiverInstitutionName": "PayZu",
"receiverAccountNumber": "513579",
"endToEndId": "E12345678202508101200abcdef01",
"clientReference": "pedido-42",
"refundEndToEndId": null,
"refundAmount": 30.5,
"refundStatus": "PENDING",
"refundReason": "CUSTOMER_REQUEST",
"refundDescription": "Devolução parcial",
"refundedAt": null,
"cancellationReason": null,
"paidAt": "2025-08-10T12:00:00.000Z",
"createdAt": "2025-08-10T11:59:00.000Z",
"updatedAt": "2026-08-11T09:00:00.000Z"
}