Checkout SDK
#
OverviewYou 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 }}
#
DefinitionsAttribute | Type | Description |
---|---|---|
eventType | text | The type of event triggered by the customer action: CHECKOUT_SDK_ABORTED CHECKOUT_SDK_COMPLETED CHECKOUT_SDK_FAILED |
purchaseId | text | The 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). |
location | text | The same Location which was sent in the API. |
purchaseAmount | number | The max amount the customer was approved for. |
purchaseDate | text | The date of the purchase. Format: YYYY-MM-DD HH:MM:SS |
invoice | text | A number which is manually inputted in the Sunbit POS. |
associateName | text | The 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 |
representativeName | text | The name of the representative that provided by the integrator. Equal to the representativeName which was provided in text-to-pay-over-time request. |
representativeEmail | text | The email of the representative that provided by the integrator. Equal to the representativeName which was provided in text-to-pay-over-time request. |
referral | text | An external transaction identifier sent by the integrator for Text to Pay-Over-Time and used to match the webhook to the request. |
merchantFeeAmount | number | The amount that was deducted as merchant fees from the total purchase amount. |