- This pattern covers the full flow for issuing a digital gift card, prepaid card, or similar card-based reward through Snappy’s V3 APIs. Digital cards are ordered through the same
POST /v3/ordersendpoint as physical items, with a lighter address (onlycountryCodeis required). - A digital card entity is created behind the scenes as a result of placing the order. It captures the card-specific details of that order — access card URL, authentication method, amount, recipient, and brand — and is retrievable via the Digital Cards API.
- The last step of the pattern depends on the authentication method configured for your Company. Authentication is a Company-level setting: Snappy configures it during onboarding, and it applies to every digital card your Company issues — you don’t need to check
authentication.methodper card.- If your Company is on
OTP(Snappy’s default), Snappy handles recipient redemption end-to-end. Nothing else to do after the order is placed. - If your Company is on
accessCode, retrieve the static access code from the Digital Cards API and send it to the recipient through your own channel.
- If your Company is on
Prerequisites
- API key with
orders:createscope (anddigitalCards:readif your Company is onaccessCode) - A configured billing method under the ordering Account
Snappy-Account-Idheader set on every request
Step 1 — Find a digital card variant
Digital card products live in a dedicated catalog. Filter the products endpoint byfilter[catalog]=digitalCards to browse what’s available, then pick a specific variant for the order.
JavaScript
Step 2 — Place the order
CallPOST /v3/orders with the digital card variant, the recipient details, and a minimal shippingAddress containing only countryCode. See Place Orders for the underlying mechanics.
JavaScript
{ id, status, trackingLink }. Save orderId — you’ll use it in Step 3 to look up the digital card.
Step 3 — Retrieve the digital card
A digital card entity is created automatically when the order is processed. Look it up byorderId:
JavaScript
{ data: [...], links: {...} }. Each digital card in data carries:
id— the stabledigitalCardId. Use this to fetch the access code (Step 4) if applicable.url— the Snappy-hosted access card page. The recipient opens this URL to authenticate (OTP or access code) and then reach the gift card provider to complete redemption. Share it with the recipient or embed it in your own notification.authentication.method—OTPoraccessCode. Matches your Company’s configured method.amount—{ value, currency }, the card’s denomination.recipient—{ name, email }for the person the card was issued to.orderId,companyId,createdAt— provenance fields for reconciliation with your own records.brand— the card issuer (only wheninclude=brandis set), e.g., Amazon, Visa, Starbucks.
Step 4 — Retrieve the access code (accessCode only)
Skip this step if your Company is on OTP. Snappy handles OTP redemption end-to-end — there’s no static code to retrieve, and the recipient receives everything they need from Snappy’s notifications.
For accessCode integrations, fetch the static code that Snappy generated when the card was issued:
JavaScript
{ data: { digitalCardId, accessCode } }. The code is sensitive — the endpoint requires the digitalCards:read scope and is designed for server-side consumption.
Step 5 — Deliver to the recipient
The last step is on your side and depends on your Company’s authentication method:OTP— nothing to do. Snappy has already sent the recipient a notification with the redemptionurl. When they open the page, Snappy issues a fresh OTP to authenticate them.accessCode— send the recipient a message through your own channel (email, SMS, in-app notification, portal message). Include theurlfrom Step 3 and theaccessCodefrom Step 4. Typically these go together in a single “your reward is ready” notification.
Full flow example
Putting it together for anaccessCode Company:
JavaScript
OTP Company, skip steps 3-4 — Snappy sends the recipient a notification and manages the redemption.
Failure table
Related
- Place Orders — general order placement mechanics
- Digital Cards API overview — the full API surface for retrieving digital cards
- Track Order Fulfillment — webhook signals to know when a digital card is ready to fetch