An ordering platform can offer digital gift card redemption, allowing customers to use gift cards as a flexible payment option during checkout.
This documentation will cover the following API endpoints;
Gift Cards workflow
%%{init: {'theme': 'base', 'themeVariables': {'background': '#ffffff', 'mainBkg': '#ffffff','fontSize': '26px'}}}%%
sequenceDiagram
actor Customer
participant Platform as Ordering Platform
participant API as Deliverect Gift Cards API
participant Provider as Gift Card Provider
Note over Customer,Provider: Checkout — Customer chooses to pay with a gift card
%% 1. Get profile links
Platform->>API: GET /giftCards/channel/{channelLinkId}/providerProfileLinks
API->>Provider: Resolve configured gift card providers
Provider-->>API: Provider profile links
API-->>Platform: 200 { giftCardProviderProfileLinks: [ { id, name } ] }
Note over Platform: Select a giftCardProviderProfileLinkId
%% 2. Get balance
Customer->>Platform: Enter gift card number + verification code
Platform->>API: POST /giftCards (Get balance)<br/>path: channelLinkId, giftCardProviderProfileLinkId<br/>body: { number, verificationCode }
API->>Provider: Look up balance
Provider-->>API: Balance details
API-->>Platform: 200 { amount, giftCardNumber }
alt Sufficient balance
Platform-->>Customer: Show available balance
%% 3. Apply gift card
Customer->>Platform: Confirm amount to redeem
Platform->>API: POST /giftCards (Apply gift card)<br/>path: channelLinkId, giftCardProviderProfileLinkId<br/>body: { number, verificationCode, amount }
API->>Provider: Deduct amount / validate redemption
Provider-->>API: Updated balance
API-->>Platform: 200 { balance }
Platform-->>Customer: Gift card applied — proceed with order injection
else Invalid / insufficient
Platform-->>Customer: Show error, request another payment method
end