API Documentation
Gift Cards API - Version 1.0
Pricing Logic & Security
Server-Side Pricing: Local amount is sent to Reloadly, USD base is calculated server-side, fee percent is applied on USD base, and user balance is deducted using USD total.
API Key Required: All requests require a valid API key. Never expose your API key in client-side code.
Base URL & Authentication
Base URL:
https://kripicard.com/api/giftsAuthentication:
All endpoints require an api_key parameter in the request body.
1. Get Giftcard Packages
POSTEndpoint:
POST /api/gifts/packagesRequest Body
api_key (string) *required
Your API authentication key
page (integer) optional
Page number for pagination
search (string) optional
Search by product name (e.g., "App Store & iTunes TRY")
country (string) optional
Filter by country ISO code (e.g., "US", "TR", "UK")
Example Request
{
"api_key": "YOUR_API_KEY",
"page": 1,
"search": "App Store & iTunes TRY",
"country": ""
}Example Response
{
"success": true,
"pagination": {
"page": 1,
"per_page": 20,
"total": 2560
},
"countries": {
"US": "United States",
"UK": "United Kingdom",
"TR": "Turkey"
},
"giftcards": [
{
"product_id": 20004,
"product_name": "App Store & iTunes TRY",
"country_iso": "TR",
"country_name": "Turkey",
"brand": "Apple",
"denominations": [10, 25, 50, 100],
"currency": "TRY",
"description": "Apple App Store & iTunes Turkey",
"logo_url": "https://..."
}
]
}2. Purchase Giftcard
POSTEndpoint:
POST /api/gifts/purchaseRequest Body
api_key (string) *required
Your API authentication key
recipient_email (string) *required
Email address to receive gift card code and redemption instructions
product_id (number) *required
Product ID from the Get Giftcard Packages endpoint
country_iso (string) *required
Country ISO code (e.g., "TR", "US", "UK")
local_amount (number) *required
Local currency amount (e.g., 10, 25, 50)
service_name (string) *required
Service name from the Get Giftcard Packages endpoint
Pricing Logic
- • Local amount is sent to Reloadly
- • USD base is calculated server-side
- • Fee percent is applied on USD base
- • User balance is deducted using USD total
Example Request
{
"api_key": "YOUR_API_KEY",
"recipient_email": "test@email.com",
"local_amount": 10,
"product_id": 20004,
"country_iso": "TR",
"service_name": "App Store & iTunes TRY"
}Example Response
{
"success": true,
"usd_base": 0.23,
"fee": 0.02,
"total": 0.25,
"message": "Gift card purchased successfully",
"gift_card": {
"code": "XXXX-XXXX-XXXX-XXXX",
"pin": "1234",
"redemption_url": "https://...",
"expiry_date": "2027-12-31"
}
}