What are Transactions?
Transactions represent completed purchases at your point of sale. When you send transaction data to ClearLine, you unlock:- Loyalty Program Tracking: Automatically award points, stamps, or rewards based on purchase behavior
- Customer Analytics: Track purchase patterns, preferences, and customer lifetime value
- Targeted Marketing: Trigger personalized offers based on what customers buy
- Receipt Promotions: Display relevant promotions on customer receipts
- Coupon Validation: Apply and track coupon usage in real-time
Core Workflow
Start an Interaction
Initiate a customer interaction session using Start
Interaction. This returns
a
sessionId that links the transaction to the customer interaction.Send Transaction Data
Submit the completed purchase using the Create POS
Transaction endpoint
with your session ID, purchase items, and customer details.
Process Response
ClearLine returns loyalty points earned, applied coupons, triggered
promotions, and receipt content.
When to Send Transactions
- Post-Purchase
- Pre-Purchase Validation
- Real-Time Updates
Send transaction data after the purchase is complete and payment is
confirmed. Best for: Standard checkout flow with confirmed payments
(most common)
Transaction Endpoints
Create POS Transaction
Send completed purchase data to ClearLine
Start Interaction
Initiate a customer session before sending transactions
Validate Coupons
Validate coupon codes before applying to transactions
Receipt Promotions
Retrieve promotion details to display on receipts
Best Practices
Always Link to Sessions
Always Link to Sessions
Include the
sessionId from your interaction start call in every
transaction to track the complete customer journey and attribute loyalty
rewards correctly.Handle Refunds Properly
Handle Refunds Properly
Send refund transactions with negative amounts and reference the original
transaction ID to ensure loyalty points are adjusted and analytics remain
accurate.
Include Product Details
Include Product Details
Send detailed product information (SKU, category, price) for each item to
enable category-based promotions and better customer insights.
Implement Retry Logic
Implement Retry Logic
Network issues happen. Implement exponential backoff retry for failed
transaction sends to prevent lost data and loyalty point discrepancies.
Next Steps
Transaction API Reference
View complete API specification and request examples
Complete Integration Guide
Step-by-step guide with code examples and workflow diagrams
Quick Start Tutorial
Get your first transaction working in 5 minutes
Coupon Integration
Learn how to validate and apply coupons in transactions