Skip to main content

Checkout SDK

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:

Checkout SDK: Completed, aborted, failed

Important

This is a new version of the Sunbit Checkout SDK 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": "CHECKOUT_SDK_COMPLETED",  "payload": {    "purchaseId": "99-999-999",    "location": "retailer4",    "purchaseAmount": 120.0,    "purchaseDate": "2021-11-04 01:02:02",    "invoice": null,    "associateName": "Jason",    "representativeName": "Jason",    "representativeEmail": "jason@email.com",    "referral": "9999",    "merchantFeeAmount": 5  }}

Definitions#

AttributeTypeDescription
eventTypetextThe type of event triggered by the customer action:
CHECKOUT_SDK_ABORTED
CHECKOUT_SDK_COMPLETED
CHECKOUT_SDK_FAILED
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 (add URL for each).
locationtextThe same Location which was sent in the API.
purchaseAmountnumberThe max amount the customer was approved for.
purchaseDatetextThe date of the purchase. Format: YYYY-MM-DD HH:MM:SS
invoicetextA number which is manually inputted in the Sunbit POS.
associateNametextThe name of the representative that provided by the integrator. Equal to the associateName which was provided in text-to-pay-over-time request. //Will be deprecated on 31/12/2022
representativeNametextThe name of the representative that provided by the integrator. Equal to the representativeName which was provided in text-to-pay-over-time request.
representativeEmailtextThe email of the representative that provided by the integrator. Equal to the representativeName which was provided in text-to-pay-over-time request.
referraltextAn external transaction identifier sent by the integrator for 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.