Gift Cards, Store Credit and Partial Payments: What AI Has to Get Right

AI gift card balance lookup and store credit handling in ecommerce
How ecommerce AI handles gift card balances, promo codes, and store credit with read-only accuracy.

Payments Is Where AI Earns Trust or Breaks It

The FTC logged at least $212 million in gift card scam losses in 2024. The global gift card market sits above $650 billion. Those two facts create a tension every ecommerce AI has to face: customers want instant answers about their balance, and the stakes for getting it wrong are enormous.

A wrong balance isn't "the bot was a little off." It's a refund ticket, a refund ticket, a chargeback, or a fraud incident. Gartner found that chatbots resolve only 40% of payment and transaction issues. Most AI tools either dodge payments entirely or give the AI too much access. Alhena takes a different approach today: the AI reads and verifies store credit, gift card, store credit, and discount data, the merchant's native checkout writes and applies.

Gift Card Balance Lookups: Confirm Before You Reveal

When a customer asks "What's left on my gift card?", the answer has to be an exact number. $23.50, not "approximately $20." This is where hallucination-free, grounded AI matters most.

Alhena's check_gift_card_balance tool works across Shopify and BigCommerce. The Shopify gift card lookup queries the GraphQL API using the last four characters of the card code. Shopify never exposes the full gift card codes. It returns the masked code, remaining balance, initial value, enabled status, and expiration date. On BigCommerce, the tool hits the V2 Gift Certificates API for balance, status, recipient, and expiry.

The tool's instructions are explicit: confirm the masked code with the customer before sharing the balance. The shopper provides their gift card codes, saying "mine ends in 4829," the agent confirms the masked form matches, then reveals the amount. This is the "don't read a balance out loud to a stranger who guessed four digits" rule.

Edge cases matter too. The card might be disabled, expired, or denominated in a different currency. Balance and currency travel together so the agent doesn't tell an EU shopper their balance is $25 when it's €25. These tools are disabled by default on new installs, whether enterprise or SMB, and require deliberate merchant activation. Cards issued in different currencies are handled automatically.

Promo Code Validation: "Invalid" Isn't Good Enough

Most platforms return one error for promo codes: "This code is not valid." That covers at least eight situations, and shopping customers deserve better.

Alhena's lookup_discount_code tool returns the full picture: discount type (percentage, fixed, free shipping, buy-X-get-Y), status, minimum purchase requirements, usage limits (total and per-customer), combination rules, and expiry. The critical distinction: "this code doesn't exist" vs. "this code is valid but you don't qualify." Your cart might be under the minimum. The code might not stack with another discount. You might have used your one-time allocation.

Alhena's AI Shopping Assistant diagnoses the specific reason and tells the customer what to do: "Add $12 more to qualify." There's also a list_active_promotions capability that surfaces relevant promos proactively ("Code SPRING20 would save you $12 on this cart") instead of waiting to be asked. This helps recover carts that would otherwise be abandoned during the coupon-code search.

The Cart Is the Handoff Boundary

Alhena's add_product_to_cart tool populates the shopper's cart through each platform's native storefront API. On Shopify, the gift card and cart tools call the theme's /cart/add.js and opens the cart drawer. On BigCommerce, it posts to the Storefront Cart API. Magento, WooCommerce, and Salesforce Commerce Cloud integrations use merchant-implemented handlers. Any brand on these platforms can set up the same workflow.

The AI can assemble the cart, explain the promo, confirm the gift card balance. But the final payment step, entering the gift card, splitting tender, applying store credit, happens in the platform's native checkout where PCI compliance, fraud detection, and tax logic already live. That boundary is codified in the system: the AI cannot apply gift cards, issue coupons, or process payments directly. If a customer asks, the AI transfers to a human agent.

Six Reasons the Write Side Stays with Checkout

The read-only boundary isn't a missing feature. It's a design choice backed by six specific risks.

Order-of-operations math. Gift card before or after tax? Before or after a percentage promo? Each platform answers differently, and getting it wrong changes the total by real dollars.

Multi-tender arithmetic. "Apply $47.12 of this $50 gift card and charge the rest to Visa" is trivial until you factor in tax jurisdictions, unresolved shipping estimates, and currency rounding.

Idempotency. If an "apply gift card" call times out and retries, did it apply twice? A documented WooCommerce/Stripe bug caused triple charges from missing idempotency keys. Duplicate application is a direct cash leak.

