Skip to main content
POST
/
{locale}
/
shop
/
points
curl -X POST "https://staging-api.loyalty.lt/en/shop/points" \
  -H "Authorization: Bearer your_jwt_token" \
  -H "Content-Type: application/json" \
  -d '{
    "card_id": 123,
    "points": 100,
    "transaction_type": "redeem",
    "redemption_type": "purchase_discount",
    "purchase_amount": 50.00,
    "discount_amount": 5.00,
    "description": "€5 discount on coffee purchase",
    "metadata": {
      "shop_id": 45,
      "order_id": "ORD-2024-002"
    }
  }'
{
  "success": true,
  "message": "Points redeemed successfully",
  "data": {
    "transaction": {
      "id": 12347,
      "points_redeemed": 100,
      "redemption_type": "purchase_discount",
      "discount_amount": 5.00,
      "voucher_code": null,
      "expires_at": null,
      "created_at": "2024-01-15T15:30:00Z"
    },
    "balance": {
      "current_points": 1200,
      "previous_points": 1300,
      "points_redeemed": 100,
      "tier": "Gold"
    }
  }
}

Redeem Points

Redeem loyalty points from a user’s account for purchases, discounts, or rewards. This endpoint deducts points from the user’s balance and creates a redemption transaction.
Points are deducted immediately upon successful redemption. The transaction is reversible only through admin actions within 24 hours.

Path Parameters

locale
string
required
Language code for localized content (e.g., “en”, “lt”)

Request Body

card_id
integer
required
Unique identifier of the loyalty card to redeem points from
points
integer
required
Number of points to redeem (must be positive and ≤ available balance)
transaction_type
string
required
Must be set to "redeem" for redemption transactions
redemption_type
string
required
Type of redemption
  • purchase_discount - Discount on current purchase
  • free_product - Free product redemption
  • voucher - Gift voucher generation
  • cashback - Cash equivalent redemption
purchase_amount
number
Original purchase amount in euros (required for purchase_discount)
discount_amount
number
Discount amount to apply in euros (calculated from points)
description
string
Description of what was redeemed (max 255 characters)
metadata
object
Additional redemption data

Response

success
boolean
Indicates if points were successfully redeemed
message
string
Human-readable message about the operation
data
object
curl -X POST "https://staging-api.loyalty.lt/en/shop/points" \
  -H "Authorization: Bearer your_jwt_token" \
  -H "Content-Type: application/json" \
  -d '{
    "card_id": 123,
    "points": 100,
    "transaction_type": "redeem",
    "redemption_type": "purchase_discount",
    "purchase_amount": 50.00,
    "discount_amount": 5.00,
    "description": "€5 discount on coffee purchase",
    "metadata": {
      "shop_id": 45,
      "order_id": "ORD-2024-002"
    }
  }'
{
  "success": true,
  "message": "Points redeemed successfully",
  "data": {
    "transaction": {
      "id": 12347,
      "points_redeemed": 100,
      "redemption_type": "purchase_discount",
      "discount_amount": 5.00,
      "voucher_code": null,
      "expires_at": null,
      "created_at": "2024-01-15T15:30:00Z"
    },
    "balance": {
      "current_points": 1200,
      "previous_points": 1300,
      "points_redeemed": 100,
      "tier": "Gold"
    }
  }
}

Redemption Rules

Different redemption types have specific requirements and conversion rates:
Conversion Rate: 20 points = €1 discount
  • Minimum redemption: 20 points (€1)
  • Maximum discount: 50% of purchase amount
  • Can be combined with other offers
  • Instant application at checkout
Fixed Point Values: Varies by product
  • Coffee: 200 points
  • Pastry: 150 points
  • Sandwich: 300 points
  • Limited to available inventory
Conversion Rate: 20 points = €1 voucher value
  • Minimum: 100 points (€5 voucher)
  • Maximum: 2000 points (€100 voucher)
  • Valid for 6 months
  • Transferable to other users
Conversion Rate: 25 points = €1 cashback
  • Minimum: 250 points (€10)
  • Processed within 5 business days
  • Subject to monthly limits
  • May incur processing fees

Business Logic Validation

1

Balance Check

Verify user has sufficient points for redemption
2

Eligibility Validation

Check card status, tier requirements, and redemption limits
3

Rate Calculation

Apply conversion rates and tier-specific bonuses
4

Points Deduction

Deduct points and create redemption transaction
5

Benefit Generation

Generate voucher codes, apply discounts, or process rewards
Irreversible Action: Point redemptions cannot be automatically reversed. Contact support within 24 hours for disputes or errors.