Overview
This guide walks through the complete lifecycle of purchasing discounted gift cards via the CardCash API, from authentication through accessing card credentials.Flow Diagram
Step-by-Step
1. Authenticate
2. Find Cards to Buy
3. Purchase Cards
Use condensed checkout to select and purchase cards in a single call:4. Wait for Fulfillment
E-code cards are typically fulfilled within minutes. Physical cards may take longer.5. Access Card Credentials
Best Practices
Token Management
The API refreshes your token when it’s near expiration. Check every response for an updated token:Handling Inventory Availability
Inventory is live and competitive. Between viewing inventory and placing an order, cards may be purchased by others. Refresh inventory close to when you intend to purchase, and if the order fails with “Not all requested cards were added to the cart”, re-check inventory and retry.Retrieve Cards Promptly
Card secure data (number, PIN, barcode) is accessible for 24 hours after purchase. Build your integration to retrieve card data as soon as the order is fulfilled. A small number of new cards may be delivered as redemption URLs instead of a traditional card number and PIN. Contact your account manager for details on which merchants use this format.Accessing Cards by Order
To retrieve card data for a specific order:- Use
GET /v3/orders/:uuidto get the order details — each card has anidfield - Use
GET /v3/wallets/:cardId/secure-datato get the number and PIN for each card
GET /v3/wallets and filter by order ID client-side: