Store Credit Import From File

πŸ“₯ Import store credit transactions from a CSV file.

The Store Credit Import from File feature adjusts Shopify store credit balances for multiple customers from a CSV file. Each row becomes one transaction β€” positive amounts add credit, negative amounts subtract credit β€” and you can configure amount, currency, and expiry independently per row. Positive and negative rows can be mixed in the same file. Optionally, the app can send a notification email per transaction.

When to use this vs other store credit operations:

  • Use this when amounts, currencies, or expiry dates differ per customer.

  • Use Store Credit Bulk Add when every recipient should receive the same amount and configuration.

circle-exclamation

πŸ’‘ Common Use Cases

  • Bulk refunds β€” issue store credit to many customers from a refund report.

  • Loyalty rewards β€” different credit amounts per customer tier.

  • Compensation campaigns β€” credits sized per affected order.

  • Account migrations β€” bring in credit balances from another platform.

  • Migration corrections β€” subtract amounts customers redeemed on your old system after the initial import.

  • Bulk debits / clawbacks β€” remove credit from many customers at once (e.g. after a promotional error or refund reversal).

  • Multi-currency stores β€” different currencies per customer market.

  • Referral / affiliate payouts β€” credit referrers based on a tracked list.

πŸͺœ Step-by-Step Instructions

  1. Download a template.

  1. Fill in your data. See CSV Columns below.

  2. Upload the file. The form accepts .csv, .tsv, and .txt files up to 10 MB. After upload, a summary shows the detected separator, row count, and column names. Validation errors (if any) are listed.

  3. Resolve ambiguous dates. If expires_at contains dates like 01/05/2026, the form asks whether the first number is the day or month and applies it to all rows.

  4. Configure customer notification (optional). When the file contains an email or customer_id column, a Send store credit notification checkbox appears. Enable it and choose a sending method.

  5. Choose internal delivery options. Allow data download and / or send yourself a summary email.

  6. Click Import now or Schedule.

πŸ“‹ CSV Columns

Required

  • amount β€” The transaction value. Use a positive number (e.g. 25.50) to add store credit, or a negative number (e.g. -25.50) to subtract from the customer's existing balance. Use a dot as the decimal separator. Commas are auto-converted to dots, but more than two decimal places are rejected. See Subtracting Store Credit (Debits) for details on how negative rows are processed.

Identifying the customer (one of these is needed)

  • email β€” Customer email. If a customer with this email exists, store credit is added to them. If no matching customer exists, a new customer record is created with that email and the credit is issued to them.

  • customer_id β€” Numeric Shopify customer ID. Use this to avoid creating a new customer when an existing one matches the email.

Rows with neither email nor customer_id are skipped (logged as errors in the operation report).

Optional

  • currency_code β€” 3-letter ISO 4217 currency code (e.g. USD, EUR, GBP). If omitted, the store's default currency is used. The currency must be enabled in your Shopify store.

  • expires_at β€” Expiry date for the credit. Supported formats: YYYY-MM-DD (recommended), DD/MM/YYYY, MM/DD/YYYY, DD-MM-YYYY, MM-DD-YYYY. If omitted, the credit never expires.

πŸ‘€ Customer Lookup & Creation

The import uses the following resolution order per row:

  1. If customer_id is present, look up that customer.

  2. Otherwise, search by email.

  3. If no customer matches by email, create a new customer with that email and issue the credit to them.

Creating a customer here is the same Shopify operation as adding a customer manually β€” Shopify's standard "welcome" behavior applies based on your store's settings.

βž– Subtracting Store Credit (Debits)

Any row with a negative amount subtracts from the customer's existing store credit balance instead of adding to it. The same file can mix positive (credit) and negative (debit) rows freely β€” each row is processed independently.

