Gift cards guide

How to export gift card codes from Shopify

Shopify hides gift card codes after creation and only shows the last four digits. Here is what that means, and how to keep a full, exportable list of every code you issue.

4 min read Updated 2026-08-11 All guides →

The one-way door

Gift card codes on Shopify are a one-way door. The full code exists in the API response at creation and nowhere else afterwards. Shopify admin shows ••••4821. The Admin API returns lastCharacters: "4821". There is no flag, no permission, and no support escalation that returns the rest.

Most merchants discover this the first time a customer emails saying they deleted the gift card email.

What that means in practice

For single cards created by hand, it is survivable. You created one card, you emailed it, the customer has it.

For batches it is a real operational problem. If you created 400 codes for a print run and never exported them, you now have 400 cards with money on them and no way to know which code goes with which physical card.

What to do about it

Create with something that keeps the codes. Bulk Gift Cards stores every code at the moment it creates the card, then gives you three ways to get at them:

  • Search by partial code, customer email, or the note you set on the batch. Search is dash and case tolerant, so 4K2P finds wnwn-4k2p-9911.
  • Reveal an individual full code from history when a customer asks you to resend.
  • Export the whole batch as CSV: code, amount, currency, email, note.

Do the export the day you create the batch. The cost is thirty seconds and the alternative is unrecoverable.

The reissue procedure, for when it is already too late

  1. Find the card by its last four characters in Shopify admin.
  2. Note the remaining balance.
  3. Disable the card so the old code cannot be spent.
  4. Create a replacement card for the remaining balance and send it to the customer.

That works for one customer. It does not scale to a batch, which is the whole argument for exporting up front.

Frequently asked questions

Can I export gift card codes from Shopify admin?

No. Shopify admin has no gift card code export and shows only the last four characters of each code after creation. The gift card export available in some contexts contains balances and metadata, not full codes.

Can Shopify support recover a lost gift card code?

No. Shopify does not store the code in a retrievable form. If neither you nor your customer has the code, the practical fix is to check the card's remaining balance by last four characters, disable it, and issue a replacement card for the same amount.

Why does Shopify hide gift card codes?

A gift card code is a bearer instrument. Anyone holding the code can spend the balance. Masking codes after creation limits the damage from a compromised admin account or a leaked export, which is the same reason payment processors mask card numbers.

What if I already created cards without capturing the codes?

Those codes are not recoverable. If the cards were emailed to customers, the customers have them. If they were not, disable the cards and reissue, capturing codes this time.

Need help with this on your store?

We build free Shopify apps for the simple stuff. Browse the full set.

See all apps Contact us