Skip to main content

Voided and Refunded Transactions

Overview#

You can use Sunbit's webhooks to do anything from getting notified when a customer makes a payment, to incorporating customer actions into your reporting, customer outreach, and/or marketing automation workflows. The following customer events are currently available:

The following events are currently available:

Transactions: Voided, refunded

Important

This is a new version of the Sunbit API and the following update is available: "advisorEmail" attribute in the request body has been replaced with "representativeEmail" in order to be consistent across all APIs and SDKs. Please upgrade to the latest version by 12/31/2022.

Body#

{  "eventType": "TRANSACTION_REFUNDED",  "payload": {    "purchaseId": "938",    "location": "retailer",    "purchaseAmount": "140.0",    "netPurchaseAmount": "139.0",    "purchaseDate": "2022-04-13 23:27:06",    "modificationDate": "2022-04-20 01:42:51",    "referral": "123881",    "advisorName": null,     "representativeName": null,    "merchantFeeAmount": 5
  }}

Definitions#

AttributeTypeDescription
eventTypetextThe type of event triggered by the customer action:
TRANSACTION_VOIDED
TRANSACTION_REFUNDED
purchaseIdtextThe purchase Id that is generated by Sunbit and returned after a successful Sunbit flow. This purchase ID should be used for transaction management -Lookup, Void and refund
locationtextThe same Location which was sent in the API
purchaseAmountnumberOriginal total amount of the transaction.
netPurchaseAmountnumberNet Purchase Amount after any price adjustments or refunds. When no price adjustments take place then netPurchaseAmount = purchaseAmount. For VOIDED transactions, the net purchase amount = 0. For REFUNDED transactions, the net purchase amount reflects the new adjusted purchase amount.
purchaseDatetextDate of original purchase. Format: YYYY-MM-DD HH:MM:SS
modificationDatetextDate the transaction was last modified. For voided or refunded purchases, this date will be the modification date. Format: YYYY-MM-DD HH:MM:SS
referraltextAn external transaction identifier sent by the integrator for Pre-Qualification or Text to Pay-Over-Time and used to match the webhook to the request.
merchantFeeAmountnumberThe amount that was deducted as merchant fees from the total purchase amount.