Consumption record callback

Brief Description

Card transaction webhook configuration and usage:

  • Please contact staff to configure your Webhook Endpoint Url on the backend The URL must be HTTPS
  • When there are card transactions such as purchases/refunds/chargebacks the corresponding transaction messages will be pushed to your Webhook Endpoint Url
  • Upon receiving the Webhook message if you return HTTP CODE 200 it signifies successful receipt of the webhook message otherwise it will retry

Return Parameters Description

ParameterTypeDescription
eventTypestringWebhook event type
eventIdstringWebhook event ID
webhookSubscribeIdstringWebhook subscription ID
+dataobjectReturned event object data
└transactionIdstringUnique transaction ID for each transaction
└userIdstringUser ID
└cardIdstringVirtual card ID
└cardCustomerIdstringCustom customer ID
└cardNumberstringCard number
└cardSeqNostringCard sequence number
└despstringTransaction description information
└reasonstringChargeback reason
└preAuthAmountintegerPre-authorization amount (may differ from final transaction amount)
└preAuthCurrencystringPre-authorization currency USD
└preAuthTimetimestampPre-authorization time
└transactionAmountintegerTransaction amount
└transactionCurrencystringTransaction currency USD
└transactionTimetimestampTransaction time
└statusstringTransaction status:
PENDING: Transaction authorization pending
EXPIRED: Authorization expired
REVERSED: Authorization reversed (eg refund for pre-authorized card)
DECLINED: Chargeback
COMPLETE: Transaction completed
REFUND: Transaction refunded
└gmtCreatetimestampRecord creation time
└gmtModifiedintegerRecord update time

Return Examples

  • PENDING Example

{
eventType: TRANSACTION
eventId: ev_xxxxxxxxxxxxxxxxxxxxx
webhookSubscribeId: wsb_xxxxxxxxxxxxxxxxxxx
data: {
transactionId: t_xxxxxxxxxxxxx
userId: u_xxxxxxxxxxx
cardId: c_xxxxxxxxxxx
cardCustomerId:
cardNumber: 556735XXXXXX0737
cardSeqNo: CXXXXXXX
desp: FACEBK UYFYREF3S2 fbme/ads IRL
reason: null
preAuthAmount: -1992
preAuthCurrency: USD
preAuthTime: 1652262674000
transactionAmount: null
transactionCurrency: null
transactionTime: null
status: PENDING
gmtCreate: 1652262674000
gmtModified: 1652262674000
}
}

  • EXPIRED Example

{
eventType: TRANSACTION
eventId: ev_xxxxxxxxxxxxxxxxxxxxx
webhookSubscribeId: wsb_xxxxxxxxxxxxxxxxxxx
data: {
transactionId: t_xxxxxxxxxxxxx
userId: u_xxxxxxxxxxx
cardId: c_xxxxxxxxxxx
cardCustomerId:
cardNumber: 556735XXXXXX0737
cardSeqNo: CXXXXXXX
desp: FACEBK UYFYREF3S2 fbme/ads IRL
reason: null
preAuthAmount: -1992
preAuthCurrency: USD
preAuthTime: 1652262674000
transactionAmount: null
transactionCurrency: null
transactionTime: null
status: EXPIRED
gmtCreate: 1652262674000
gmtModified: 1655562674000
}
}

  • REVERSED Example

{
eventType: TRANSACTION
eventId: ev_xxxxxxxxxxxxxxxxxxxxx
webhookSubscribeId: wsb_xxxxxxxxxxxxxxxxxxx
data: {
transactionId: t_xxxxxxxxxxxxx
userId: u_xxxxxxxxxxx
cardId: c_xxxxxxxxxxx
cardCustomerId:
cardNumber: 556735XXXXXX0737
cardSeqNo: CXXXXXXX
desp: FACEBK UYFYREF3S2 fbme/ads IRL
reason: null
preAuthAmount: -1992
preAuthCurrency: USD


Did this page help you?