Gift Cards
Generate, ban and redeem store-credit gift cards.
Every code is money: whoever holds it can redeem it. That is why even listing them takes a full-access token (gift-cards.read is not part of read-only). Never expose these codes in a browser.
List gift cards
GET
/api/v1/gift-cardsAbilitygift-cards.readReturns the store's gift cards, newest first.
Query parameters
statusstring- active, redeemed, banned or expired.
codestring- The exact card code.
per_pageinteger- Items per page, from 1 to 100. Default 20. A value outside that range returns 422.
pageinteger- Page number, from 1 to 10000. Default 1. A value outside that range returns 422.
curl "https://sellitex.com/api/v1/gift-cards?status=active" \
-H "Authorization: Bearer sk_live_..." \
-H "Accept: application/json"Response200
{
"data": [
{
"id": 501,
"code": "K7QF-2MZD-9XHC",
"amount": 5000,
"currency": "BRL",
"status": "active",
"redeemed_by_customer_id": null,
"redeemed_at": null,
"expires_at": "2027-01-01T00:00:00+00:00",
"created_at": "2026-11-20T12:00:00+00:00"
}
],
"links": {
"first": "…?page=1",
"last": "…?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"per_page": 20,
"to": 1,
"total": 1
}
}Retrieve a gift card
GET
/api/v1/gift-cards/{gift_card}Abilitygift-cards.readA record that belongs to another store answers 404, exactly like one that doesn't exist.
Path parameters
gift_cardintegerrequired- The gift card id.
curl "https://sellitex.com/api/v1/gift-cards/501" \
-H "Authorization: Bearer sk_live_..." \
-H "Accept: application/json"Response200
{
"data": {
"id": 501,
"code": "K7QF-2MZD-9XHC",
"amount": 5000,
"currency": "BRL",
"status": "active",
"redeemed_by_customer_id": null,
"redeemed_at": null,
"expires_at": "2027-01-01T00:00:00+00:00",
"created_at": "2026-11-20T12:00:00+00:00"
}
}Generate gift cards
POST
/api/v1/gift-cardsAbilitygift-cards.writeGenerates a batch of cards, all worth the same amount in the store's currency, and returns the codes created.
Request body (JSON)
amountintegerrequired- Amount of each card, in cents — at least 100.
quantityintegerrequired- How many cards to generate, up to the batch size the panel allows.
expires_atdate- When the cards expire — a future date. Without it, they never expire.
curl -X POST "https://sellitex.com/api/v1/gift-cards" \
-H "Authorization: Bearer sk_live_..." \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"amount":5000,"quantity":10,"expires_at":"2027-01-01"}'Response201
{
"data": [
{
"id": 501,
"code": "K7QF-2MZD-9XHC",
"amount": 5000,
"currency": "BRL",
"status": "active",
"redeemed_by_customer_id": null,
"redeemed_at": null,
"expires_at": "2027-01-01T00:00:00+00:00",
"created_at": "2026-11-20T12:00:00+00:00"
}
]
}Ban a gift card
POST
/api/v1/gift-cards/{gift_card}/banAbilitygift-cards.writeStops the card from being redeemed. Only an active card can be banned.
Path parameters
gift_cardintegerrequired- The gift card id.
Possible refusals
gift_card_not_active409- The card is not active (already redeemed, banned or expired).
curl -X POST "https://sellitex.com/api/v1/gift-cards/501/ban" \
-H "Authorization: Bearer sk_live_..." \
-H "Accept: application/json"Response200
{
"data": {
"id": 501,
"code": "K7QF-2MZD-9XHC",
"amount": 5000,
"currency": "BRL",
"status": "banned",
"redeemed_by_customer_id": null,
"redeemed_at": null,
"expires_at": "2027-01-01T00:00:00+00:00",
"created_at": "2026-11-20T12:00:00+00:00"
}
}Unban a gift card
POST
/api/v1/gift-cards/{gift_card}/unbanAbilitygift-cards.writeLets a banned card be redeemed again.
Path parameters
gift_cardintegerrequired- The gift card id.
Possible refusals
gift_card_not_banned409- The card is not banned.
curl -X POST "https://sellitex.com/api/v1/gift-cards/501/unban" \
-H "Authorization: Bearer sk_live_..." \
-H "Accept: application/json"Response200
{
"data": {
"id": 501,
"code": "K7QF-2MZD-9XHC",
"amount": 5000,
"currency": "BRL",
"status": "active",
"redeemed_by_customer_id": null,
"redeemed_at": null,
"expires_at": "2027-01-01T00:00:00+00:00",
"created_at": "2026-11-20T12:00:00+00:00"
}
}Redeem a gift card
POST
/api/v1/gift-cards/redeemAbilitygift-cards.redeemCredits the card's amount to the wallet of one of the store's customers. Crediting and marking the card redeemed happen together: a card is never redeemed twice.
Request body (JSON)
codestringrequired- The card code.
customer_idintegerrequired- The customer who receives the credit. Must belong to your store.
This endpoint always responds 200 OK, even on rejection — check the success field in the response body, not the HTTP status.
Response fields
redeemedboolean- Whether the card was redeemed.
reasonstring|null- Why it was rejected: not_found, banned, already_redeemed or expired. null when redeemed.
amountinteger|null- Amount credited, in cents.
currencystring|null- The card's currency.
new_balanceinteger|null- The customer's wallet balance after the credit, in cents.
curl -X POST "https://sellitex.com/api/v1/gift-cards/redeem" \
-H "Authorization: Bearer sk_live_..." \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"code":"K7QF-2MZD-9XHC","customer_id":42}'Response200
{
"redeemed": true,
"reason": null,
"amount": 5000,
"currency": "BRL",
"new_balance": 7500
}The object
The fields this resource's endpoints return. Money is an integer in cents and dates are ISO 8601, in UTC.
idinteger- The gift card identifier.
codestring- The code to redeem.
amountinteger- Amount, in cents.
currencystring- The card's currency.
statusstring- active, redeemed, banned or expired.
redeemed_by_customer_idinteger|null- The customer who redeemed it, once redeemed.
redeemed_atstring|null- When it was redeemed.
expires_atstring|null- When it expires, if it does.
created_atstring- When it was created.