Refund routing. If the customer returns the item, which tender gets refunded first? Every merchant has a refund policy. The AI has to honor it, not invent one. Routing refunds across split tenders is one of the harder problems in ecommerce.

Fraud surface. Gift cards are the number one laundering rail in ecommerce. An AI that applies a gift card code without the same velocity, geo, and device checks the checkout has is a wide-open door.

Disclosure. After multiple payment methods, the customer needs one clear message: new total, remaining gift card balance, amount charged to the secondary tender. Getting it right requires the full payment state, not just a single API call.

Agent Routing: Getting the Specialist Right

"What's my gift card balance?" and "Does this promo code work on sale items?" route to completely different specialists inside Alhena's AI.

Gift card balance checks route to the Order Management Agent. It's a service question: order lookups, tracking, returns, and payment-related questions all live here. Promo code eligibility and cart actions route to the Product Expert Agent. Discount eligibility is a merchandising question: "Does this cart qualify?" The Product Expert understands catalogs, pricing rules, and promotion logic. Getting the specialist right is part of getting the experience right.

Store Credit and What Comes Next

Store credit differs from gift cards in one key way: it's tied to a specific customer account. Digital gift cards are bearer instruments where anyone with the code can spend the value. Store credit management is simpler because store credit belongs to the logged-in customer, which simplifies AI handling after authentication.

With US retail returns hitting $849.9 billion in 2025, retailers increasingly offer store credit, loyalty rewards, and gifting credits instead of cash refunds to keep revenue in the ecosystem. A strong post-purchase experience converts returns into repeat purchases, and existing customers spend 67% more than new ones, and loyalty programs and referrals build on that momentum.

Applying codes and gift card balances in-conversation is the next frontier. It only ships when all six risks above are solved per platform, per jurisdiction, per edge case. Until then, Alhena's job is to make sure the customer arrives at checkout with the right information: a valid code, a confirmed balance, and a qualifying cart.

Ready to see how Alhena handles gift cards, store credit, and promo codes for your store? Book a demo or start free with 25 conversations.

Alhena AI

Schedule a Demo

Frequently Asked Questions

How does Alhena look up gift card balances without exposing the full code?

Alhena's check_gift_card_balance tool queries the platform API using only the last four characters. On Shopify, the GraphQL API returns a masked code, balance, and expiry. The AI confirms the masked code with the customer before revealing any balance. The full card code is never stored, displayed, or logged.

Can Alhena apply a gift card or promo code to an order?

No, and that's by design. Alhena reads and verifies payment data but doesn't write to it. Applying gift cards, splitting tender, or activating promo codes stays in the merchant's native checkout. This avoids idempotency bugs, tax calculation errors, and fraud exposure.

What's the difference between a gift card and store credit for AI handling?

Gift cards are bearer instruments where anyone with the code can spend the value, so AI must verify the last four digits before revealing a balance. Store credit is tied to a customer account and can be shown after authentication without extra verification steps.

Why do promo codes fail with a generic 'invalid' error?

Most platforms return one error message for eight or more failure modes: expired, misspelled, minimum not met, product exclusions, already used, can't stack, wrong customer segment, or channel-restricted. Alhena's lookup_discount_code tool returns the full picture so the AI can tell the customer the specific, personalized reason and what to do next.

Which AI agent handles gift card questions vs. promo code questions?

Gift card balance checks route to the Order Management Agent because they're service questions about a stored-value instrument. Promo code eligibility routes to the Product Expert Agent because it's a merchandising question about whether a cart qualifies. The routing is automatic.

Why are gift cards a fraud risk for ecommerce AI?

The FTC reports one in four fraud victims say gift cards were the payment method scammers demanded, with $212 million in losses in 2024. Any AI with write access to gift card balances expands the attack surface. Alhena's read-only design keeps the fraud boundary at the merchant's existing checkout controls.

Does Alhena support gift card lookups on platforms other than Shopify?

Yes. Alhena supports gift card balance lookups on both Shopify (via GraphQL API) and BigCommerce (via V2 Gift Certificates API). Promo code validation is also available on both platforms. These tools are disabled by default and require deliberate merchant activation.

Will Alhena eventually apply gift cards and promo codes in-conversation?

Applying payment instruments in-conversation is the next frontier. It will only ship when six risks are fully addressed per platform: order-of-operations math, multi-tender arithmetic, idempotency, refund routing, refund logic, fraud surface, and disclosure. Until then, the AI ensures customers arrive at checkout with the right information.

Power Up Your Store with Revenue-Driven AI