🛒 Process POS Transaction → Trigger Loyalty
Business Need
Business Need
When a customer completes a purchase at the point of sale, automatically record the transaction and award loyalty points or trigger marketing actions based on their purchase behavior.
Technical Overview
Technical Overview
This workflow involves three key steps:
- Start Interaction - Initialize a POS session for the terminal
- Send Transaction - Submit transaction details with customer data, items, amounts, and payment info
- Handle Response - Process loyalty points awarded and any triggered campaigns
POST /pos/{posSystemId}/startInteraction- Initiate POS sessionPOST /pos/{posSystemId}/transaction- Submit transaction data
Implementation Example
Implementation Example
Include customer contact information in the transaction request to enable loyalty tracking and marketing campaign triggers.
Learn More
View complete transaction API reference →
🎟️ Validate Coupon at Checkout
Business Need
Business Need
Enable cashiers to scan or enter coupon codes during checkout and validate them in real-time before applying discounts.
Technical Overview
Technical Overview
Workflow:
- Lookup Coupon - Search for a coupon by code
- Validate Coupon - Check coupon status and eligibility
- Apply Discount - Use coupon information to calculate discount in your POS
- Record Usage - Include coupon details in the transaction
POST /v2/pos/{posSystemId}/coupon/couponCodes/lookup- Search for couponsPOST /v2/pos/{posSystemId}/coupon/couponCodes/validate- Validate coupon
The validate endpoint confirms the coupon exists and is active. Your POS system is responsible for applying business rules like minimum purchase amounts and calculating the actual discount.
Implementation Example
Implementation Example
Learn More
View complete coupons API reference →
📺 Display Marketing Content with Widgets
Business Need
Business Need
Show interactive marketing content on customer-facing displays that customers can engage with to join loyalty programs, view offers, or receive digital receipts via QR code or SMS.
Technical Overview
Technical Overview
Workflow:
- List Widgets - Get available marketing actions for the location
- Start Widget Session - Launch a widget for customer interaction
- Show QR Code - Display QR code for mobile engagement
- Send Message - Deliver content via SMS/email
POST /v2/pos/{posSystemId}/widget/list- Get available widgetsPOST /v2/pos/{posSystemId}/widget/start- Start widget sessionPOST /v2/pos/{posSystemId}/widget/showQrCode- Generate QR codePOST /v2/pos/{posSystemId}/widget/sendMessage- Send SMS/email
- Loyalty enrollment
- Promotion signup
- Digital receipt delivery
- Survey/feedback collection
Implementation Example
Implementation Example
Learn More
View complete widgets API reference →
🔄 Sync Product Catalog
Business Need
Business Need
Maintain an up-to-date product catalog in ClearLine by automatically syncing products, categories, and promotions from your POS or inventory management system on a scheduled basis.
Technical Overview
Technical Overview
Sync Strategies:
API Endpoints Used:
| Strategy | When to Use | Performance |
|---|---|---|
| Full Sync | Initial setup, weekly refresh | Slower, comprehensive |
| Incremental Sync | Daily updates, changed items only | Faster, efficient |
| On-Demand Sync | Immediate updates for specific items | Fastest, targeted |
POST /pos/{posSystemId}/company/{posCompanyId}/import/products- Import productsPOST /pos/{posSystemId}/company/{posCompanyId}/import/productCategories- Import categoriesPOST /pos/{posSystemId}/company/{posCompanyId}/import/promotions- Import promotions
- Product ID (unique identifier)
- Product name
- Price and category
- Manufacturer (optional)
Implementation Example
Implementation Example
Learn More
View complete import API reference →
🔧 Error Recovery & Retry Logic
Business Need
Business Need
Build resilient POS integrations that gracefully handle network failures, API errors, and timeout scenarios without losing transaction data or frustrating customers.
Technical Overview
Technical Overview
Common Error Scenarios:
Best Practices:
- Network timeouts (slow connection)
- 5xx server errors (temporary API issues)
- 4xx client errors (invalid requests)
- Authentication failures (expired tokens)
- Rate limiting (too many requests)
| Error Type | Retry Strategy | Max Retries |
|---|---|---|
| Network Timeout | Exponential backoff | 3 |
| 5xx Server Error | Exponential backoff | 3 |
| 429 Rate Limit | Wait for Retry-After header | 2 |
| 401 Unauthorized | Refresh token once | 1 |
| 4xx Client Error | No retry (fix request) | 0 |
- Implement exponential backoff (1s, 2s, 4s, 8s…)
- Log all retry attempts for debugging
- Queue failed transactions for later submission
- Display clear error messages to cashiers
- Provide manual retry option in POS UI
Implementation Example
Implementation Example
Learn More
View error handling best practices →