WordPress-hosted Stripe Checkout session that drops a webhook into our token generator right after payment success.
Prep the WordPress site and backend so Stripe can mint tokens automatically when payouts activate.
Use Stripe’s official plugin or WP-Simple-Pay. Embed the “Purchase VaderVPN Access” button and set the success URL to https://yourdomain/pay/fiat/success.
Create an endpoint (e.g. `/api/payments/stripe/webhook`) that validates signatures, ensures `checkout.session.completed`, and calls the token generator with plan metadata.
Return JSON to WordPress and send email with the token display value. Offer an instant copy on the success page that warns about one-time visibility.
Use this structure to align the webhook handler with the MariaDB token store.
{
"event": "checkout.session.completed",
"data": {
"id": "cs_test_a1b2c3",
"customer_email": "you@example.com",
"amount_total": 1900,
"currency": "usd",
"metadata": {
"plan": "pro",
"device_limit": "3",
"token_note": "stripe:cs_test_a1b2c3"
}
}
}
Map `metadata` into generate_vpn_token.sh --rules and `token_note` for audit trails.
Before launch, run these cases in Stripe test mode.