Skip to main content
Wallet endpoints require a bearer token and x-partner-id. Use the integration ID issued by Keystone.
Authorization: Bearer <access_token>
x-partner-id: <integration_id>

Quote wallet discount

Use this endpoint before checkout to show the wallet discount that can apply to the current cart.
MethodEndpointAuth
POST/wallet/quoteBearer token
Request:
curl -X POST https://dev-api.keystonecommerce.in/api/v1/wallet/quote \
  -H "Authorization: Bearer <access_token>" \
  -H "x-partner-id: <integration_id>" \
  -H "Content-Type: application/json" \
  -d '{"cartValue":750}'
Response:
{
  "statusCode": 200,
  "message": "Success",
  "data": {
    "enabled": true,
    "balance": "0.00",
    "cartValue": "750.00",
    "eligibleDiscount": "50.00",
    "redeemableAmount": "0.00",
    "nextEligibleCartValue": "1000.00",
    "earliestExpiry": null
  }
}
Fields:
FieldMeaning
balanceCustomer’s usable wallet balance
eligibleDiscountDiscount unlocked by the cart value
redeemableAmountAmount that can actually be redeemed now
nextEligibleCartValueNext cart threshold, or null if there is none
earliestExpiryEarliest expiring wallet credit, or null

Get wallet

Use this endpoint to show the wallet screen. It returns the quote, recent transactions, and active discount rules.
MethodEndpointAuth
GET/wallet?cartValue={amount}Bearer token
Request:
curl "https://dev-api.keystonecommerce.in/api/v1/wallet?cartValue=750" \
  -H "Authorization: Bearer <access_token>" \
  -H "x-partner-id: <integration_id>"
Response:
{
  "statusCode": 200,
  "message": "Success",
  "data": {
    "enabled": true,
    "balance": "0.00",
    "cartValue": "750.00",
    "eligibleDiscount": "50.00",
    "redeemableAmount": "0.00",
    "nextEligibleCartValue": "1000.00",
    "earliestExpiry": null,
    "transactions": [],
    "discountRules": [
      {
        "cartValue": "250.00",
        "discountAmount": "25.00"
      },
      {
        "cartValue": "500.00",
        "discountAmount": "50.00"
      }
    ]
  }
}
To apply wallet during checkout, send useWallet: true in POST /orders.