> For the complete documentation index, see [llms.txt](https://docs.shopwaive.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shopwaive.com/shopify/get-a-code.md).

# Get a code

Let customers turn their Shopwaive balance into a one-time discount code from their customer account, on every Shopify plan

With **Get a code**, a customer turns their Shopwaive balance into a one-time discount code in their customer account, then enters it at checkout. It works on every Shopify plan.

On Shopify Plus, customers can also spend with the **Redeem** button at checkout. See [Redeem at checkout](https://docs.shopwaive.com/shopify/extensions/redeem.md). In Shopify POS, your staff apply the balance at the register. See [Shopify POS](https://docs.shopwaive.com/shopify/shopify-pos.md).

## What you need <a href="#what-you-need" id="what-you-need"></a>

* Shopify's new customer accounts. Get a code shows in the customer account **Profile** page, and that page needs new customer accounts.
* The Shopwaive **Account** block on the **Profile** page.

## Set it up <a href="#set-it-up" id="set-it-up"></a>

{% stepper %}
{% step %}
**Turn on new customer accounts**

In your Shopify admin, go to **Settings** > **Customer accounts**. Under **Customer accounts version**, choose new customer accounts and click **Save**.

If your store already uses new customer accounts, go to the next step.

Shopify's own steps: [New customer accounts](https://help.shopify.com/en/manual/customers/customer-accounts/new-customer-accounts).
{% endstep %}

{% step %}
**Add the Account block**

In your Shopify admin, go to **Settings** > **Checkout** and click **Customize** to open Shopify's checkout and accounts editor. Open **Apps** in the editor's sidebar, click **+** next to the Shopwaive **Account** block and choose **Profile**. Click **Save**.

The full steps are in [Balance in customer accounts](https://docs.shopwaive.com/shopify/extensions/app-blocks.md).
{% endstep %}

{% step %}
**Check that Get a code is on**

In the Shopwaive app, go to **Settings** > **Checkout**. Under **How customers spend online**, choose **Get a code**. Check that **Customers can get codes** is turned on, and pick how long codes last under **Codes end after**.

If you don't see **How customers spend online**, [contact us](mailto:support@shopwaive.com) and we'll turn it on for your store.
{% endstep %}

{% step %}
**Try it**

Sign in to your store as a customer who has a balance, open **Profile**, and press **Get a code**.
{% endstep %}
{% endstepper %}

## What your customers see <a href="#what-your-customers-see" id="what-your-customers-see"></a>

1. They sign in and open **Profile**. The block shows their balance and **Get a code**.
2. They choose an amount and press **Yes, get my code**. The amount comes off their balance right away.
3. The code stays under **Your codes**. They copy it, or press **Shop now**.
4. At checkout they enter the code in the discount code box.

## How a code works <a href="#how-a-code-works" id="how-a-code-works"></a>

<figure><img src="https://1743155819-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6HSAZj4RDucpQwVtzMYt%2Fuploads%2Fgit-blob-c38276683b5d9166ee59634f863a79e35c20496a%2Fdiagram-get-a-code.svg?alt=media" alt="Get a code, from making a code to using it: the customer chooses an amount in Profile and it comes off their balance at once; the code waits under Your codes, one open code at a time, until its end date, and a cancelled code or one that ends unused goes back to their balance; they use it once at checkout in the discount code box, the part an order does not use goes back to their balance, and so does a refund"><figcaption><p>A code, from making it to using it</p></figcaption></figure>

* **One use.** A code works once, whatever amount the order uses. Once it is used, it can't be used again.
* **One customer.** A code works only for the customer it was made for.
* **One open code at a time.** To make a new code, a customer uses or cancels their open code.
* **If the order is smaller than the code,** the part the order didn't use goes back to the customer's balance.
* **If the order is larger than the code,** the customer pays the rest.
* **Cancelling.** A customer can cancel an open code under **Your codes**, and the amount goes back to their balance. You can cancel a code from the customer's page in the Shopwaive app.
* **Ending.** A code that isn't used by its end date stops working, and the amount goes back to the customer's balance.
* **Refunds.** When you refund an order that used a code, the amount goes back to the customer's balance, where it is on for your store: see [Refunds](https://docs.shopwaive.com/shopify/refunds.md).

Codes apply to items, not to shipping.

## Good to know <a href="#good-to-know" id="good-to-know"></a>

* Your customers keep the balance they have today. Nothing about their balance changes when you set up Get a code.
* Every code shows in the customer's history in the Shopwaive app, with the order that used it.

Have questions on any specific features? [**Contact us**](mailto:support@shopwaive.com)
