Gift cards
Browse card templates, issue prepaid gift cards from your balance, and track their status.
Issue prepaid gift cards funded from your workspace balance: pick a template (the card design),
create a card for an amount, and hand the returned card details to the recipient. Reading templates
and cards needs the balances:read scope; issuing needs payments:write.
1. Browse templates
const templates = await ap.giftcards.templates();templates = ap.giftcards.templates()templates, err := ap.GiftCards.Templates(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Println(templates)curl "https://api.absolutepay.io/v1/giftcards/templates" \
-H "Authorization: Bearer $APP_TOKEN" $(sign GET /v1/giftcards/templates "")[{ "id": "tmpl-1", "titleEn": "Happy Birthday", "imageUrl": "https://…", "coverType": "birthday" }]Pass a template's id as templateId when issuing.
2. Issue a card
The face value is debited from your workspace balance immediately (insufficient balance fails the
request), so check balances — and preview the fee with
paymentType: "GIFTCARD" — first.
const card = await ap.giftcards.create({
title: "Birthday gift", // shown on the card
templateId: "tmpl-1", // from templates()
amount: { amount: "50.00", currency: "USDT" }, // decimal string, ≤ 6 dp
});
console.log(card.cardNum, card.cardKey);card = ap.giftcards.create(
title="Birthday gift", # shown on the card
template_id="tmpl-1", # from templates()
amount={"amount": "50.00", "currency": "USDT"}, # decimal string, ≤ 6 dp
)
print(card["cardNum"], card["cardKey"])card, err := ap.GiftCards.Create(ctx, absolutepay.GiftCardParams{
Title: "Birthday gift", // shown on the card
TemplateID: "tmpl-1", // from Templates()
Amount: absolutepay.Money{Amount: "50.00", Currency: "USDT"}, // decimal string, ≤ 6 dp
})
if err != nil {
log.Fatal(err)
}
fmt.Println(card["cardNum"], card["cardKey"])BODY='{"title":"Birthday gift","templateId":"tmpl-1","amount":{"amount":"50.00","currency":"USDT"}}'
curl https://api.absolutepay.io/v1/giftcards \
-H "Authorization: Bearer $APP_TOKEN" -H "Content-Type: application/json" \
$(sign POST /v1/giftcards "$BODY") -d "$BODY"{ "cardNum": "gc_9f2…", "cardKey": "…", "title": "Birthday gift", "templateId": "tmpl-1", "amount": { "amount": "50.00", "currency": "USDT" }, "status": "ACTIVE" }The cardKey is the redemption secret
Whoever holds cardKey can redeem the card — treat it like cash. Store it securely, deliver it only
to the recipient, and never log it. Issued value is crypto: there are no chargebacks.
3. List & look up
const cards = await ap.giftcards.list({ status: "ACTIVE" }); // keyset-paginated
const one = await ap.giftcards.get("gc_9f2…"); // by cardNumcards = ap.giftcards.list(status="ACTIVE") # keyset-paginated
one = ap.giftcards.get("gc_9f2…") # by cardNumcards, err := ap.GiftCards.List(ctx, absolutepay.PageQuery{Status: "ACTIVE"}) // keyset-paginated
if err != nil {
log.Fatal(err)
}
one, err := ap.GiftCards.Get(ctx, "gc_9f2…") // by cardNum
if err != nil {
log.Fatal(err)
}
fmt.Println(cards, one)curl "https://api.absolutepay.io/v1/giftcards?status=ACTIVE" \
-H "Authorization: Bearer $APP_TOKEN" $(sign GET "/v1/giftcards?status=ACTIVE" "")
curl "https://api.absolutepay.io/v1/giftcards/gc_9f2…" \
-H "Authorization: Bearer $APP_TOKEN" $(sign GET "/v1/giftcards/gc_9f2…" "")Lists are keyset-paginated (limit, before — see Pagination). Card status is one of
PENDING / REVIEW (not yet active), ACTIVE, REDEEMED, FROZEN, FAILED. Gift cards don't emit
webhook events today — poll get(cardNum) to track redemption.
Next
- Fees — preview the issuance cost with
paymentType: "GIFTCARD". - Balances & reconciliation — the balance the card is funded from.
- API reference — full parameter and response tables for the gift-card endpoints.