How debit rows are processed:

  1. The customer is looked up via email or customer_id. If no customer exists, the row is logged as an error (debits cannot create new customers β€” there'd be nothing to debit).

  2. The customer's store credit account in the requested currency_code is fetched.

  3. If the customer has no store credit balance in that currency, the row is logged as an error and skipped.

  4. If the requested debit is greater than the available balance (e.g. row says -50 but the customer only has 30 left), the account is zeroed out and an info-level message is logged. The row is counted as a success β€” over-debit never fails the row.

  5. The amount actually debited and the new balance are written to the result CSV. Debits show as negative numbers in the Balance Change column.

Debit rows ignore the expires_at column β€” debits don't have an expiry date.

βœ‰οΈ Customer Notification (Optional)

When the file contains an email or customer_id column, you can choose to email each customer about their transaction. Enable Send store credit notification and pick a sending method. Notifications are sent for both increases and decreases when opted in.

  • Shopify Email β€” uses Shopify's built-in Store credit issued notification email. (Note: Shopify's built-in template only covers credits; for debit notifications use App Email, Flow, or Klaviyo.)

  • App Email β€” uses Gift Card Factory's email infrastructure with a customizable template (built from the Store credit import from file or Custom template type). Preview before sending.

  • Shopify Flow β€” fires a Flow trigger; you configure the action that sends the email.

  • Klaviyo β€” fires a Klaviyo metric; you configure a flow that responds to the metric.

To differentiate copy for credits vs debits in your App Email / Klaviyo template, branch on {{ issued_store_credit.transaction_type }} β€” its value is either "credit" or "debit". Example:

Read more about each sending option.

πŸ“€ Internal Delivery Options

Independent of customer notifications:

  • Allow store credits data download: Creates a download link in the Bulk Operations section. Expires after 3 days.

  • Send internal email with all generated store credits: Sends a list of credit transactions to an email address you specify (multiple addresses allowed, comma-separated).

▢️ Running the Operation

  • Import now: Runs the operation immediately.

  • Schedule: Runs the entire operation at a future date and time you select.

Per-row scheduling via a scheduled_on column is not supported for store credit imports β€” only for gift card imports.

πŸ§ͺ Examples

Simple credits

Credits with expiry

Multi-currency credits

Using customer IDs

Mixed credits and debits (e.g. migration corrections)

πŸ“„ Result File Output

After the operation finishes, a result CSV is generated with one row per transaction:

Column
Description

Id

Store credit account ID.

Customer Name

First + last name (if available).

Email

Customer email.

Currency

Currency code of the transaction.

Balance Change

Amount applied. Positive for credits, negative for debits.

Current Balance

Customer's store credit balance in that currency after the transaction.

🚫 Limitations

  • File size: 10 MB maximum.

  • Currency must be enabled in your Shopify store settings to be valid for that customer.

  • Debits require an existing store credit account in the requested currency β€” debit rows for customers with no balance are skipped.

  • Debits ignore expires_at β€” only credit transactions can have an expiry date.

  • No per-row scheduling β€” use the Schedule button to run the whole import later, but every row runs together.

FAQ

My CSV has decimals like 25,50 and they're being rejected. The decimal separator must be a dot (.). Commas are auto-converted, but check for currency symbols ($, €) or thousands separators in the same field β€” those are rejected.

A row was skipped β€” why? Rows are skipped if amount is missing or invalid, or if neither email nor customer_id resolves to (or creates) a customer. Check the operation log under Bulk Operations β†’ details.

A customer didn't get a notification email. Confirm Send store credit notification was enabled, the row had an email or customer_id column with a valid value, and your sending method is configured (Shopify Email's Store credit issued template enabled / App Email domain validated / Flow configured / Klaviyo flow listening on the metric).

I imported the same file twice β€” did customers get double credit? Yes β€” the import always processes each row as a new transaction, it doesn't deduplicate. If you re-ran an import, each customer in the file will have been credited (or debited) twice. To reverse a duplicate run, re-upload the same file with the amount values negated.

Can I use this to remove (debit) store credit? Yes. Use a negative number in the amount column (e.g. -25.00) to subtract from a customer's existing balance. See Subtracting Store Credit (Debits).

What happens if I try to debit more than the customer has? The customer's account is zeroed out β€” only the available balance is debited β€” and the over-debit is recorded in the operation log. The row is counted as a success, not an error.

Can I debit a customer who has never had store credit? No. Debits require an existing store credit account in the requested currency. Rows trying to debit a customer with no balance in that currency are logged as errors and skipped.

Last updated