> For the complete documentation index, see [llms.txt](https://help.smartrr.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.smartrr.com/docs/support/subscription-setup/subscription-discount-codes.md).

# Subscription discount codes

Discount codes created in Shopify work with Smartrr subscriptions, so there’s no duplicative work on your end.

{% hint style="info" %}
Shopify does not reflect discounts in their "Recurring subtotal" line on the checkout page:

![The "Recurring subtotal" information is shown below the "Total" on the checkout page. This is controlled by Shopify's theme content.](https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2FFTVciFEFxfjIqYQJBeLB%2Fimage.png?alt=media\&token=5886c5fa-7b8b-4f0a-9901-385e45e3ef27)
{% endhint %}

Smartrr uses native Shopify discounts, meaning you can create discount codes as you normally would within your Shopify admin. This also means you won’t find any place to create discount codes within the Smartrr app. You can however set automatic discounts (no code required) on recurring subscriptions orders in [Subscription Programs.](/docs/support/subscription-setup/subscription-programs.md)

To create a discount code in Shopify, navigate to Discounts in Shopify’s left-hand menu and follow their instructions for [creating discount codes.](https://help.shopify.com/en/manual/discounts)&#x20;

<figure><img src="https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2Ff8lynVHDwNVINL4elFJn%2Fshopify-discount.png?alt=media&amp;token=6fb59b0a-f3d3-421f-952c-038229b02fde" alt="Screenshot of the discount page in Shopify and a list of created discounts."><figcaption></figcaption></figure>

Within Shopify, you can specify if you want the discount code to be applied to one-time purchases, subscription purchases, or both. You can also specify if you would like the code to apply to all subscription products, subscription products in a specific collection, or only to specific subscription products.

<figure><img src="https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2F0UYL8Khszyn7PFEuydqK%2Fdiscount-specification.png?alt=media&amp;token=7491b017-ef36-419e-aaa6-9b7914fc343d" alt="To use Shopify discount codes on subscriptions, you would need to set the purchase type in the discount to either &#x22;Both&#x22; or &#x22;Subscriptions&#x22;."><figcaption></figcaption></figure>

You are also able to restrict usage of discount codes on subscriptions to be for the first payment only, for X number of payments, or to all recurring subscription payments.

<figure><img src="https://3658670565-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FndNAuxS4koYyI8AQTpS9%2Fuploads%2FOocMncxrZ7GaN2mM2AWv%2Fdiscount-limit.png?alt=media&amp;token=9ec69e72-26d8-4b52-92fd-e43e6919dbe5" alt="Remember to set the discount&#x27;s limitations. You have the ability to limit the discount to one use per user, and to limit it to the 1st payment or applied to all recurring payments."><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.smartrr.com/docs/support/subscription-setup/subscription-discount-codes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
