Sell a gift card
curl --request POST \
--url https://merchant.bitliva.com/api/v1/giftcards/sales \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>",
"giftcard_id": 123,
"amount": 123,
"reference": "<string>",
"ecode": "<string>",
"comment": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_id: '<string>',
giftcard_id: 123,
amount: 123,
reference: '<string>',
ecode: '<string>',
comment: '<string>'
})
};
fetch('https://merchant.bitliva.com/api/v1/giftcards/sales', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://merchant.bitliva.com/api/v1/giftcards/sales"
payload = {
"customer_id": "<string>",
"giftcard_id": 123,
"amount": 123,
"reference": "<string>",
"ecode": "<string>",
"comment": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://merchant.bitliva.com/api/v1/giftcards/sales",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_id' => '<string>',
'giftcard_id' => 123,
'amount' => 123,
'reference' => '<string>',
'ecode' => '<string>',
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": "success",
"message": "Gift card submitted successfully. You will be notified once it is reviewed.",
"data": {
"transaction": {
"id": "9d3c5a1e-5b7e-4c2a-9f43-0c6c1b7a2d10",
"type": "giftcard_sale",
"status": "pending",
"amount": "59000.00",
"fee": "0.00",
"currency": "NGN",
"reference": "gc-9",
"customer_id": "2f6d1c0a-8a3e-4d59-b8a1-71e0c4d5f9a3",
"details": {
"card": "Amazon USD",
"card_value_usd": "50.00",
"rate": "1180.00"
},
"crypto": null,
"created_at": "2026-10-18T10:15:00+01:00"
}
}
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}Gift cards
Sell a gift card
Submits a gift card for review. Use multipart/form-data.
Stays pending until reviewed, then successful or failed.
POST
/
giftcards
/
sales
Sell a gift card
curl --request POST \
--url https://merchant.bitliva.com/api/v1/giftcards/sales \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>",
"giftcard_id": 123,
"amount": 123,
"reference": "<string>",
"ecode": "<string>",
"comment": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_id: '<string>',
giftcard_id: 123,
amount: 123,
reference: '<string>',
ecode: '<string>',
comment: '<string>'
})
};
fetch('https://merchant.bitliva.com/api/v1/giftcards/sales', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://merchant.bitliva.com/api/v1/giftcards/sales"
payload = {
"customer_id": "<string>",
"giftcard_id": 123,
"amount": 123,
"reference": "<string>",
"ecode": "<string>",
"comment": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://merchant.bitliva.com/api/v1/giftcards/sales",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_id' => '<string>',
'giftcard_id' => 123,
'amount' => 123,
'reference' => '<string>',
'ecode' => '<string>',
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": "success",
"message": "Gift card submitted successfully. You will be notified once it is reviewed.",
"data": {
"transaction": {
"id": "9d3c5a1e-5b7e-4c2a-9f43-0c6c1b7a2d10",
"type": "giftcard_sale",
"status": "pending",
"amount": "59000.00",
"fee": "0.00",
"currency": "NGN",
"reference": "gc-9",
"customer_id": "2f6d1c0a-8a3e-4d59-b8a1-71e0c4d5f9a3",
"details": {
"card": "Amazon USD",
"card_value_usd": "50.00",
"rate": "1180.00"
},
"crypto": null,
"created_at": "2026-10-18T10:15:00+01:00"
}
}
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}{
"status": "error",
"message": "Invalid or missing API key.",
"code": "invalid_api_key"
}Authorizations
Your API key.
Body
application/jsonmultipart/form-data
The customer's id.
From the gift cards list.
Card value in US dollars, at least the card's minimum.
Your own unique id for this sale (up to 64 letters, numbers and . _ : -). Sending the same reference again returns the original instead of doing it twice.
The card code, for e-codes. Required unless you send attachments.
Anything the reviewer should know (up to 500 characters).

