API Reference
Log In
API Reference

Pix refund received Webhook

šŸ“˜

To learn more about webhooks in our API, follow the link below:

About Webhooks

In the event of a refund when a Pix is credited to your account, the best way to receive this information is using the webhook PIX_REFUNDED. As soon as a refund is received in your account, aPIX_REFUNDED weboohk is sent.

Here's the simplest way to configure a PIX_REFUNDED webhook:

Headers

NameDescription
x-delbank-api-keyRequired. API key

Body

{
  "eventType": "PIX_REFUNDED",
  "url": "https://example.com.br/webhooks/v1/pixrefundreceived", // Add your own URL here
  "authorization": "NONE,
  "authorizationScheme": "NONE"
}

Now once a Pix is refunded and credited to your account here's what you are going to receive on the registered URL:

PIX_REFUNDED

{
	"eventType": "PIX_REFUNDED",
	"endToEndId": "D0041696820240426011111111111",
	"originalEndToEndId": "E38224857202404260111111111111",
	"amount": 500.0,
	"bankAccount": "11111",
	"refundCode": "MD06",
	"reasonRefund": "DevoluĆ§Ć£o solicitada pelo cliente",
	"createdAt": "2024-04-26T01:53:04.329Z",
	"proof": {
		"idempotencyKey": "D0041696820240426011111111111",
		"endToEndId": "D0041696820240426011111111111",
		"originalEndToEndId": "E38224857202404260111111111111",
		"status": "PIX_EFFECTIVE",
		"operationType": "CREDIT_REFUND",
		"amount": 500.0,
		"createdAt": "2024-04-26T01:53:02.901Z",
		"finishedAt": "2024-04-26T01:53:02.901Z",
		"payer": {
			"number": "11111111111",
			"branch": "0001",
			"type": "CURRENT",
			"participant": {
				"name": "BANCO XXXXX",
				"ispb": "1111111111"
			},
			"holder": {
				"document": "***1111111**",
				"type": "NATURAL"
			}
		},
		"beneficiary": {
			"number": "38709",
			"branch": "0001",
			"type": "CURRENT",
			"participant": {
				"name": "DELCRED SCD S.A.",
				"ispb": "38224857"
			},
			"holder": {
				"name": "EMPRESA LTDA",
				"document": "94478450000138",
				"type": "LEGAL"
			}
		}
	}
}

 

Here are the attributes that are passed by the PIX_REFUNDED webhook:

NameDescription
eventTypeThe type of event that triggered the webhook (e.g., "PIX_REFUNDED").
endToEndIdThe unique identifier for the refund PIX transaction.
originalEndToEndIdThe unique identifier for the original PIX transaction that is being refunded.
amountThe monetary value of the refund PIX transaction.
bankAccountThe account number where the refund will be credited.
refundCodeA code representing the reason for the refund (e.g., "MD06").
reasonRefundA textual description explaining the reason for the refund (e.g., "DevoluĆ§Ć£o solicitada pelo cliente").
createdAtThe timestamp indicating when the refund PIX transaction was created.
proofAn object containing detailed proof information for the refund PIX transaction.
proof.idempotencyKeyA unique key to ensure idempotency of the proof event processing.
proof.endToEndIdThe unique identifier for the refund PIX transaction within the proof context.
proof.originalEndToEndIdThe unique identifier for the original PIX transaction within the proof context.
proof.statusThe status of the refund PIX transaction (e.g., "PIX_EFFECTIVE").
proof.operationTypeThe type of operation being performed (e.g., "CREDIT_REFUND").
proof.amountThe monetary value of the refund PIX transaction within the proof context.
proof.createdAtThe timestamp when the refund process started.
proof.finishedAtThe timestamp when the refund process was completed.
proof.payerAn object containing information about the payer of the refund PIX transaction.
proof.payer.numberThe account number of the payer.
proof.payer.branchThe branch number of the payer's account.
proof.payer.typeThe type of the payer's account (e.g., "CURRENT").
proof.payer.participantAn object containing information about the financial institution of the payer.
proof.payer.participant.nameThe name of the financial institution of the payer (e.g., "BANCO XXXXX").
proof.payer.participant.ispbThe ISPB code of the payer's financial institution.
proof.payer.holderAn object containing information about the holder of the payer's account.
proof.payer.holder.documentThe document number of the payer (e.g., partially masked for security).
proof.payer.holder.typeThe type of payer (e.g., "LEGAL" or "NATURAL").
proof.beneficiaryAn object containing information about the beneficiary of the refund PIX transaction.
proof.beneficiary.numberThe account number of the beneficiary.
proof.beneficiary.branchThe branch number of the beneficiary's account.
proof.beneficiary.typeThe type of the beneficiary's account (e.g., "CURRENT").
proof.beneficiary.participantAn object containing information about the financial institution of the beneficiary.
proof.beneficiary.participant.nameThe name of the beneficiary's financial institution (e.g., "DELCRED SCD S.A.").
proof.beneficiary.participant.ispbThe ISPB code of the beneficiary's financial institution (e.g., "38224857").
proof.beneficiary.holderAn object containing information about the holder of the beneficiary's account.
proof.beneficiary.holder.nameThe name of the beneficiary (e.g., "EMPRESA LTDA").
proof.beneficiary.holder.documentThe document number of the beneficiary
proof.beneficiary.holder.typeThe type of beneficiary (e.g., "LEGAL" or "NATURAL").