Buy Gift Card
This page explains how to buy gift cards through the Prestmit API.
By buying gift cards through the Prestmit API, you offer your users a smooth, automated way to purchase digital gift cards.
Prerequisites
Before you can use the gift card buying endpoints, ensure you have:
- API Authentication: Valid API key as specified in API Keys & Authentication
- Funded Wallet: Sufficient balance in your Prestmit wallet
- Webhook Setup: Configured webhook URL to receive gift card delivery notifications
π The Buy Gift Card Process
Here's how the process works from start to finish:
- Browse Gift Cards: Fetch available cards and their prices
- Calculate Payment: Get the exact cost for selected cards and quantity
- Create Order: Send a request to buy the card
- Payment: The system deducts the amount from your Prestmit wallet
- Delivery: Retrieve the gift card codes once payment is complete
π Available Endpoints
You'll use these endpoints for gift card purchase:
| Endpoint | Method | Purpose |
|---|---|---|
/giftcard-trade/buy/config | GET | Get configuration, available cards, and payment methods |
/giftcard-trade/buy/calculate-payment | POST | Calculate exact payment amount for selected cards |
/giftcard-trade/buy/create | POST | Create a new buy gift card transaction |
/giftcard-trade/buy/fetch-codes/{reference} | GET | Retrieve gift card codes after successful payment |
/giftcard-trade/buy/history | GET | View your buy gift card transaction history |
Tip: Always use the
/calculate-paymentendpoint before creating orders to show users the exact amount they'll pay in their preferred currency.
Updated 5 months ago