New to authentication? Check out our Authentication Guide to understand OAuth flows, choose the right method, and learn about security best practices.
Prerequisites
Before you begin, make sure you have:- A ClearLine account (Demo or Production environment)
- API credentials (Client ID and Client Secret)
- A registered POS terminal ID
- A location ID from your POS system
Don’t have credentials? Contact your ClearLine representative or
support@clearline.me to get started.
Step 1: Get Your Access Token
Authenticate using the Client Credentials flow to get an access token:Response
JWT token for authenticating API requests. Include this in the
Authorization: Bearer {token} header for all subsequent API calls. Example:
eyJhbGciOiJSUzI1NiIsImtpZCI6Ij...Token type, always
Bearer for OAuth2 tokens.Token lifetime in seconds. Default is
3600 (1 hour). Request a new token
before expiration.The granted OAuth scope. Should match your requested scope:
pos_integrationFor other authentication methods (user apps, mobile apps, etc.), see the complete Authentication Guide.
Step 2: Start Your First Interaction
Now make your first API call to start a customer interaction:Response
Container object for the interaction response data.
Next Steps
Now that you’ve made your first successful API call, you can:Submit a Transaction
Send transaction data using your sessionId
Explore All Endpoints
Browse the complete API reference
Integration Workflows
Learn complete integration patterns
Test Environments
Configure different environments
Common Issues
401 Unauthorized Error
401 Unauthorized Error
404 Terminal Not Found
404 Terminal Not Found
Cause: Terminal ID not registered in ClearLine Solution: - Log into
the ClearLine Admin Portal - Navigate to Terminals - Register your terminal ID
- Wait a few minutes for sync, then try again
Connection Timeout
Connection Timeout
Cause: Network issues or wrong environment URL Solution: - Verify
you’re using the correct base URL for your environment - Check your network
firewall settings - Try the demo environment first:
public-api-demo.clearline.meComplete Example
Here’s a complete working example that authenticates and starts an interaction:What’s Next?
1
Send a Transaction
Use your
sessionId to submit transaction data View Transaction Endpoints
→2
Implement Error Handling
Add retry logic and proper error handling View Error Handling Guide
→
3
Go to Production
Switch to production URLs and credentials View Environments
→