Intro
After obtaining an access token, your POS system can interact with the Widgets platform through the following sequence of API calls. This flow allows you to retrieve available widgets, initiate a widget session, and display the resulting QR code on the customer-facing screen (CFS) or deliver it via other supported methods (e.g., email).Base Flow:
- Merchant adds products to cart
- Merchant proceeds to Checkout
- During the Checkout process the POS System completes several checks
- Check if post-purchase Transactions are enabled
- Check if POS Rules are enabled
- If POS Rules are disabled then a confirmation modal is shown proposing to use Clearline Marketing apps
- If Merchant confirms to proceed with Clearline Marketing, then a CMC Modal is shown with Marketing apps list(tiles view)
- Endpoint: Get Available Widgets(Marketing Apps)
- Merchant clicks on one of marketing apps
- Endpoint: Start a Widget session (Display QrCode preview)
- Merchant clicks the Open QR Code button or Send button
- Endpoint: Compete the Widget session
- Clearline app shows the QR Code template(modal) or sends sms/email
Get Available Widgets(Marketing Apps)
This endpoint retrieves a list of widgets available for a specific POS location. These widgets can be used to engage customers through various delivery methods like QR codes, emails, or sms. POST https://public-api-test.clearline.me/v2/pos//widgets/listHeaders
| Name | Value | Description |
|---|---|---|
| Authorization | Bearer | Request authorization header |
| Content-Type | application/json | Content type |
Input Request
Input parameters
| Field name | Description |
|---|---|
| posSystem | The identifier of the POS system (e.g., pax, clover) |
| posLocation | The identifier of the POS location |
Response
Response parameters
| Field name | Description |
|---|---|
| data.id | Identifier of the marketing app |
| data.name | Name of the marketing app |
| data.icon | Icon in swg format |
| data.description | Description of the marketing app |
| data.deliveryMethods | Allowed delivery methods (Sms, Email, QrCode) |
| data.flow | Identifies the flow of the widget execution (Default, Custom) |
UI Sample

Start a Widget session (Display QrCode preview)
Initiate a widgets session and preview the QR code. POST https://public-api-test.clearline.me/v2/pos//widget/startHeaders
| Name | Value | Description |
|---|---|---|
| Authorization | Bearer | Request authorization header |
| Content-Type | application/json | Content type |
Input parameters
| Field name | Description |
|---|---|
| posSystem | The identifier of the POS system (e.g., pax, clover) |
| widgetId | The identifier of the widget |
| posLocationId | The identifier of the POS location |
| terminalId | The identifier of the POS Terminal |
| couponId | The identifier of the coupon, required for Issue Coupon widget only |
Input request
Response
Response parameters
| Field name | Description |
|---|---|
| data.qrCodePreviewHtmlLinkUrl | Preview QrCode html link url |
| data.sessionId | Session identifier |
Show Widget QR code
Show widget QR code POST https://public-api-test.clearline.me/v2/pos//widget/showQrCodeHeaders
| Name | Value | Description |
|---|---|---|
| Authorization | Bearer | Request authorization header |
| Content-Type | application/json | Content type |
Input parameters
| Field name | Description |
|---|---|
| posSystem | The identifier of the POS system (e.g., pax, clover) |
| widgetId | The identifier of the widget |
| posLocationId | ID of the location where the transaction was made |
| terminalId | The identifier of POS Terminal |
| couponId | The identifier of the coupon, required for Issue Coupon widget only |
| profile | Customer profile information |
Input request
Response
Response parameters
| Field name | Description |
|---|---|
| data.qrCodeHtmlLinkUrl | QrCode html link url |
Send Widget QR via email or sms
Show widget QR code POST https://public-api-test.clearline.me/v2/pos//widget/sendMessageHeaders
| Name | Value | Description |
|---|---|---|
| Authorization | Bearer | Request authorization header |
| Content-Type | application/json | Content type |
Input parameters
| Field name | Description |
|---|---|
| posSystem | The identifier of the POS system (e.g., pax, clover) |
| widgetId | The identifier of the widget |
| posLocationId | ID of the location where the transaction was made |
| terminalId | The identifier of POS Terminal |
| couponId | The identifier of the coupon, required for Issue Coupon widget only |
| profile | Customer profile information |