gift-cards

Issue, redeem, and track gift card balances with an append-only ledger.

14|3|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/tomtoto757/ecomm-ai-skills-hub --skill gift-cards-tomtoto757
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gift-cards
Source: https://github.com/tomtoto757/ecomm-ai-skills-hub/tree/main/skills/pricing-promotions-loyalty/finsilabs/pricing-promotions/gift-cards
Command: npx skills add https://github.com/tomtoto757/ecomm-ai-skills-hub --skill gift-cards-tomtoto757

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provide merchants with a reliable, auditable way to sell, issue, redeem, and refund gift cards while preventing double-spend, ensuring correct accounting treatment, and supporting partial redemptions and expirations across hosted and headless storefronts.

Core Features & Use Cases

  • Platform guidance: Step-by-step configuration notes for Shopify, WooCommerce, and BigCommerce plus patterns for custom/headless implementations.
  • Append-only ledger: Design and code examples for ledger-based balance calculation so every debit/credit is auditable for finance and support.
  • Safe redemption & refunds: Row-level locking, partial-use capping, reactivation on refund, and tips for avoiding race conditions during high concurrency events.
  • Operational practices: Secure code generation, masking in logs, expiry/legal considerations, and accounting liability handling for issuance and refunds.
  • Use case: Sell gift cards as products, issue bulk corporate credits, refund customers to store credit, and allow mixed payment at checkout.

Quick Start

Issue a $50 gift card for [email protected], atomically record the initial issue transaction in the ledger, and send the recipient an email containing the generated code.

Frequently Asked Questions about gift-cards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent gift card double-spend during concurrent redemptions on my ecommerce storefront?

Prevent gift card double-spend during concurrent redemptions by applying row-level locking on the database ledger entries. This ensures only one transaction modifies a balance at a time, blocking race conditions safely.

What is the best way to track gift card balances for Shopify and WooCommerce?

The best way to track gift card balances is an append-only ledger design. Every debit and credit is recorded as an immutable entry, making balance calculation and financial auditing fully transparent across Shopify, WooCommerce, and BigCommerce.

How do I securely generate gift card codes and handle partial redemptions?

Securely generate gift card codes using cryptographically secure generation methods and enforce case-insensitive unique constraints. Handle partial redemptions by recording specific debit amounts in the ledger without invalidating the remaining balance.

Does this gift card issuance approach work with headless storefronts?

Yes, this gift card issuance approach works with headless storefronts. It provides platform-agnostic configuration patterns and ledger implementation details that integrate seamlessly with custom ecommerce architectures alongside hosted platforms.

Why should monetary values be stored as integer-cents for store credit and gift cards?

Monetary values should be stored as integer-cents for store credit to eliminate floating-point rounding errors. This ensures precise accounting treatment for gift card issuance, partial redemptions, and refunds in your ecommerce ledger.

How do I handle gift card refunds and reactivation for bulk corporate programs?

Handle gift card refunds by reactivating the original code and appending a credit transaction to the ledger. This supports bulk corporate programs by ensuring balances are restored accurately and auditable for finance teams.