POST
/tenants/{tenantId}/transactions/redeemThe burn endpoint. Converts points to a rand discount at checkout. Returns discountAmount in cents — apply this as a line-item deduction at the till. Constraints like maxDiscountPercentOfBasketare applied automatically; constraintApplied tells you if they fired. Fully idempotent on transactionRef.
Preview before burning — use POST /transactions/redeem-quote to calculate the exact discount without writing any records. Ideal for "you would save R0.50" previews at checkout.
Path Parameters
Request Body
Response 200
Discount formula
discountAmount = floor(pointsRedeemed / pointsPerRand)
// e.g. 500 pts ÷ 10 pts/R = R50 → 5000 cents
Error Codes
cURL
curl -X POST "https://loyalty-engine-production-e5cb.up.railway.app/v1/tenants/$TENANT_ID/transactions/redeem" \
-H "X-API-Key: sk_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"transactionRef": "redeem_001",
"memberRef": "customer_27821234567",
"amount": 15000,
"pointsRequested": 500
}'Response
200 OK
{
"redeemTransactionId": "a1b2c3d4-0e5f-4a8b-9f1d-2c3e4f5a6b7c",
"transactionRef": "redeem_001",
"memberId": "9f4c2e8a-1b2c-3d4e-5f6a-7b8c9d0e1f2a",
"pointsRedeemed": 500,
"discountAmount": 50,
"balanceBefore": 650,
"balanceAfter": 150,
"constraintApplied": null
}Authenticate to test this endpoint live →