---
title: "Test coupon codes and welcome offers end to end · Proxy Mail QA"
description: "Get the coupon a sign-up offer sends with its discount and end date, apply it at checkout on staging and record the result. Expired or reused coupons fail."
url: https://proxymail.qa/solve/coupon-code-testing
---

1. [Home](https://proxymail.qa/)
2. [What we solve](https://proxymail.qa/solve)

# Test coupon codes from sign-up to checkout

A welcome offer has more moving parts than it looks: the email has to arrive, the code has to work once, and it has to stop working when it should. Sign up with a new test account, get the coupon with its discount and end date, and record what checkout did with it.

Updated 21 October 2026

## Why coupon flows break quietly

- **The email is late.** Offer emails often go through a marketing tool on a schedule, minutes after sign-up, and nobody notices when it becomes an hour.
- **The code works too often.** A one-time code accepted twice, or after its end date, costs money every time.
- **One person, many accounts.** Signing up again as `name+promo1@` gets a second welcome offer from many apps. See [welcome offer abuse](https://proxymail.qa/solve/welcome-offer-abuse).
- **The details are wrong.** The email says 20% and checkout gives 10%, or the email never says when the offer ends. “Ends Sunday” and “today only” count as an end date, from the day the email arrived.

## How Proxy Mail QA helps

1. **Sign up for the offer** on your staging site with a new address.
2. **See the coupon** on the Accounts page and in the inbox: the code with **Copy**, its discount (“20% off”), its end date, and how long after the address was made it arrived. Past its end date it reads “Expired” and stays copyable, so you can test that checkout refuses it.
3. **Apply it at checkout** with test payments, then record the result in the inbox: **Accepted**, **Rejected** or an error, with the message your app showed.
4. **Read the verdict.** A coupon accepted after its end date, accepted twice when it’s one-time, or accepted for an offer one person already claimed fails. An error warns.

## What to check

- The coupon arrives within the time you promise, such as 5 minutes after sign-up.
- The discount at checkout matches the email.
- A one-time code is refused the second time, with a clear message.
- An expired code is refused.
- The email says when the offer ends, and has an unsubscribe link: offers are marketing.

## In a test

offer.spec.ts

```ts
const submitted = new Date();
await page.getByRole('button', { name: 'Get 20% off' }).click();

// Offers often take minutes: this waits up to 10.
const coupon = await qa.waitForCode(address, { type: 'coupon', since: submitted, timeout: 600 });
expect(coupon.discount).toBe('20% off');
expect(coupon.after_seconds).toBeLessThan(300);

await page.getByLabel('Promo code').fill(coupon.value);
await page.getByRole('button', { name: 'Apply' }).click();
const first = await qa.recordCouponResult(address, 'accepted', { oneTime: true });
expect(first.check?.status).toBe('pass');

// The same code again should be refused.
await page.getByLabel('Promo code').fill(coupon.value);
await page.getByRole('button', { name: 'Apply' }).click();
const again = await qa.recordCouponResult(address, 'rejected', { message: await page.getByRole('alert').innerText() });
expect(again.check?.status).not.toBe('fail');

```

Agents connected to the MCP server get the same with `wait_for_code` (kind `coupon`) and `record_coupon_result`, and the `test_coupon_checkout` prompt walks through the whole round on staging.

## Automating this?

Make it a test: waitForCode with type coupon (Python type="coupon") returns the coupon with its discount and end date, then recordCouponResult says what checkout did. Offers often take minutes, so give the wait a longer timeout.

[Node.js client](https://proxymail.qa/docs/node) [Python](https://proxymail.qa/docs/python) [Set up your coding agent](https://proxymail.qa/docs/api#agent-setup)

## Try it on your next sign-up test

Free plan, no credit card. Create an address and watch the code or link arrive.

[Create a free account](https://app.proxymail.qa/?mode=signup&from=site-solve-coupon-code-testing)

## Questions

### Do I need to switch anything on?

Yes, for now. Marketing and offer emails is in Labs: switch it on in the app under **Account settings → Labs**. It applies to your API keys and agents too; until then their marketing tools answer with an error that says so.

### Does Proxy Mail QA check out for me?

No. It never opens links or checks out. Your test, your agent or you apply the coupon on your staging site with test payments, then record what happened.

### What if the email doesn't say when the coupon ends?

The coupon\_expiry check warns, since people will ask. When it does say, as "valid until 31 October" or "valid for 7 days", the end date appears beside the coupon.

### Can I use this to collect coupons from other shops?

No. Creating accounts to claim offers from services you don't own is fraud, and it breaks our terms. These accounts are for testing your own offers in development, staging or QA.

### Why didn't my login-code wait return the coupon?

Plain waits leave coupons out, so a sign-in test never types a discount code into the code box by mistake. Ask for a coupon with type coupon, or kind coupon for agents.

## Related guides

- [Test sign-up and email verificationA fresh, private address for every sign-up test, with the verification link or code ready the moment it lands.](https://proxymail.qa/solve/email-verification-testing)
- [Test OTP and one-time login codesCodes pulled out of the email with a Copy button and a countdown when the email says how long they last.](https://proxymail.qa/solve/otp-code-testing)
- [Test magic links and passwordless sign-inSingle-use links that are never opened or prefetched on our side, so they still work when you click them.](https://proxymail.qa/solve/magic-link-testing)
- [Test password reset emailsRequest, receive and use reset links, and keep the new password saved next to the test account.](https://proxymail.qa/solve/password-reset-testing)
- [Stop sharing one Gmail inbox for QAPrivate, disposable addresses for every tester instead of one shared mailbox and a pile of plus-addresses.](https://proxymail.qa/solve/shared-test-inbox)
- [Take QA notes by voice with Wispr FlowDictate what each test account is for, its state and what you found, straight into its notes, in seconds.](https://proxymail.qa/solve/voice-notes-wispr-flow)
- [Verification link points to localhost:3000Why emails from staging link to localhost, how to fix it in Supabase, Firebase and other stacks, and how we flag it.](https://proxymail.qa/solve/localhost-links)
- [Common Supabase sign-up and login problemsEmails that never arrive, links that expire or sign nobody in, and sign-ups that fail, with the fix for each.](https://proxymail.qa/solve/supabase-auth-problems)
- [Common Firebase sign-up and login problemsMissing verification and reset emails, verified users who still look unverified, failing links and sign-up limits, with the fix for each.](https://proxymail.qa/solve/firebase-auth-problems)
- [Sign-up and login problems in vibe-coded appsThe login bugs AI-built apps usually ship with: emails only you receive, links to the preview, missing pages, and what to ask the builder.](https://proxymail.qa/solve/vibe-coded-login-problems)
- [Test sign-up emails in PlaywrightA complete Playwright test for sign-up codes and links, from a fresh inbox to the report on the pull request.](https://proxymail.qa/solve/playwright-email-tests)
- [Test sign-up emails in CypressA complete Cypress test for sign-up links and codes, with the email waits running as Cypress tasks.](https://proxymail.qa/solve/cypress-email-tests)
- [Test sign-up emails with pytestA complete pytest test for sign-up codes and links, with Playwright for Python or Selenium and a one-file helper.](https://proxymail.qa/solve/pytest-email-tests)
- [Test unsubscribe links and one-click unsubscribeThe unsubscribe headers and link checked on every marketing email, and a watch that flags any marketing after unsubscribing, with no time limit.](https://proxymail.qa/solve/unsubscribe-testing)
- [Test that a welcome offer can't be claimed twiceVersions of one address that reach the same inbox, and a check that fails when the same person got the offer more than once.](https://proxymail.qa/solve/welcome-offer-abuse)

[Built your app with an AI tool? Pick yours](https://proxymail.qa/built-with)
