How to Run a Black Friday Sale on Software Licenses: Expiring Coupons, Upgrade Discounts and Refunds Without Leaking Keys
A software Black Friday sale ends on Monday, but the license keys you sell keep working for years. How to run coupons that really expire, reward existing customers with upgrades on the same key, survive activation spikes and revoke keys on refunds.
A software Black Friday sale looks simple: take 30% off, post a code, watch the orders come in. The difference from selling a jacket is that the discount ends on Monday night, but the license key you issued keeps working for years. Every shortcut you take during the sale, such as a code that never expires, a key emailed before payment clears, or a refund that does not touch the license, keeps costing you long after the deal page is gone.
This guide is for indie and small-team developers who sell desktop apps, plugins, games or developer tools with license keys and want to run a Black Friday, Cyber Monday or launch sale without leaking keys or annoying existing customers. It covers coupons that really expire, upgrade discounts for people who already own a license, how to stop coupon leaks, what to expect from activation spikes on sale day, and how to handle refunds and chargebacks after the key is out. It ends with a checklist you can copy. Nothing here is legal or tax advice.
Where this article describes PermitCore, it describes what the product does today: the Store can run a scheduled percentage discount that the server enforces at checkout, licenses can be changed in place (expiry, device cap, feature flags) without issuing a new key, and a fully refunded or lost-dispute Store order revokes its license automatically. Codes, redemption limits and per-customer offers are configured in your payment provider, Stripe or Paddle.
Why a software sale is different: the key outlives the discount
With physical goods, a sale ends when the stock or the date runs out. With licensed software, three things outlive the campaign:
- The license key. A perpetual key sold at 50% off is still a perpetual key. If it was issued on the wrong terms, the mistake is permanent unless you revoke it.
- The discount code. Codes get copied into deal forums, browser coupon extensions and group chats. A code with no server-side end date keeps working in March.
- The price expectation. Customers who see the same deal every month stop buying at full price. Customers who bought last week at full price may ask for the difference.
The fix is not complicated, but it has to be decided before the sale starts: an end date the server enforces, a clear rule for existing customers, and a license that follows the payment, including when the payment is reversed.
Choosing the offer: percent off, longer term, lifetime deal or upgrade price
Pick one main offer. Stacking several makes support harder and buyers slower.
| Offer | Works well when | Licensing effect |
|---|---|---|
| Percentage off the first payment | You sell one-time licenses or want new subscribers | Same license as a full-price purchase. Simplest to support. |
| Extra term for the same price (e.g. 15 months for 12) | You sell annual licenses and do not want to train buyers on a lower price | Set a later expiry on the issued license. Price history stays clean. |
| Lifetime deal | You need cash now and accept a support tail | Expiry is cleared forever. Decide what "lifetime" includes: all future versions, or the current major version only. |
| Upgrade price for existing customers | You released a new major version or a higher tier | Change the existing license (features, version limit, expiry) instead of issuing a second key. |
If you consider a lifetime deal, read perpetual versus subscription licenses first. A lifetime license that silently includes every future major version is a promise that gets more expensive every year. Writing "includes updates for version 3.x" on the deal page costs nothing and avoids a long argument in 2028.
Coupons that actually expire: server-side end dates and redemption limits
The most common Black Friday bug is a sale that only ends in the browser. The countdown timer reaches zero, the banner disappears, but the checkout still accepts the old price or code. Anything the browser decides, a buyer can replay. The end date must be checked by the server that creates the checkout.
Discount campaigns in the PermitCore Store
If you sell through the PermitCore Store, open a Store product and create a discount campaign: a name, a percentage between 1% and 90%, a label colour, and a start and end time in UTC. The product page shows the crossed-out regular price, the badge and the campaign label. At checkout the API, not the browser, selects the campaign that is valid at that moment and recalculates the effective price. Before the start time and after the end time, the regular price applies, whatever the page in a stale tab says.
Set the times in UTC on purpose. "Ends Monday midnight" is a different moment in San Francisco, London and Zagreb. Pick one time zone for the announcement, convert it to UTC for the campaign, and say which zone you mean on the sale page.
Selling to customers in the EU adds one more rule: when you announce a price reduction, the price indication rules introduced by the Omnibus Directive generally require you to show the lowest price you charged in the previous 30 days. The Store records every regular and promotional price, and the optional Show lowest price in the previous 30 days setting, on by default, calculates that reference from the 30 days immediately before the campaign started, so the sale price cannot become its own "lowest price". If you raised the regular price two weeks before Black Friday, that disclosure will show it.
Codes in Stripe and Paddle
If you want a code such as BF2026, it lives in your payment provider. Both Stripe and Paddle let you set the expiry and a redemption limit on the server side. In Stripe, a coupon defines the discount and a promotion code is the customer-facing code that points to it:
import Stripe from 'stripe';
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);
// Sale ends 1 December 2026, 07:59:59 UTC (Monday midnight in California)
const endsAt = Math.floor(Date.UTC(2026, 11, 1, 7, 59, 59) / 1000);
const coupon = await stripe.coupons.create({
name: 'Black Friday 2026',
percent_off: 30,
duration: 'once', // first payment only, not every renewal
redeem_by: endsAt, // the coupon itself stops working
applies_to: { products: ['prod_YourApp'] },
});
await stripe.promotionCodes.create({
promotion: { type: 'coupon', coupon: coupon.id },
code: 'BF2026',
expires_at: endsAt, // cannot be later than redeem_by
max_redemptions: 500,
});The promotion code shape above follows Stripe's current API version, where the code references a promotion object. Older API versions pass coupon directly. Check the version your account is pinned to.
In Paddle, a discount carries the code, the amount, the expiry and the products it applies to:
curl https://api.paddle.com/discounts \
-H "Authorization: Bearer $PADDLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "Black Friday 2026 - 30% off first payment",
"type": "percentage",
"amount": "30",
"code": "BF2026",
"enabled_for_checkout": true,
"recur": false,
"usage_limit": 500,
"restrict_to": ["pri_YourAnnualPrice"],
"expires_at": "2026-12-01T07:59:59Z"
}'Two details matter here. Paddle's usage_limit is an overall limit, not a per-customer one, and Paddle counts a redemption only when a transaction completes, so several checkouts open at the same moment can each pass the check. On a busy sale day, treat a usage limit as approximate. Second, restrict_to keeps a code meant for one product from discounting your whole catalogue.
Stacking rules
Decide whether a code can be combined with the Store campaign, a bundle price or an education discount, and write the answer on the sale page. "One discount per order" is easy to explain and easy to support. If you run a Store campaign and also hand out a provider code, test what the buyer actually pays in the provider's test mode before you announce anything.
Rewarding existing customers: upgrade discounts on the same license
The fastest way to annoy your best customers is a sale that offers newcomers a better price than the people who paid full price last month. Give existing customers their own offer, and deliver it on the license they already have.
- Use a per-customer or restricted code. Stripe promotion codes can be limited to one
customerand to a number of redemptions. Paddle discounts can be restricted to an upgrade price withrestrict_to. Send the code only to people who own the earlier version or lower tier. - Change the existing key, do not mint a second one. In PermitCore, a license stores its expiry, activation limit and a JSON feature map. After the upgrade payment, update that license: enable the new modules, raise the version limit or the device cap, or push the expiry out. The customer keeps the same key and the app picks up the change on its next validation. See license controls and feature-based licensing.
- Batch the loyalty gift. If you want to give every current subscriber an extra month as a thank-you, the admin bulk edit can update up to 500 selected licenses in one operation, and Extend Expiry can set a new date for a selection. Bulk Extend Expiry sets one new date for the whole selection; use the individual edit form when customers need different dates.
Two keys for one customer means two activation counts, two support threads and, eventually, one key that should have been revoked and was not. One key per customer, changed when the purchase changes, keeps the record clean.
Stopping coupon leaks and resellers
Assume any public code will be public everywhere within hours. That is fine for a public sale; it is a problem for a code meant for your newsletter, a partner or one customer.
- Public sale: one public code or, better, a Store campaign with no code at all, an end date and nothing to leak.
- Private offers: unique single-use codes per recipient (
max_redemptions: 1in Stripe,usage_limit: 1in Paddle), limited to the right product, expiring with the sale. - First purchase only: Stripe's
restrictions.first_time_transactionstops a new-customer code from being reused by an existing account.
Sales also attract key resellers: someone buys ten discounted keys and resells them at a margin. The license is where you can contain that. Keep the activation limit for a discounted license the same as for a full-price one, keep device binding on, and watch for keys that activate on many machines in a short time. If a key leaks, revoke it and reissue a new one to the real buyer; this guide on leaked and cracked copies walks through the steps.
Free trials deserve a look too. A Black Friday campaign brings in people who try the trial, wait for the price to drop and come back. That is fine, as long as the trial is a server-side trial license with a real expiry, not a local timestamp that a reinstall resets.
Activation spikes on sale day
A good sale compresses weeks of activations into a few hours. Most of the risk is in your own code, not in the license server: an app that blocks start-up on a network call, retries in a tight loop or treats a timeout as "unlicensed" turns a busy hour into a support queue.
The PermitCore API applies rate limits per IP address, per tenant and per license to protect validation and activation. When a limit is reached it answers 429, sometimes with a Retry-After header. The API error reference describes the expected client behaviour: honour Retry-After, back off with a bound, and never treat a network failure as a valid license. A small wrapper is enough:
// Retry a license request on 429 or 5xx, at most twice.
async function withBackoff(send) {
for (let attempt = 0; ; attempt++) {
const res = await send();
const retryable = res.status === 429 || res.status >= 500;
if (!retryable || attempt >= 2) return res;
const header = Number(res.headers.get('Retry-After'));
const seconds = Number.isFinite(header) && header > 0
? Math.min(header, 60)
: 2 ** attempt + Math.random();
await new Promise(r => setTimeout(r, seconds * 1000));
}
}
// A failed request is not a valid license: fall back only to a
// verified signed offline token, never to a cached "ok" flag.Three more habits help on the busiest day of the year:
- Validate once at start-up, not on every action. See license checks at app start-up.
- Use signed offline proof for the gaps. A previously issued signed token with a trusted public key and a valid expiry lets a paid user keep working through a short network problem. A cached "success" flag is not proof. Offline grace mode and offline licensing explain how this works.
- Write the error messages before the sale. "Too many activation attempts, trying again in 30 seconds" gets fewer support emails than "License invalid". See license error messages users understand.
The Store side is built for traffic peaks: public catalogue and product responses are cached and have their own browse rate limits, checkout and trial endpoints use stricter limits, and a cache failure falls back to the database. Your sale page and your download host deserve the same attention; a download link that returns errors at 9 a.m. on Black Friday costs more than any coupon.
Refunds and chargebacks after the key is issued
Discounted sales bring more impulse buys, and more impulse buys bring more refund requests. The money side is handled by your provider. The licensing side is handled by you, and it is the part that is easy to forget: a refund that returns the money but leaves the key active is a free license.
What PermitCore does automatically
For a license sold through the Store with Stripe or Paddle, the signed provider webhook drives the license state:
- A full refund of the order marks it refunded and revokes its license.
- A lost dispute (chargeback) for the full amount does the same. A won dispute does not revoke the license, and it never reactivates a license you revoked yourself.
- A partial refund, for example a goodwill refund of the difference in price, does not revoke the license. That is usually what you want.
- A cancelled subscription deactivates the license when the subscription ends, not the moment the customer clicks cancel.
Automatic revocations are written to the audit log. A refund revocation also sends a license.revoked event to your webhook endpoints (on plans that include webhooks), signed with X-PermitCore-Signature, so your own systems can update a customer record, a forum role or a download entitlement. Verify the signature over the raw body and deduplicate by event ID before acting:
import crypto from 'node:crypto';
function verify(rawBody, header, secret) {
const m = /^sha256=([a-f0-9]{64})$/i.exec(header ?? '');
if (!m) return false;
const expected = crypto.createHmac('sha256', secret).update(rawBody).digest();
const received = Buffer.from(m[1], 'hex');
return received.length === expected.length
&& crypto.timingSafeEqual(received, expected);
}
// Express: keep the raw body for signature verification
app.post('/hooks/permitcore', express.raw({ type: 'application/json' }), async (req, res) => {
if (!verify(req.body, req.get('X-PermitCore-Signature'), process.env.PERMITCORE_WEBHOOK_SECRET)) {
return res.sendStatus(400);
}
const payload = JSON.parse(req.body.toString('utf8'));
if (await alreadyProcessed(payload.id)) return res.sendStatus(200);
if (payload.event === 'license.revoked') {
// data carries licenseId and productId, never the key itself
await markLicenseRevoked(payload.data.licenseId); // e.g. remove download access
}
await recordProcessed(payload.id);
res.sendStatus(200);
});For the full lifecycle, including failed renewals and grace periods, see revoking a license after a failed payment and the provider guides for Paddle license keys and licensing with Stripe.
Revocation and offline copies
Revocation takes effect on the next online check. A copy running offline with a valid signed token keeps working until that token expires or the app reconnects. That is the trade-off you accept for reliable offline use, and it is the reason to keep offline token lifetimes reasonable rather than months long. Say so in your refund policy: "refunded licenses are deactivated" is accurate; "deactivated instantly on every machine" may not be.
Price-drop refund requests
Decide in advance what you will do for someone who bought at full price a few days before the sale. A common, fair answer is a partial refund of the difference within a short window, which leaves their license untouched, or a free extra month on the same key. Either is better than telling them to request a full refund and buy again, which revokes one license and issues another for no reason.
If you sell through a merchant of record, the provider's own refund terms also apply to your buyers. Read merchant of record versus Stripe if you are not sure who is the seller of record in your setup.
After the sale: measure, then follow up once
When the campaign ends, check that it really ended: open a private window, add the product to the cart and confirm the regular price at checkout. Then disable or archive the provider codes, even if they have an expiry, so they stop appearing in dashboards and partner lists.
Measure revenue per license, not just revenue. A sale that doubled orders but halved the price and doubled refunds and support tickets may have made less than a normal week. Look at refund rate by offer, at how many sale buyers activated at all, and at how many existing customers took the upgrade.
Send one honest follow-up to people who bought: how to activate, where the documentation is and how to reach support. Skip the drip campaign. Buyers who just paid you do not need five more discount emails before Christmas.
Pre-sale checklist
- Choose one main offer and write the terms: what is discounted, which versions a lifetime license includes, the start and end time with the time zone, and whether discounts stack.
- Create the Store discount campaign in UTC, or the provider code with
expires_at, a redemption limit and a product restriction. - If you sell in the EU, keep the lowest-price-in-30-days disclosure on and do not raise the regular price just before the sale.
- Prepare a separate, restricted or per-customer upgrade code for existing customers, and plan to update their existing licenses rather than issue new keys.
- Keep the same activation limit and device binding on discounted licenses as on full-price ones.
- Check that your app honours
429andRetry-After, validates once at start-up and uses signed offline proof, not a cached flag. - Run a test purchase, a full refund and a partial refund in your provider's test mode. Confirm the full refund revokes the key and the partial refund does not.
- Confirm your webhook receiver verifies signatures, deduplicates event IDs and handles
license.revoked. - Write the refund and price-drop policy on the sale page, including what happens to offline copies after a refund.
- After the end time, test the checkout at regular price, then archive the codes.
A software sale is a pricing event, but it is also a licensing event. If the end date lives on the server, existing customers are upgraded on the key they already have, and a refund changes the license as well as the bank balance, Black Friday becomes a good week instead of a cleanup project for January. If you want to sell with these controls built in, start with the Store guide or compare plans on the pricing page.
Build your first licensed product without building a license server.
Create a free PermitCore account, issue a test license, and validate it from your application.