> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Sample Use Cases and Flows ## Article: Sample Use Cases and Flows ## Article Link: https://dev.wix.com/docs/api-reference/crm/loyalty-program/rewards/checkout-discount/sample-use-cases-and-flows.md ## Article Content: # Checkout Discount: Sample Use Cases and Flows This article shares a possible use case you could support. This can be a helpful jumping off point as you plan your implementation. ## Apply pre-redeemed loyalty rewards during checkout Build a checkout where customers can easily apply loyalty coupons they've already redeemed to their cart, providing instant savings and encouraging loyalty program engagement. 1. Call [Get Current Member Account](https://dev.wix.com/docs/api-reference/crm/loyalty-program/accounts/accounts/get-current-member-account.md) to retrieve the customer's loyalty account details and available point balance. 1. Call [Query Rewards](https://dev.wix.com/docs/api-reference/crm/loyalty-program/rewards/rewards/query-rewards.md) and filter results based on the customer's tier (`configsByTier.tierId` field) to display available rewards they can redeem. 1. When a customer sele ts a reward, call [Redeem Current Member Points For Coupon](https://dev.wix.com/docs/api-reference/crm/loyalty-program/rewards/coupons/redeem-current-member-points-for-coupon.md) to convert points into a usable coupon. 1. During checkout, call [Create Checkout](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/checkout/create-checkout.md) to initialize the checkout session with cart items. 1. Call [Query Loyalty Checkout Discounts](https://dev.wix.com/docs/api-reference/crm/loyalty-program/rewards/checkout-discount/query-loyalty-checkout-discounts.md) to retrieve all available loyalty discounts for this customer, including their redeemed coupons. 1. Present the customer with their available redeemed coupons (those with `LOYALTY_COUPON` discount type) in the checkout interface. 1. When the customer selects a coupon to apply, call [Apply Discount to Checkout](https://dev.wix.com/docs/api-reference/crm/loyalty-program/rewards/checkout-discount/apply-discount-to-checkout.md) with the checkout ID and the selected coupon details. 1. Complete the purchase using [Create Order](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/create-order.md) or the appropriate payment processing API.