Gift Cards
Working with digital gift card products.
Gift cards are digital products with redemption codes that can be used at the respective retailer or service.
Purchasing Gift Cards
Use the standard invoice endpoint. See Core Concepts for packages vs ranges.
// Using package_id (fixed value)
const response = await fetch(`${BASE_URL}/invoices`, {
method: 'POST',
headers,
body: JSON.stringify({
products: [{ product_id: 'amazon-us', package_id: 'amazon-us<&>50', quantity: 1 }],
payment_method: 'balance',
auto_pay: true
})
});
// Using value (flexible range)
const response = await fetch(`${BASE_URL}/invoices`, {
method: 'POST',
headers,
body: JSON.stringify({
products: [{ product_id: 'amazon-us', value: 75.50, quantity: 1 }],
payment_method: 'balance',
auto_pay: true
})
});Redemption Info
After delivery, the order contains redemption details. See Core Concepts for field definitions.
| Field | Description |
|---|---|
code | Gift card code |
link | Redemption URL (if applicable) |
pin | PIN if required |
instructions | How to redeem |
Not all gift cards have the same fields. Some have codes, others have links. Check what's returned and handle accordingly.
Common Categories
| Category | Examples |
|---|---|
| E-commerce | Amazon, eBay, Walmart |
| Gaming | Steam, PlayStation, Xbox, Nintendo |
| Streaming | Netflix, Spotify, Disney+ |
| Food & Delivery | Uber Eats, DoorDash, Starbucks |
Updated about 2 months ago