Introduction
The KTN Gift Card Merchant API is a RESTful service that lets you programmatically list available gift cards, purchase them, manage orders, retrieve gift card credentials, and handle refunds. All communication happens over HTTPS with JSON request and response bodies.
Base URL
All API requests should be made to the following base URL. All communication is over HTTPS.
https://api.ktngiftcard.katronai.com/katron-gift-card/api/v1/merchant/getAccountDetails resolves to https://api.ktngiftcard.katronai.com/katron-gift-card/api/v1/merchant/getAccountDetails.Authentication
The API uses Bearer Token authentication. When you create a Merchant API profile, an API key (JWT token) is sent to your registered email address. Include this token in theAuthorization header of every request.
GET /api/v1/merchant/getAccountDetails HTTP/1.1
Host: api.ktngiftcard.katronai.com
Authorization: Bearer YOUR_API_KEY
Content-Type: application/jsonQuick Start Guide
Get up and running in two simple steps. Create your merchant API profile from the API Profile page, then start making requests.
Retrieve Your API Key
After creating your profile from the API Profile page, your API key (Bearer token) is sent to your registered email address. This token is used for all subsequent calls to /api/v1/merchant/* endpoints.
Make Your First Request
Use your merchant API key to list all available gift cards:
curl -X GET \
"https://api.ktngiftcard.katronai.com/katron-gift-card/api/v1/merchant/giftCard/listGiftCards" \
-H "Authorization: Bearer YOUR_MERCHANT_API_KEY" \
-H "Content-Type: application/json"Example successful response:
{
"status": 200,
"message": "cards fetched successfully",
"data": [
{
"productId": 18808,
"productName": "Rewarble VISA Global US",
"denominationType": "RANGE",
"minSenderDenomination": 5,
"maxSenderDenomination": 100,
"fixedSenderDenominations": null,
"brand": {
"brandId": 561,
"brandName": "Rewarble Visa"
},
"redeemInstruction": {
"concise": "Visit the Redemption Website: www.rewarble.com/redeem.\nEnter Rewarble Code...",
"verbose": "Description:\nExperience the simplicity and privacy of digital payments..."
}
}
]
}Account
Get Account Details
Retrieve your merchant account information including profile status, balance, and configuration.
/api/v1/merchant/getAccountDetailsReturns detailed information about your merchant API profile including your current balance, active status, charge type, and other account metadata.
curl -X GET \
"https://api.ktngiftcard.katronai.com/katron-gift-card/api/v1/merchant/getAccountDetails" \
-H "Authorization: Bearer YOUR_MERCHANT_API_KEY"Example response:
{
"status": 200,
"message": "fetched merchant api profile",
"data": {
"id": 1,
"createdAt": "2026-04-15T18:25:05.437+00:00",
"updatedAt": "2026-04-24T03:13:16.558+00:00",
"version": 3,
"active": true,
"merchantApiProfileBalanceAccount": {
"id": 1,
"createdAt": "2026-04-15T18:25:05.439+00:00",
"updatedAt": "2026-04-15T18:25:05.439+00:00",
"version": 0,
"active": false,
"balance": 0,
"chargeType": "CHARGE_CARD"
}
}
}Get Active Fee Preference
Retrieve the current fee schedule that applies to your merchant API transactions.
/api/v1/merchant/giftCard/getActiveFeePreferenceFees are tier-based and vary by purchase amount. The response contains fixed fees for smaller amounts and a percentage-based fee for larger transactions.
curl -X GET \
"https://api.ktngiftcard.katronai.com/katron-gift-card/api/v1/merchant/giftCard/getActiveFeePreference" \
-H "Authorization: Bearer YOUR_MERCHANT_API_KEY"Example response:
{
"status": 200,
"message": "successfully fetched",
"data": {
"id": 3,
"createdAt": "2026-04-15T18:20:53.228+00:00",
"updatedAt": "2026-04-15T18:20:53.228+00:00",
"version": 0,
"active": true,
"giftCardFeeType": "FEE_TYPE_MERCHANT_API",
"feeFor1To99": 0.6,
"feeFor100To250": 0.5,
"feeFor251To500": 0.4,
"feeFor501To750": 0.3,
"feeFor751To999": 0.2,
"feePercentageFor1000To5000": 2
}
}| Amount Range | Fee Type | Field |
|---|---|---|
| $1 – $99 | Fixed ($) | feeFor1To99 |
| $100 – $250 | Fixed ($) | feeFor100To250 |
| $251 – $500 | Fixed ($) | feeFor251To500 |
| $501 – $750 | Fixed ($) | feeFor501To750 |
| $751 – $999 | Fixed ($) | feeFor751To999 |
| $1,000 – $5,000 | Percentage (%) | feePercentageFor1000To5000 |
Gift Cards
List Gift Cards
Retrieve all available gift cards that can be purchased through your merchant API profile.
/api/v1/merchant/giftCard/listGiftCardsReturns a comprehensive list of gift cards including product details, denominations, pricing, brand information, country availability, and redemption instructions. Each card has eitherFIXED orRANGE denomination types.
curl -X GET \
"https://api.ktngiftcard.katronai.com/katron-gift-card/api/v1/merchant/giftCard/listGiftCards" \
-H "Authorization: Bearer YOUR_MERCHANT_API_KEY"Response fields per gift card:
| Parameter | Type | Required | Description |
|---|---|---|---|
productId | integer (int64) | Required | Unique identifier for the gift card product. Used when purchasing. |
productName | string | Required | Display name of the gift card. |
denominationType | string | Required | FIXED (specific amounts) or RANGE (min/max range). |
fixedRecipientDenominations | number[] | Optional | Available fixed denominations (when type is FIXED). |
minRecipientDenomination | number | Optional | Minimum denomination (when type is RANGE). |
maxRecipientDenomination | number | Optional | Maximum denomination (when type is RANGE). |
recipientCurrencyCode | string | Required | Currency code for the gift card (e.g., USD, EUR). |
senderFee | number | Required | Fixed fee charged to the sender. |
senderFeePercentage | number | Required | Percentage fee charged to the sender. |
discountPercentage | number | Required | Discount percentage applied to the card. |
logoUrls | string[] | Required | Array of logo image URLs for the card. |
brand | object | Required | Brand info: { brandId, brandName }. |
category | object | Required | Category info: { id, name }. |
country | object | Required | Country info: { isoName, name, flagUrl }. |
redeemInstruction | object | Required | Redemption instructions: { concise, verbose }. |
Purchase Gift Card
Purchase a gift card through your merchant API profile. The purchase will be charged according to your configured charge type.
/api/v1/merchant/giftCard/purchaseGiftCardSend a JSON request body with the gift card details. The productId can be obtained from the list gift cards endpoint. The unitPrice must match one of the available denominations for the selected gift card.
Idempotent-Key in the request headers to prevent accidental duplicate purchases. This should be a cryptographically generated UUID for every unique transaction attempt. Retries of the same transaction should send the original Idempotent-Key.Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
Idempotent-Key | string | Required | A unique key (UUID recommended) to guarantee idempotency and prevent duplicate charges. |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
productId | integer (int64) | Required | The ID of the gift card product to purchase. |
unitPrice | number (float) | Required | The denomination/amount of the gift card. |
email | string | Optional | Recipient email address for gift card delivery. |
senderName | string | Required | Name of the sender/purchaser. |
curl -X POST \
"https://api.ktngiftcard.katronai.com/katron-gift-card/api/v1/merchant/giftCard/purchaseGiftCard" \
-H "Authorization: Bearer YOUR_MERCHANT_API_KEY" \
-H "Idempotent-Key: 123e4567-e89b-12d3-a456-426614174000" \
-H "Content-Type: application/json" \
-d '{
"productId": 1234,
"unitPrice": 50.00,
"email": "recipient@example.com",
"senderName": "Acme Corp"
}'Example response:
{
"status": 200,
"message": "gift card order created!",
"data": {
"id": 65,
"createdAt": "2026-04-24T03:21:54.084+00:00",
"updatedAt": "2026-04-24T03:21:54.084+00:00",
"version": 0,
"active": false,
"productId": 20308,
"quantity": 1,
"unitPrice": 1,
"fee": 0.6,
"subTotal": 1,
"total": 1.6,
"transactionId": null,
"customIdentifier": null,
"email": "mdibrahimk935@gmail.com",
"productName": "Visa Prepaid US $1 to $150",
"redeemInstruction": {
"concise": "Description:\n\nUse your Visa Prepaid card anywhere...",
"verbose": "Description:\n\nUse your Visa Prepaid card anywhere..."
},
"senderName": "ibrahim",
"paymentStatus": "PENDING",
"giftCardStatus": "PENDING",
"giftCardTransactionId": null,
"giftCardCustomIdentifier": null,
"paymentTransactionId": "onDXOXLWWWbboObL",
"productPhoto": "https://cdn.reloadly.com/giftcards/...",
"merchantApiProfileId": null,
"chargeType": "CHARGE_CARD"
}
}unitPrice must exactly match one of the values in fixedRecipientDenominations.RANGE denomination cards: The
unitPrice must be between minRecipientDenomination and maxRecipientDenomination.Orders
List All Orders
Retrieve a list of all gift card orders placed through your merchant API profile.
/api/v1/merchant/giftCard/listAllGiftCardOrdersReturns all orders with details including order status, product information, pricing, and timestamps. Use this to reconcile purchases and track delivery status.
curl -X GET \
"https://api.ktngiftcard.katronai.com/katron-gift-card/api/v1/merchant/giftCard/listAllGiftCardOrders" \
-H "Authorization: Bearer YOUR_MERCHANT_API_KEY"Example response:
{
"status": 200,
"message": "gift card order list fetched successfully",
"data": [
{
"id": 65,
"createdAt": "2026-04-24T03:21:54.084+00:00",
"updatedAt": "2026-04-24T03:22:44.510+00:00",
"version": 2,
"active": false,
"productId": 20308,
"quantity": 1,
"unitPrice": 1,
"fee": 0.6,
"subTotal": 1,
"total": 1.6,
"email": "mdibrahimk935@gmail.com",
"productName": "Visa Prepaid US $1 to $150",
"senderName": "ibrahim",
"paymentStatus": "SUCCESS",
"giftCardStatus": "SUCCESS",
"giftCardTransactionId": "67767",
"giftCardCustomIdentifier": "81d71b7a-3b70-4ade-9bf9-6b5138b598c1",
"paymentTransactionId": "onDXOXLWWWbboObL",
"merchantApiProfileId": 1,
"chargeType": "CHARGE_CARD"
}
]
}Get Order By ID
Retrieve detailed information about a specific gift card order.
/api/v1/merchant/giftCard/getGiftCardOrderById?orderId={orderId}| Parameter | Type | Required | Description |
|---|---|---|---|
orderId | integer (int64) | Required | The ID of the gift card order to retrieve. |
curl -X GET \
"https://api.ktngiftcard.katronai.com/katron-gift-card/api/v1/merchant/giftCard/getGiftCardOrderById?orderId=5678" \
-H "Authorization: Bearer YOUR_MERCHANT_API_KEY"Example response:
{
"status": 200,
"message": "gift card fetched successfully",
"data": {
"id": 65,
"createdAt": "2026-04-24T03:21:54.084+00:00",
"updatedAt": "2026-04-24T03:22:44.510+00:00",
"version": 2,
"active": false,
"productId": 20308,
"quantity": 1,
"unitPrice": 1,
"fee": 0.6,
"subTotal": 1,
"total": 1.6,
"email": "mdibrahimk935@gmail.com",
"productName": "Visa Prepaid US $1 to $150",
"senderName": "ibrahim",
"paymentStatus": "SUCCESS",
"giftCardStatus": "SUCCESS",
"giftCardTransactionId": "67767",
"giftCardCustomIdentifier": "81d71b7a-3b70-4ade-9bf9-6b5138b598c1",
"paymentTransactionId": "onDXOXLWWWbboObL",
"chargeType": "CHARGE_CARD"
}
}Get Gift Card Credentials
Retrieve the actual gift card details (activation code, PIN, URL, etc.) for a completed order.
/api/v1/merchant/giftCard/getGiftCardCredentials?orderId={orderId}| Parameter | Type | Required | Description |
|---|---|---|---|
orderId | integer (int64) | Required | The ID of the gift card order. |
curl -X GET \
"https://api.ktngiftcard.katronai.com/katron-gift-card/api/v1/merchant/giftCard/getGiftCardCredentials?orderId=5678" \
-H "Authorization: Bearer YOUR_MERCHANT_API_KEY"Example response:
{
"status": 200,
"message": "credentials fetched successfully",
"data": [
{
"cardNumber": "9onzdtest",
"pinCode": "24485test",
"redemptionUrl": null
}
]
}Refresh Order
Refresh the status of a gift card order. Useful if the order is still processing or if credentials haven't been delivered yet.
/api/v1/merchant/giftCard/refreshOrder?orderId={orderId}| Parameter | Type | Required | Description |
|---|---|---|---|
orderId | integer (int64) | Required | The ID of the order to refresh. |
curl -X POST \
"https://api.ktngiftcard.katronai.com/katron-gift-card/api/v1/merchant/giftCard/refreshOrder?orderId=5678" \
-H "Authorization: Bearer YOUR_MERCHANT_API_KEY"Example response:
{
"status": 200,
"message": "gift card order initiated!",
"data": ""
}Refund Order Payment
Request a refund for a gift card order. Refund eligibility depends on the card brand and order status.
/api/v1/merchant/giftCard/refundOrderPayment?orderId={orderId}| Parameter | Type | Required | Description |
|---|---|---|---|
orderId | integer (int64) | Required | The ID of the order to refund. |
curl -X POST \
"https://api.ktngiftcard.katronai.com/katron-gift-card/api/v1/merchant/giftCard/refundOrderPayment?orderId=5678" \
-H "Authorization: Bearer YOUR_MERCHANT_API_KEY"Example response:
{
"status": 200,
"message": "refunded successfully",
"data": "refunded"
}Void Order Payment
Void the payment for a pending or recently placed order before it is fully processed.
/api/v1/merchant/giftCard/voidOrderPayment?orderId={orderId}| Parameter | Type | Required | Description |
|---|---|---|---|
orderId | integer (int64) | Required | The ID of the order to void. |
curl -X POST \
"https://api.ktngiftcard.katronai.com/katron-gift-card/api/v1/merchant/giftCard/voidOrderPayment?orderId=5678" \
-H "Authorization: Bearer YOUR_MERCHANT_API_KEY"Example response:
{
"status": 200,
"message": "voided successfully",
"data": "void"
}Schemas
Response Object
All API endpoints return a standardized response envelope with the following structure:
{
"status": 200, // HTTP status code (integer)
"message": "Success", // Human-readable message (string)
"data": { ... } // Response payload (object, array, or null)
}| Parameter | Type | Required | Description |
|---|---|---|---|
status | integer (int32) | Required | HTTP status code mirrored in the response body. |
message | string | Required | Human-readable status message. |
data | object | null | Required | The response payload. May be null on errors. |
MerchantApiProfileGiftCardOrderRequest
The request body schema for purchasing a gift card through the merchant API.
interface MerchantApiProfileGiftCardOrderRequest {
productId: number; // int64 — Gift card product ID
unitPrice: number; // float — Denomination amount
email?: string; // Recipient email for delivery
senderName: string; // Required — Sender/purchaser name
}| Parameter | Type | Required | Description |
|---|---|---|---|
productId | integer (int64) | Required | The product ID from the list gift cards response. |
unitPrice | number (float) | Required | Must match a fixed denomination or fall within the min/max range. |
email | string | Optional | Email address where the gift card credentials will be sent. |
senderName | string | Required | The name displayed as the sender of the gift card. |
ChargeType Enum
The charge type determines how gift card purchases are billed to your merchant account.
| Value | Description |
|---|---|
CHARGE_CARD | Purchases are charged directly to the credit/debit card on file. Ideal for pay-as-you-go usage patterns. |
CHARGE_ACCOUNT_BALANCE | Purchases are deducted from the pre-loaded merchant account balance. Ideal for high-volume, prepaid usage. |
Error Handling
Error Response Format
When an error occurs, the API returns a consistent error envelope. The HTTP status code is mirrored in the response body for convenience.
// Example 401 Unauthorized
{
"status": "error",
"message": "Full authentication is required to access this resource",
"errors": "InsufficientAuthenticationException"
}
// Example 400 or 500
{
"status": "error",
"message": "message goes to here",
"errors": "additional error details goes here"
}Common Error Codes
| Status | Meaning | How to Fix |
|---|---|---|
| 400 | Bad Request — Invalid or missing parameters | Check the request format, required parameters, and enum values. |
| 401 | Unauthorized — Missing or invalid API key | Ensure the Authorization header contains a valid Bearer token. |
| 403 | Forbidden — Access denied for this resource | Ensure you're using the correct endpoint and your profile is active. |
| 404 | Not Found — Resource does not exist | Verify the order ID or product ID is correct. |
| 500 | Internal Server Error | Retry after a moment. If the issue persists, contact support. |
status field in the response body, not just the HTTP status code. Some successful operations may return additional context in themessage field.Ready to integrate?
Create your Merchant API profile and start purchasing gift cards programmatically in minutes.