Skip to main content

Webhooks

Refund Webhook Payloads

This page describes the webhook payloads for refund events in AndDone.

This page describes the webhook payloads for refund events in AndDone.

Refund Webhook Events

The Refund webhook module includes webhook notifications for the following events:

  • Transaction.OnRefundInitiated: The Transaction.OnRefundInitiated webhook event is sent when a refund request is initiated by the merchant. This event contains information related to the initiated refund process.
  • Transaction.OnRefundAccepted: The Transaction.OnRefundAccepted webhook event is sent when a refund request initiated by the merchant is accepted for processing. It includes details related to the accepted refund.
  • Transaction.OnRefundSuccess: The Transaction.OnRefundSuccess webhook event is sent when a refund payment is fully processed. This event provides information related to the successfully completed refund transaction.
  • Transaction.OnRefund.Failed: The Transaction.OnRefund.Failed webhook event is sent when a refund request fails. The event payload includes details about the cause of the failure, including the ReasonCode and ErrorMessage.

Refund Webhook Payload Fields

The following table provides a reference to the fields included in refund event webhook payloads.

Field Data Type Description MinLength MaxLength
EventCode Enumeration TransactionRefundInitiated, TransactionRefundAccepted, TransactionRefundSuccess, TransactionRefundFailed 1 36
EventDateTime string Date and time of event 36 36
EventBody array Detailed information related to the transaction (see below) N/A N/A
- MerchantId string Unique ID of merchant 8 8
- MerchantReference string Transaction reference ID assigned by the merchant. 8 8
- ReferenceTransactionId string Unique ID of the original payment transaction that was refunded 36 36
- TransactionDate string Date and time of transaction 36 36
- TimeZone string Time zone for TransactionDate 1 20
- PSPReference string Payment service provider reference ID for the transaction 1 20
- PaymentIntentId string Unique ID of the payment intent associated with the transaction 8 8
- PaymentMethod Enumeration ACH, Card 1 6
- TransactionStatus Enumeration Chargedback, Created, Posted, Authorized, Sucess, Failed 1 50
- TransactionOrigin Enumeration WEB, CCD, PPD 1 3
- SettlementDate String Settlement Date 36 36
- MaskAccount String Masked account number 5 17
- RoutingNumber String Routing number 6 10
- Amount String Transaction amount 1 9
- CardType String Card type 1 9
- FirstName String First name of account holder 1 100
- LastName String Last name of account holder 1 100
- AddressLine1 String Line 1 of billing address 1 100
- AddressLine2 String Line 2 of billing address 1 36
- City String City of billing address 1 36
- State String State of billing address 1 9
- Country String Country of billing address 1 36
- Postal Code String Postal code of billing address 1 9
- Success String Indicates whether transaction was successful 1 9
- ErrorMessage String Error message if an error occurred 1 100
- ReasonCode String Reason code related to failed transaction 3 5
- AccountToken string Account token 16 16
- createAccountToken boolean Indicates whether an account token was created during the transaction. 1 5
AdditionalFields string Additional metadata values related to the webhook 1 100
Signature string HMAC value used to validate the webhook 1 100

Payload Example: Transaction Refund Success

{
"EventCode": "TransactionRefundSuccess",
"EventDateTime": "01-11-2024 10:40:37",
"EventBody": {
"MerchantId": "4bvl9KxM",
"MerchantReference": "940636ae-d74e-4b9a-b7bc-35c560720be5",
"TransactionId": "940636ae-d74e-4b9a-b7bc-35c560720be5",
"ReferenceTransactionId": "8241f0b3-9976-42d8-9e03-b640292f6549",
"TransactionDate": "01-11-2024 10:36:37",
"TimeZone": "Eastern",
"PSPReference": "JSTFJRRD43LWFL65",
"PaymentIntentId": null,
"PaymentMethod": "CardNotPresent",
"TransactionStatus": "TransactionRefundSuccess",
"TransactionOrigin": "WebForm",
"SettlementDate": "01-11-2024 10:36:46",
"MaskAccount": "****0008",
"RoutingNumber": null,
"Amount": 128,
"CardType": "VISA",
"FirstName": "Joe",
"LastName": "Jackson",
"AddressLine1": "30",
"AddressLine2": "Memorial Drive",
"City": "Avon ",
"State": "NY",
"Country": "US",
"PostalCode": "12701",
"Success": "True",
"ErrorMessage": null,
"ReasonCode": "REFUND",
"AccountToken": null,
"createAccountToken": false
},
"AdditionalFields": "",
"Signature": null
}