Skip to main content

Webhooks

Transaction Webhook Payloads

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

This page describes the webhook payloads for transaction events in AndDone. For event payload details, please see the section corresponding to the webhook version you are using:

Transaction Webhook Events

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

  • Transaction.OnAuthorized - The Transaction.OnAuthorized webhook event is sent when a transaction is authorized. It contains information related to the authorized transaction.
  • Transaction.OnSuccess - The Transaction.OnSuccess webhook event is sent when a transaction is has been successfully processed. It contains information related to the completed transaction.
  • Transaction.OnCancellation - The Transaction.OnCancellation webhook event is sent when a transaction is has been cancelled. It contains information related to the cancelled transaction.
  • Transaction.OnFailed - The Transaction.OnFailed webhook event is sent when a transaction fails to complete. The event payload includes information related to the cause of failure including the ReasonCode and ErrorMessage.

Version 1 - Transaction Webhook Payload

The following table provides a reference to the fields included in transaction event webhook payloads version 1.

Field Data Type Description MinLength MaxLength
EventCode Enumeration TransactionAuthorized, TransactionSuccess, TransactionFailed, TransactionCancelled 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 identifier of merchant 8 8
- MerchantReference String Transaction reference ID assigned by the merchant 8 8
- TransactionId String Unique system-generated identifier for the transaction 36 36
- TransactionDate String Date and time of the 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 Payment method used in the transaction 1 6
- TransactionStatus Enumeration Chargedback, Created, Posted, Authorized, Sucess, Failed 1 50
- TransactionOrigin Enumeration WEB, CCD, PPD 1 3
- SettlementDate String The date when the payment transaction was settled 36 36
- MaskAccount String Masked account number 5 17
- RoutingNumber String The routing number for ACH payments 6 10
- Amount String The transaction amount 1 9
- CardType String Card type or brand 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 Boolean Indicates whether the transaction was successful 1 9
- ErrorMessage String Error message if an error occurred in the transaction 1 100
- ReasonCode String Reason code related to the 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 Authorized (v1)

{
"EventCode": "TransactionAuthorized",
"EventDateTime": "03-14-2024 16:57:48",
"EventBody": {
"MerchantId": "ABv9G58a",
"MerchantReference": "REference_115",
"TransactionId": "1c91088d-855a-4099-a687-fa82cdb981f9",
"TransactionDate": "03-14-2024 16:56:28",
"TimeZone": "Central",
"PSPReference": "PBGND6L9GZL3JM65",
"PaymentIntentId": null,
"PaymentMethod": "CardNotPresent",
"TransactionStatus": "Authorized",
"TransactionOrigin": "WebForm",
"SettlementDate": null,
"MaskAccount": "415150****0008",
"RoutingNumber": null,
"Amount": 2800,
"CardType": "VISA",
"FirstName": "Azhar",
"LastName": "Dave",
"AddressLine1": "30",
"AddressLine2": "Memorial Drive",
"City": "Avon ",
"State": "NY",
"Country": "US",
"PostalCode": "12701",
"Success": "True",
"ErrorMessage": null,
"ReasonCode": null,
"AccountToken": null,
"CreateAccountToken": false,
"Version": 1
},
"AdditionalFields": null,
"Signature": null,
"Version": 1
}

Payload Example: Transaction Failed (v1)

{
"EventCode": "TransactionFailed",
"EventDateTime": "12-13-2023 07:50:57",
"EventBody": {
"MerchantId": "4bvl9KxM",
"MerchantReference": "b682035a-0e62-4b86-895d-ff51889c7ed0",
"TransactionId": "b682035a-0e62-4b86-895d-ff51889c7ed0",
"TransactionDate": "12-13-2023 07:50:54",
"TimeZone": "Eastern",
"PSPReference": "QS6DBRBDTV5X8N82",
"PaymentIntentId": null,
"PaymentMethod": "CardNotPresent",
"TransactionStatus": "Failed",
"TransactionOrigin": "WebForm",
"SettlementDate": null,
"MaskAccount": "400002****0000",
"RoutingNumber": null,
"Amount": 25.25,
"CardType": "VISA",
"FirstName": "John",
"LastName": "Doe",
"AddressLine1": "843 Elm Dr.",
"AddressLine2": "Unit 270",
"City": "Bellville",
"State": "AK",
"Country": "US",
"PostalCode": "12345",
"Success": "False",
"ErrorMessage": "Refused",
"ReasonCode": "2",
"AccountToken": null,
"createAccountToken": false
},
"AdditionalFields": "",
"Signature": "ytu8pMY+JB25TWFFPkpklWMQ8Fi+jTeIKv3M/uG9YjY="
}

Version 2 - Transaction Webhook Payload

The following table provides a reference to the fields included in transaction event webhook payloads version 2. Version 2 of the Transaction webhook module features the addition of QuoteKey and SubTotal fields.

Field Data Type Description MinLength MaxLength
EventCode Enumeration TransactionAuthorized, TransactionSuccess, TransactionFailed, TransactionCancelled 1 36
EventDateTime String Date and time of the transaction event 36 36
EventBody Array Detailed information related to the transaction (see below) N/A N/A
- MerchantId String Unique identifier of merchant 8 8
- MerchantReference String Unique transaction reference ID assigned by the merchant. 8 8
- TransactionId string Unique system-generated identifier for the transaction 36 36
- TransactionDate String Date and time of the 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 Payment method used in the transaction 1 6
- TransactionStatus Enumeration Chargedback, Created, Posted, Authorized, Sucess, Failed 1 50
- TransactionOrigin Enumeration WEB, CCD, PPD 1 3
- SettlementDate String The date when the payment transaction was settled 36 36
- MaskAccount String Masked account number 5 17
- RoutingNumber String Routing number for ACH transactions 6 10
- Amount String Transaction amount 1 9
- CardType String Card type or brand 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 Boolean 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
- QuoteKey String For Premium Finance payment transactions, this is the quote key associated with the premium finance agreement 1 5
- SubTotal String Transaction amount after subtracting the AndDone technology fee 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 Authorized (v2)

{
    "EventCode": "TransactionAuthorized",
    "EventDateTime": "03-14-2024 16:57:48",
    "EventBody": {
    "MerchantId": "ABv9G58a",
    "MerchantReference": "REference_115",
    "TransactionId": "1c91088d-855a-4099-a687-fa82cdb981f9",
    "TransactionDate": "03-14-2024 16:56:28",
    "TimeZone": "Central",
    "PSPReference": "PBGND6L9GZL3JM65",
    "PaymentIntentId": null,
    "PaymentMethod": "CardNotPresent",
    "TransactionStatus": "Authorized",
    "TransactionOrigin": "WebForm",
    "SettlementDate": null,
    "MaskAccount": "415150****0008",
    "RoutingNumber": null,
    "Amount": 2800,
    "CardType": "VISA",
    "FirstName": "Azhar",
    "LastName": "Dave",
    "AddressLine1": "30",
    "AddressLine2": "Memorial Drive",
    "City": "Avon ",
    "State": "NY",
    "Country": "US",
    "PostalCode": "12701",
    "Success": "True",
    "ErrorMessage": null,
    "ReasonCode": null,
    "AccountToken": null,
    "CreateAccountToken": false,
    "QuoteKey": null,
    "SubTotal": "2800",
    "Version": 2
    },
    "AdditionalFields": null,
    "Signature": null,
    "Version": 2
    }