Bulk unique coupons
Definition
Key benefits
Key details
Maximum redemptions
When Bulk unique codes is selected, the maximum redemptions field is hidden in the Recurly UI. By default, maximum redemptions are unlimited — the number of unique codes acts as the natural cap.
To set a specific maximum, use the API. If you set a maximum lower than the total number of unique codes generated, redemptions stop once the limit is reached — even if unused codes remain.
Redemptions per account
When Bulk unique codes is selected, the redemptions per account field is also hidden in the UI. By default, this is set to one — each unique code can only be redeemed once.
To allow a customer to redeem more than one unique code on their account, set redemptions per account to a higher value via the API.
Bulk coupon status
Bulk coupons appear as Expired in the UI when all unique codes have been redeemed — even though their underlying API status remains active. This is by design: it signals that the coupon can't currently be redeemed and prompts you to add more codes to restore it.
- The API status stays
activeeven with no redeemable codes, so you can hit the generate unique codes endpoint without needing to restore the coupon first. This matters for merchants who generate codes on demand at the time of a redemption request. - If the campaign contains any expired unique codes, the bulk coupon itself won't automatically expire as long as redeemable codes remain. The coupon only expires if you manually expire it, or if the max redemptions count or redeem-by date is reached.
To restore a specific unique code within a campaign, go to the bulk coupon's overview page and select Restore Code from the hover actions in that code's row.
Bulk unique code syntax
Each bulk unique code is assembled from a required prefix, a generated unique portion, and an optional suffix.
| Part | Description |
| Required prefix | The shared identifier for the campaign. Must be unique across all redeemable coupons on your site. Supports alphanumeric characters, dashes (-), underscores (_), and plus signs (+). |
| Generated code format | The character type for the unique portion of each code. Options: alphabetic, alphanumeric, or numeric. |
| Generated code length | The character length of the generated portion. Minimum: four characters (alphabetic or alphanumeric) or six characters (numeric). Maximum: 50 characters. Does not include the prefix or suffix. |
| Optional suffix | A static string appended to the end of every code. Supports alphanumeric characters, dashes (-), underscores (_), and plus signs (+). |
| Unique code preview | A sample code reflecting your current template settings. The prefix and suffix are always separated from the generated portion by dashes — customers must enter the full code, including dashes, at redemption. |
Creating bulk unique codes
Via the Recurly UI
Configure coupon settings
Complete the remaining coupon fields following the steps in the Coupons and discounts guide.
Via the API
Once a bulk coupon template exists, you have two options for generating codes.
Asynchronous — Generate codes via one endpoint, then retrieve them via a second. Best for large batches where you don't need codes in real time.
Synchronous — Generate and receive codes immediately in the response. Limited to 200 codes per call. Best for on-demand generation as part of a real-time redemption flow.
Path: POST /coupons/code-20off/generate_sync
Request:
{
"number_of_unique_codes": 1
}Response:
{
"object": "unique_coupon_code_generation",
"unique_coupon_codes": [
{
"id": "yde3fqeku6ghm",
"object": "unique_coupon_code",
"code": "20off-kngm-def",
"state": "redeemable",
"bulk_coupon_id": "ywe3dlf0eef5",
"bulk_coupon_code": "20off",
"created_at": "2026-04-08T19:57:56Z",
"updated_at": "2026-04-08T19:57:56Z",
"redeemed_at": null,
"expired_at": null
}
]
}Managing your codes
Expiring codes
You can expire an entire bulk coupon campaign or individual codes at any time from the coupon's overview page.
Invoice display
Each invoice that includes a redeemed unique code displays both the code itself and the name of the coupon campaign it belongs to, making reconciliation straightforward.
Exporting and reporting on redemptions
To generate a report of unique code redemptions for a specific time period:
For full export instructions, see the Coupons export documentation and Coupon Redemptions export documentation.
Exports reference
| Export | What it contains |
| Coupons | Identifies bulk unique coupon campaigns. Filter by "bulk" under the coupon_type column. |
| Coupon redemptions | Shows which unique codes have been redeemed and by which accounts. |
| Coupons — Bulk unique codes | A full ledger of all unique codes in a bulk coupon campaign, including redemption details. |
Updated about 21 hours ago