import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const promoCode = await client.promoCodes.delete('promo_xxxxxxxxxxxx');
console.log(promoCode);trueArchive a promo code, preventing it from being used in future checkouts. Existing memberships are not affected.
Required permissions:
promo_code:deleteimport Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const promoCode = await client.promoCodes.delete('promo_xxxxxxxxxxxx');
console.log(promoCode);trueDocumentation Index
Fetch the complete documentation index at: https://docs.whop.com/llms.txt
Use this file to discover all available pages before exploring further.
A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
The unique identifier of the promo code to archive.
"promo_xxxxxxxxxxxx"
A successful response
Represents true or false values.
Was this page helpful?