Text to Pay-Over-Time
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:
Text to Pay-Over-Time: Completed, aborted, failed
Important
This is a new version of the Sunbit Text to Pay-Over-Time 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": "TEXT_TO_PAY_COMPLETED", "payload": { "purchaseId": "99-999-999", "location": "retailer4", "purchaseAmount": 120.0, "purchaseDate": "2021-11-04 01:01:02", "invoice": null, "associateName": "Jason", "representativeName": "Jason", "representativeEmail": "jason@email.com", "referral": "9999", "merchantFeeAmount": 5 }}Definitions#
| Attribute | Type | Description |
|---|---|---|
| eventType | text | The type of event triggered by the customer action: TEXT_TO_PAY_ABORTED TEXT_TO_PAY_COMPLETED TEXT_TO_PAY_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. |