E-commerce
Whop email validation integration
One file on your own server receives your Whop webhook, checks its signature, reads each new membership and its member back from Whop and checks the member’s address. The answer goes into four keys of the membership’s metadata, so a membership whose address cannot receive mail is easy to find.
Read the full setup guideGet an API key
- Setup guide
- A file you download
import { after } from 'next/server';
import { createWhopHook } from './email-validation-whop';
const hook = createWhopHook({
apiKey: process.env.EMAIL_VALIDATION_API_KEY,
webhookSecret: process.env.WHOP_WEBHOOK_SECRET,
whop: {
apiKey: process.env.WHOP_API_KEY,
server: 'sandbox',
},
waitUntil: after,
onResult: (r) => { /* r.membershipId, r.outcome */ },
});
export const POST = (req: Request) => hook(req);At a glance.
- Status
- Setup guide. Not listed on a marketplace yet: you set it up yourself in a few steps, below and in the full guide.
- For
- Sellers on Whop who want to spot memberships whose receipts, license keys or access mails would bounce.
- You need
- An API key of ours with Validate addresses (on by default), a Whop account API key that can read members and their email and manage memberships, and a server with an HTTPS address that runs fetch and Web Crypto.
- Costs
- 1 credit = 1 validated address, as with any API request. Free: unknown results, API errors, malformed addresses, test addresses on sandbox.email-validation.org, addresses on reserved domains such as example.com and, in a bulk list, repeats of an address (charged once).
- Full guide
- Read the full setup guide
Typical uses.
New memberships
Each activated membership’s member is read back from Whop and checked; the status, reason, check time and an address hash land in the membership’s metadata.
Before the checkout
createCheckoutCheck answers in your own sign-up route, before you send the buyer to a Whop checkout.
Renewals, if you ask
With payment.succeeded added, each renewal looks at its membership again and checks only when no answer is written yet.
Set it up. 4 steps.
The short version of the full setup guide, which stays the reference when a step does not match what you see.
Run the receiver
Download email-validation-whop.zip from the guide and serve createWhopHook at an HTTPS address with our key and your Whop account API key.
Create the webhook
On the Developer page of your Whop dashboard: your address, API version v1 and the event membership.activated.
Copy its secret
Put the webhook’s ws_ secret into WHOP_WEBHOOK_SECRET exactly as Whop shows it; sandbox and production have separate webhooks and keys.
Try it free
Check no_mailbox@sandbox.email-validation.org on your machine with createEmailCheck: it is flagged. Then join one sandbox product yourself with your own address.
Good to know.
It never touches money or access: no cancel, pause or refund, only four metadata keys written.
It cannot stop Whop’s hosted checkout; createCheckoutCheck answers before your server sends the buyer there.
It fails open: no key, a timeout or any error leaves the membership as it is.
Each check uses one credit; unknown results and sandbox addresses are free.
Connect Whop.
Test it on our sandbox addresses for free, then on your own contacts.
Updated · Maintained by: Email Validation LLC