Transactions
Create Transaction
Create purchase transaction and award/redeem points (WooCommerce integration)
POST
Create Transaction
Create a purchase transaction for a user, automatically calculating and awarding loyalty points. This endpoint supports both earning points and redeeming points in a single transaction.This is the primary endpoint for e-commerce integrations (WooCommerce, Shopify, etc.) to award and redeem points. It requires Shop API authentication.
Path Parameters
Language code (e.g.,
en, lt)Authentication
API key from Partners Portal
API secret from Partners Portal
Request Body
Required Fields
User’s ID in the system (required if
user_email not provided)User’s email address (required if
user_id not provided)Unique order/transaction reference from your systemExample:
"WC-12345", "ORDER-2024-001"Total order amount for points calculationExample:
49.99Optional Fields
Manual points override (if not provided, calculated from card settings)
Currency code (ISO 4217)
Transaction description (auto-generated if not provided)
Shop ID for multi-location tracking
Specific partner card template to use
Existing user loyalty card ID to use
Points Redemption
Number of points to redeem for discount
Discount amount applied via points redemption
Cart Items (for analytics)
Array of purchased products
Additional custom metadata
Response
Indicates if transaction was created successfully
Status message
Points Calculation
Points are calculated based on the partner card’s configuration:If
round_points_up is true, points are rounded up. Otherwise, rounded down.Example Calculation
Card settings:points_per_currency: 10currency_amount: 1.00points_per_visit: 5round_points_up: true
- Base: (15.50 / 1.00) × 10 = 155 points
- Visit bonus: +5 points
- Total: 160 points
Automatic Card Creation
If the user doesn’t have a loyalty card for your partner:- System finds the partner’s default card template (
auto_assign: true) - Creates a new loyalty card for the user
- Awards initial bonus points (if configured)
- Processes the transaction
Push Notifications
When points are awarded, users receive a push notification in their mobile app:“Operacija atlikta” : . Gavote taškų!
Related Endpoints
Deduct Points
Deduct points for refunds/cancellations
Get Loyalty Card Info
Check user’s points balance
Transaction History
View user’s transaction history