# Store credit - Returnline 1.x documentation

> Complete a return with a single-use coupon, or a Giftline store credit balance, instead of money back.

> [!NOTE]
> This is part of **Returnline Pro**.

Store credit keeps the money in your shop: instead of a refund, the customer gets a coupon code for the value of what they returned. With Giftline active, the credit goes to their store credit balance instead (see **With Giftline** below).

## Offering it

Add **Store credit** to **Customers can ask for** on **WooCommerce → Settings → Returns**. Customers then see it on the request form: "Get a code to spend in our shop once we receive the items." You can also issue credit for any return, whatever the customer asked for, with **Store credit instead**.

## Issuing it

Once the parcel is received, a store credit request shows **Issue store credit**. The amount is suggested as for a refund: the items' price including tax, less your restocking fee. It can't be more than what's left to refund on the order. Change it if you like, then click **Issue store credit and complete**.

Returnline Pro then:

1. creates a coupon `CREDIT-` followed by eight letters and numbers: a fixed discount on the cart for the amount, usable **once**, and only with the **customer's email address**;
2. sets an expiry date when **Store credit valid for (days)** is more than 0;
3. records the credit on the order as a WooCommerce refund for the same amount, with the returned items, restocking those marked **Restock**. It's a manual refund: no money goes back through the payment method, and WooCommerce doesn't send its "order refunded" email for it.

![A return completed with store credit, with the customer's photo and the return label](https://storage.extendiment.com/media/1037/screenshot-5-bbe4f81f.png)

The return shows the coupon (click it to open it under **Marketing → Coupons**). The customer gets the code in the "Your return is complete" email, and on their return page, which also says when it expires and once it's been used.

## Expiry

**Store credit valid for (days)**: `0` (the default) means the code never expires. Changing it only affects credit issued afterwards; edit a coupon's **Coupon expiry date** to change one already issued.

## With Giftline

When Giftline (Extendiment's gift cards and store credit) is active on the same site, Returnline Pro gives store credit as a balance instead of a coupon. Nothing needs setting up. When you click **Issue store credit and complete**:

1. the amount is added to the customer's store credit in Giftline, with the return number in its history. For an order placed without an account, it's kept for the order's email address, and the customer adds it to an account from **My Account → Gift cards & credit**, as with Giftline's own refunds to store credit;
2. the credit is recorded on the order as a refund for the same amount, as above, and counts as a refund to store credit in Giftline.

The return, the order notes, the "Your return is complete" email and the customer's return page then say how much store credit was added and what the balance is now, instead of showing a code. Customers spend the balance at checkout, over as many orders as they like, so nothing is lost on a cheaper order. **Store credit valid for (days)** applies to coupons only.

If the same return is completed again after an error, the customer is never credited twice. Returns already completed with a coupon keep their coupon. To keep using coupons while Giftline is active, see **Returnline Pro for developers**.

## Things to know

- The coupon is a normal WooCommerce coupon. If the order the customer uses it on is cheaper than the credit, the rest is lost, as with any fixed cart coupon: a single-use code can't keep a balance (a Giftline balance can).
- Because the credit is a refund on the order, the order's refunded total, its net amount in **WooCommerce → Analytics** and what's left to refund all count it. A refund you make later, through the payment method or by hand, can only be for what's left. Crediting everything that's left marks the order **Refunded**, as any full refund does.
- When the customer uses the code, WooCommerce counts it as a coupon discount on that order, as it does for every coupon. So in **Analytics** the credit lowers net sales twice: once as the refund on the returned order, and again as the discount on the order it pays for. A Giftline balance is spent as a payment instead, not a discount.
- One return gets one resolution: credit for the whole return, or a refund, not both.
- Coupons stay if you deactivate or delete Returnline Pro, and so does credit added to Giftline balances.

Source: https://extendiment.com/plugins/returnline/docs/1.x/store-credit
