About Buy Gift Card Config
This page explains how to fetch all available buy gift card configurations, including availability status, supported payment methods, and the catalog of available gift cards.
Before creating a buy transaction, use this endpoint to get configuration details about the gift card marketplace.
It returns whether buying gift card is currently enabled on Prestmit, which payment methods are supported (e.g., Naira, Cedis), and provides a list of all gift cards you can buy, with price ranges, currencies, and regions.
π‘ Endpoint
GET /giftcard-trade/buy/config
Use this to:
- Build your product selector or catalog view in your app.
- Confirm available payment currencies.
- Validate a user's choice before calculating payment.
π§ Understanding the Response
Below are the key fields in the response and what they mean:
| Field | Description |
|---|---|
enabled | A boolean value that tells you if the gift card buying feature is currently active. (true means enabled.) |
paymentMethods | A quick list of supported payment methods, such as ["NAIRA", "CEDIS"]. For instance, Naira means your Naira wallet will be debited. |
paymentMethodsAll | A detailed object showing all possible payment methods and their availability (true or false). Includes Naira and Cedis. |
availableGiftCards | A catalog of all the gift cards that can be purchased. Each card includes information like title, price range, image, regions, and currency. |
countries | A full list of supported countries with flags, codes, and their currencies. Useful for region-based card filtering. |
π·οΈ Inside Each availableGiftCards Item
availableGiftCards ItemEach gift card object contains details like:
| Key | Meaning |
|---|---|
sku | The unique stock keeping unit, used to identify this specific gift card when creating a transaction. |
upc | Universal product code. Can be used for catalog indexing or unique identification. |
title | The name of the gift card (e.g., "Google Play USA"). |
description | Object with title and content describing the card and its use. |
minPrice / maxPrice | The minimum and maximum price allowed when purchasing this card. |
currency | The currency of the card value, including the symbol and code (e.g., {"currency": "USD", "symbol": "$", "code": "USD"}). |
preOrder | If true, it means the card can be pre-ordered and might not deliver instantly. |
categories | The categories or product groups to which the card belongs (e.g., "Gaming", "E-commerce"). |
regions | Supported regions where the card can be used (e.g., "Global", "US Only"). |
imageUrl | URL to the card's display image, ideal for showing the product thumbnail in your UI. |
π§Ύ Sample Response
{
"enabled": true,
"paymentMethods": ["NAIRA", "CEDIS"],
"paymentMethodsAll": {
"NAIRA": true,
"CEDIS": true
},
"availableGiftCards": [
{
"sku": 922,
"upc": 659245752108,
"title": "Google Play Gift Card",
"description": {
"title": "Product Description:",
"content": "Power up in over 1M Android apps and games on Google Play, the world's largest mobile gaming platform. Use your gift card to purchase apps, games, music, movies, TV shows, books, and more."
},
"minPrice": 5,
"maxPrice": 200,
"currency": {
"currency": "US Dollar",
"symbol": "$",
"code": "USD"
},
"preOrder": false,
"categories": [{ "name": "Gaming" }],
"regions": [{ "name": "United States", "code": "US" }],
"imageUrl": "https://cdn.prestmit.io/images/google-play-card.jpg"
}
],
"countries": [
{
"name": "United States",
"code": "us",
"flag": "πΊπΈ",
"currency": {
"currency": "US Dollar",
"symbol": "$",
"code": "usd"
}
}
]
}Tip:
Always use the enabled flag and paymentMethods data to control what your users see dynamically in your product selector.
If buying is disabled, you can temporarily hide or disable the buy feature in your interface.
Updated 5 months ago
Next... let's go through the process of creating a buy gift card transaction over the API.