Overview

To retrieve and validate coupons from your ordering application before applying them at checkout.

A typical flow may involve displaying all available coupons to users and/or verifying a specific coupon's validity to ensure it meet all necessary criteria, including eligibility, expiration dates, usage limits.

%%{init: { "theme": "base", "themeVariables": { "primaryColor": "#00C875", "primaryTextColor": "#1E1E1E", "primaryBorderColor": "#00873E", "lineColor": "#9CA3AF", "edgeLabelBackground": "#FFFFFF", "textColor": "#FF6B45", "fontSize": "15px", "background": "transparent" } }}%%
graph TD
    A["User"] -->|Request Available Coupons| B["Get Coupons Endpoint"]
    B -->|Returns Coupon List| C["Display Coupons"]
    C -->|User Selects Coupon| D["Validate Coupons Endpoint"]
    D -->|Check Validity| E{"Coupon Valid?"}
    E -->|Yes| F["Apply Coupon"]
    E -->|No| G["Return Error"]
    F -->|Success| H(["Complete Transaction"])
    G -->|Inform User| C
    classDef entry fill:#00873E,stroke:#1E1E1E,stroke-width:1px,color:#ffffff;
    classDef process fill:#00C875,stroke:#00873E,stroke-width:1px,color:#1E1E1E;
    classDef decision fill:#4A7DFF,stroke:#1E1E1E,stroke-width:1px,color:#ffffff;
    classDef success fill:#00873E,stroke:#1E1E1E,stroke-width:1px,color:#ffffff;
    classDef error fill:#FF6B45,stroke:#1E1E1E,stroke-width:1px,color:#1E1E1E;
    class A entry;
    class B,C,D process;
    class E decision;
    class F,H success;
    class G error;