Payment Gateways
Stripe Configuration
Stripe works globally and supports all major card networks, Apple Pay, Google Pay, and a wide range of local payment methods. Subscriptions and one-time payments are both fully supported out of the box.
-
1. CREATE YOUR STRIPE ACCOUNT
• Go to https://stripe.com and sign up.
• Complete identity verification (required before going live).
• You start in Test mode. Switch to Live mode only when ready for real payments.
-
2. GET YOUR API KEYS
• In the Stripe Dashboard go to: Developers → API keys.
• Copy two values:
· Publishable key — starts with pk_test_ (test) or pk_live_ (live)
· Secret key — starts with sk_test_ (test) or sk_live_ (live)
• Enter these in the platform Admin → Gateways → Stripe..
-
3. CREATE A WEBHOOK ENDPOINT
• Go to: Developers → Webhooks → Add endpoint.
• Endpoint URL: https://yourdomain.com/webhooks/payments?gateway=stripe
• Select the following events to listen for:
· checkout.session.completed
· payment_intent.succeeded
· payment_intent.payment_failed
· customer.subscription.created
· customer.subscription.updated
· customer.subscription.deleted
· invoice.payment.succeeded
· invoice.payment.failed
-
4. ENABLE SUBSCRIPTIONS (if using recurring memberships)
• Stripe handles subscriptions natively. No extra activation is needed..
• Recurring memberships will automatically create Stripe subscriptions.
-
5. INTERNATIONAL PAYMENTS
• Stripe accepts payments from most countries by default.
• To accept payments in specific currencies, go to:
· Settings → Business → Bank accounts and scheduling and add a bank account for each currency you want to settle in.
• If you only have one bank account (e.g., USD), Stripe will auto-convert foreign currency payments.
-
6. GO LIVE CHECKLIST
[ ] Switch API keys from pk_test_ / sk_test_ to pk_live_ / sk_live_
[ ] Update the webhook endpoint secret (live mode has its own secret)
[ ] Ensure business details and bank account are verified
[ ] Test a real card payment for a small amount before launch
RazorPay Configuration
Razorpay is an Indian payment gateway that supports cards, UPI, netbanking, wallets, and EMI. It is designed primarily for Indian merchants and processes payments in INR. International payments require a separate activation step.
-
1. CREATE YOUR RAZORPAY ACCOUNT
• Go to https://razorpay.com and sign up.
• You must be a registered Indian business (sole proprietor, LLP, Pvt Ltd, etc.)
• Complete KYC verification before going live (takes 1–3 business days).
• Test mode is available immediately without KYC.
-
2. GET YOUR API KEYS
• In the Razorpay Dashboard go to: Settings → API Keys
• Click "Generate Test Key" (for test mode) or "Generate Live Key" (for live).
• Copy two values:
· Key ID — starts with rzp_test_ (test) or rzp_live_ (live)
· Key Secret — shown only once; save it immediately
• Enter these in Admin → Gateways → Razorpay.
-
3. CREATE A WEBHOOK ENDPOINT
• Go to: Settings → Webhooks → Add New Webhook
• Webhook URL:
· https://yourdomain.com/webhooks/payments?gateway=razorpay
• Set a Webhook Secret (any strong passphrase you choose).
• Enter the same Webhook Secret in Admin → Gateways → Razorpay.
• Select the following Active Events:
· payment.authorized (one-time payment completed)
· payment.failed (payment declined or failed)
· subscription.activated (recurring — subscription created and first payment taken)
· subscription.charged (recurring — renewal payment taken)
· subscription.cancelled (recurring — customer or merchant cancelled)
Do NOT enable all events — only the five listed above.
• Save the webhook. Razorpay will send a test ping; your endpoint must return HTTP 200 for the webhook to be marked as active.
-
4. SET CURRENCY
• Razorpay processes payments in INR by default.
• Enter INR in the Currency field in Admin → Gateways → Razorpay.
• Do not enter USD unless you have explicitly been granted multi-currency access.
-
5. ENABLE SUBSCRIPTIONS (for recurring memberships)
• Razorpay Subscriptions is a separate product that must be activated.
• In TEST mode: subscriptions may not be available at all on new accounts.
· Use non-recurring (one-time) memberships for test payments.
• In LIVE mode: go to Settings → Subscriptions to enable the feature.
· If the option is missing, email support@razorpay.com or use live chat and request that "Subscriptions / Plans API" be enabled on your account.
• Once enabled, recurring memberships will create Razorpay Plans and Subscriptions automatically.
-
6. ENABLE INTERNATIONAL PAYMENTS
• By default, Razorpay only accepts domestic Indian cards, UPI, and netbanking.
· Customers using foreign-issued cards will get an error:
"This business accepts domestic (Indian) card payments only."
• To accept international cards:
1. Complete full KYC (required).
2. Go to: Settings → International Payments
3. Enable international payments and select the currencies you want to accept.
4. Razorpay may require a short review period before approving.
NOTE: International payments are NOT available in TEST mode. Test using Indian domestic test cards or the netbanking test option.
-
7. TEST PAYMENT METHODS
• In the Razorpay checkout modal, select "Netbanking" and choose any bank
· listed — all complete successfully in test mode.
• Test card (domestic): 4111 1111 1111 1111 Expiry: any future date CVV: any
• International test cards will be rejected in test mode (expected behaviour).
-
8. GO LIVE CHECKLIST
[ ] Switch API keys from rzp_test_ to rzp_live_
[ ] Update the webhook secret to match the live webhook
[ ] KYC verification completed and approved
[ ] International payments enabled (if required)
[ ] Subscriptions enabled (if using recurring memberships)
[ ] Test a ₹1 payment with a real card before launch
Paystack Configuration
Paystack is a Nigerian payment gateway (now part of Stripe) that supports cards, bank transfers, USSD, and mobile money. It processes payments primarily in NGN (Nigerian Naira) but also supports GHS (Ghana Cedis), ZAR (South African Rand), KES (Kenyan Shilling), and USD (for international businesses).
-
1. CREATE YOUR PAYSTACK ACCOUNT
• Go to https://paystack.com and sign up.
• Paystack is available to businesses in Nigeria, Ghana, South Africa, Kenya, Côte d'Ivoire, and Egypt.
• Complete business verification to unlock full withdrawal limits.
• Test mode is available immediately.
-
2. GET YOUR API KEYS
• In the Paystack Dashboard go to: Settings → API Keys & Webhooks
• Copy two values:
· Public Key — starts with pk_test_ (test) or pk_live_ (live)
· Secret Key — starts with sk_test_ (test) or sk_live_ (live)
• Enter these in Admin → Gateways → Paystack.
• The Webhook Secret is your Secret Key — Paystack uses it to sign webhooks.
· Enter the same Secret Key value in the Webhook Secret field as well.
-
3. SET WEBHOOK URL
• Go to: Settings → API Keys & Webhooks → Webhook URL
• Enter:
· https://yourdomain.com/webhooks/payments?gateway=paystack
• Paystack sends all event types to a single webhook URL (you cannot filter by event type in the dashboard). The platform handles event routing.
-
4. SET CURRENCY
• Enter your Paystack account currency in Admin → Gateways → Paystack:
· NGN — Nigeria (default)
· GHS — Ghana
· ZAR — South Africa
· KES — Kenya
· USD — International / Dollar-denominated accounts
• The currency must match the currency your Paystack account is configured for.
-
5. ENABLE SUBSCRIPTIONS (for recurring memberships)
• Paystack supports subscriptions natively (called "Plans").
• No extra activation is needed — Plans API is available on all accounts.
• Recurring memberships will create Paystack Plans automatically.
• To view active subscriptions in Paystack: go to Subscriptions in the left menu.
-
6. WEBHOOK EVENTS HANDLED
• The platform automatically handles the following Paystack webhook events:
· charge.success (one-time payment completed)
· subscription.create (recurring — new subscription created)
· subscription.disable (recurring — subscription canceled)
· invoice.create (recurring — renewal invoice generated)
· invoice.update (recurring — invoice status updated)
· invoice.payment_failed (recurring — renewal payment failed)
• No configuration is needed in Paystack to select specific events — all are sent to your webhook URL automatically.
-
7. INTERNATIONAL PAYMENTS
• Paystack supports international cards (Visa, Mastercard, Amex) on most plans.
• Go to: Settings → Preferences → International Payments and enable "Accept international payments".
• Additional charges may apply for international card transactions.
• If your business is outside Paystack's supported countries, you cannot create a Paystack account.
-
8. TEST PAYMENT DETAILS
• Test card (success): 4084 0840 8408 4081 Expiry: any future CVV: 408
• Test card (failure): 4084 0840 8408 4081 — change CVV to 000
• Bank transfer test: Use the test bank account details shown in the modal.
• OTP for test payments: 123456 (or as shown on screen)
-
9. GO LIVE CHECKLIST
[ ] Switch API keys from pk_test_ / sk_test_ to pk_live_ / sk_live_
[ ] Update Webhook Secret to the live Secret Key
[ ] Business verification completed (BVN/RC number in Nigeria)
[ ] International payments enabled (if required)
[ ] Update webhook URL if it changed between test and live
[ ] Test a small real payment before launch
Mollie Configuration
Mollie is a European payment gateway that supports credit/debit cards, iDEAL, Bancontact, SEPA Direct Debit, Klarna, and many other local payment methods. It is widely used across the Netherlands, Belgium, Germany, and the rest of Europe. Mollie's primary currency is EUR but it supports most world currencies.
-
1. CREATE YOUR MOLLIE ACCOUNT
• Go to https://mollie.com and sign up.
• Mollie is available to businesses in the Netherlands, Belgium, Germany, and the rest of Europe.
• Test mode is available immediately after account creation. No KYC is required for test mode.
• To go live, complete business verification in your Mollie dashboard.
-
2. GET YOUR API KEYS
• In the Mollie Dashboard go to: Developers → API keys
• Copy the API keys:
· Test key — starts with test_
· Live key — starts with live_
• Enter this as the API Key in Admin → Gateways → Mollie.
• There is NO webhook secret. Mollie does not sign webhook requests.
· Do not confuse the API key with a webhook secret — they are different things.
-
3. SET THE WEBHOOK URL (global fallback)
• In the Mollie Dashboard go to: Developers → Webhooks
• Add a webhook URL as a global fallback:
· https://yourdomain.com/webhooks/payments?gateway=mollie
• NOTE: The platform embeds the webhook URL directly in every payment request
it creates, so this global fallback is only used as a safety net if a payment is somehow created without an explicit URL. In normal operation, Mollie calls
the embedded URL automatically.
• There are NO specific events to select. Mollie calls your webhook URL on every payment status change (open → pending → paid / failed / expired).
-
4. SET CURRENCY
• Enter your preferred currency in Admin → Gateways → Mollie:
· EUR — Euro (default and recommended for European businesses)
· USD — US Dollar
· GBP — British Pound
• Mollie supports most world currencies. The currency entered here is used when creating payment requests. Mollie will present the correct payment methods available for that currency in your country.
-
5. ENABLE SUBSCRIPTIONS (for recurring memberships)
• Mollie subscriptions work in two phases:
• Phase 1 — First payment (mandate setup):
· The user pays once through Mollie's checkout page. This payment has sequenceType=first, which causes Mollie to create a payment mandate (saved payment authorization) linked to the customer's account. The mandate is created automatically when the payment completes — you cannot create card mandates via the API directly.
• Phase 2 — Subscription creation:
· Immediately after the first payment's webhook fires (status=paid), the platform creates a Mollie subscription using the customer ID. Mollie then charges the customer automatically on each billing cycle and calls your webhook URL for each renewal payment.
• No extra feature activation is required in the Mollie dashboard. Subscriptions are available on all accounts.
-
6. TEST PAYMENT METHODS
• Mollie provides a full hosted checkout page in test mode with selectable payment methods.
• Credit/debit card test number: 4242 4242 4242 4242 Expiry: any future date CVV: any 3 digits
• iDEAL: Select any bank in test mode — all complete successfully.
• Bancontact: Select in test mode — completes automatically.
• In test mode, Mollie also lets you manually set the payment result to "paid", "failed", or "expired" from the dashboard, which is useful for testing failure scenarios without a real card.
-
7. GO LIVE CHECKLIST
[ ] Complete business verification in Mollie dashboard
[ ] Switch API key from test_xxxx to live_xxxx in Admin → Gateways
[ ] Update the global fallback webhook URL if the domain changed
[ ] Ensure the live API key has access to Subscriptions (enabled by default)
[ ] Test a small real payment (e.g. €0.01) before launch
[ ] Verify Mollie account bank details for payouts
PayFast Configuration
PayFast is a South African payment gateway that supports credit/debit cards, Instant EFT (bank transfers), MoreTyme, Mobicred, and other local payment methods. It processes payments primarily in ZAR (South African Rand). PayFast is widely used by South African merchants for both one-time and recurring (subscription) payments.
-
1. CREATE YOUR MOLLIE ACCOUNT
• Go to https://www.payfast.co.za and sign up as a merchant.
• PayFast is available to South African businesses (individual or registered).
• Complete identity and banking verification before going live.
• A sandbox environment is provided automatically; no extra activation needed.
-
2. GET YOUR CREDENTIALS
You need three values from your PayFast merchant account:
• Merchant ID — found at: Dashboard → Settings → Merchant Details → Merchant ID
• Merchant Key — found at: Dashboard → Settings → Merchant Details → Merchant Key
• Passphrase — set by you at: Dashboard → Settings → Security → Passphrase
· Enter all three in Admin → Gateways → PayFast.
• NOTE: The Passphrase is optional in PayFast's system but REQUIRED in this platform for correct signature generation. Always configure one.
-
3. SET THE NOTIFY URL (webhook)
• In the PayFast Dashboard go to: Settings → Integrations → Notify URL
• Enter:
· https://yourdomain.com/webhooks/payments?gateway=payfast
• PayFast sends ALL ITN (Instant Transaction Notification) events to this single URL. There are no individual event types to select.
• Save the setting. PayFast will POST an ITN to this URL for every transaction
-
4. SET CURRENCY
• PayFast processes payments in ZAR by default.
• Enter ZAR in the Currency field in Admin → Gateways → PayFast.
• Multi-Currency Pricing (MCP): Merchants can enable MCP in their dashboard settings to let buyers view and pay in major global currencies like USD, EUR, GBP, and AUD.
-
5. SET MODE (Sandbox vs Live)
• In Admin → Gateways → PayFast, set Mode to:
· Sandbox — for testing (uses sandbox.payfast.co.za)
· Live — for real payments (uses www.payfast.co.za)
• Sandbox credentials (use these for testing only):
· Merchant ID: 10000100
· Merchant Key: 46f0cd694581a
· Passphrase: (leave blank for sandbox)
• When going live, switch Mode to "Live" and enter your real credentials.
-
6. SUBSCRIPTIONS (recurring memberships)
• PayFast subscriptions are fully native — no cron jobs or manual charging are required. PayFast handles the billing schedule automatically.
• Frequency mapping:
· Weekly membership → frequency=2 (charged every 7 days)
· Monthly membership → frequency=3 (charged monthly on billing_date)
· Annual membership → frequency=6 (charged annually)
• PayFast fires an ITN for each renewal with the same subscription token. The platform extends the membership expiry on each successful renewal ITN.
• Subscription tokens are stored in the subscriptions table for management.
-
7. TEST PAYMENT METHODS
• Use the sandbox URL (Mode=Sandbox) and sandbox credentials.
• PayFast sandbox provides a test checkout page with a credit card option.
• Test card: 4000 0000 0000 0002
· Expiry: any future date CVV: any 3 digits
• For EFT testing, select "Instant EFT" in the sandbox checkout.
• The sandbox does NOT send real ITN notifications by default. To test webhooks you need a publicly accessible URL (e.g. via ngrok) or use PayFast's "Simulate" tool in the sandbox dashboard.
-
8. GO LIVE CHECKLIST
[ ] Switch Mode from Sandbox to Live in Admin → Gateways → PayFast
[ ] Enter live Merchant ID, Merchant Key, and Passphrase
[ ] Set Notify URL in live PayFast dashboard (Settings → Integrations)
[ ] Business verification and banking details confirmed in PayFast dashboard
[ ] Test a small real payment (e.g. R1.00) before opening to customers
[ ] Verify ITN notifications are firing (check payment logs)
PayPal Configuration
PayPal is a globally recognised payment platform supporting credit/debit cards, PayPal balances, Pay Later (Buy Now Pay Later), and Venmo (US only). It works in 200+ countries and over 100 currencies. One-time payments and recurring subscriptions are both fully supported. PayPal uses OAuth2 (Client ID + Secret) rather than a single API key, and requires a server-side capture step after the buyer approves a one-time payment.
-
1. CREATE YOUR PAYPAL ACCOUNT
• Go to https://developer.paypal.com and log in with your PayPal business account.
· If you do not have a business account, create one first at https://paypal.com.
• Once logged in, navigate to: My Apps & Credentials
• You will see two tabs: Sandbox and Live. Start with Sandbox for testing.
-
2. CREATE A SANDBOX APP AND GET API CREDENTIALS
• On the Sandbox tab click "Create App".
• Give the app a name (e.g. "MMP6 Membership").
• Under "App Type" select "Merchant".
• After saving, you will see two credentials:
· Client ID — starts with AUxxx...
· Secret — click "Show" to reveal; starts with EIkxx...
• Copy both values. You will need them in Step 5.
• NOTE: Sandbox and Live credentials are completely separate apps with different Client IDs and Secrets. You will repeat this step in Live mode when you are ready to go live.
-
3. CREATE A WEBHOOK AND NOTE THE WEBHOOK ID
• In the same app page, scroll down to "Webhooks" and click "Add Webhook".
• Webhook URL:
· https://yourdomain.com/webhooks/payments?gateway=paypal
• Select the following events to listen for:
· CHECKOUT.ORDER.COMPLETED
· PAYMENT.CAPTURE.COMPLETED
· PAYMENT.CAPTURE.DENIED
· BILLING.SUBSCRIPTION.ACTIVATED
· BILLING.SUBSCRIPTION.RENEWED
· BILLING.SUBSCRIPTION.CANCELLED
· PAYMENT.SALE.COMPLETED
• After saving, the webhook row will show a Webhook ID (a long alphanumeric string). Copy this value — it is used for signature verification. Enter it as "Webhook ID" in Admin → Gateways → PayPal. NOTE: The Webhook ID is NOT a secret. It is simply an identifier PayPal uses to look up the correct app during signature verification.
-
4. HOW PAYPAL WEBHOOK VERIFICATION WORKS
• PayPal sends the following HTTP headers with every webhook request:
· PAYPAL-TRANSMISSION-ID
· PAYPAL-TRANSMISSION-TIME
· PAYPAL-CERT-URL
· PAYPAL-AUTH-ALGO
· PAYPAL-TRANSMISSION-SIG ← this is the signature value
The platform verifies webhooks by calling PayPal's own verification API (/v1/notifications/verify-webhook-signature) with these headers plus your Webhook ID. PayPal responds with "SUCCESS" or "FAILURE".
This means:
• You do NOT need to compute an HMAC yourself.
• Verification requires a live API call to PayPal on every webhook.
• The Webhook ID in your credentials must match the webhook you registered. If they do not match, all webhooks will be rejected.
-
5. ENTER CREDENTIALS IN ADMIN
• Go to Admin → Gateways → PayPal and enter:
· Client ID — from Step 2
· Secret — from Step 2
· Webhook ID — from Step 3
· Mode — "sandbox" for testing, "live" for real payments
· Currency — e.g. USD, EUR, GBP (must match your PayPal account currency)
-
6. ENABLE SUBSCRIPTIONS (for recurring memberships)
• PayPal subscriptions are fully supported. No extra feature activation is needed in the PayPal dashboard.
• When a recurring membership is purchased, the platform automatically:
· 1. Creates a PayPal Product (SERVICE / SOFTWARE category)
· 2. Creates a Billing Plan tied to that product with the correct interval
· 3. Creates a Subscription and redirects the user to approve it
• Billing interval mapping:
· Daily membership → BILLING_CYCLE = DAY
· Weekly membership → BILLING_CYCLE = WEEK
· Monthly membership → BILLING_CYCLE = MONTH (default)
· Annual membership → BILLING_CYCLE = YEAR
Subscription activates via BILLING.SUBSCRIPTION.ACTIVATED webhook (first payment). Renewals fire BILLING.SUBSCRIPTION.RENEWED or PAYMENT.SALE.COMPLETED (legacy), both handled automatically.
-
7. SANDBOX TESTING
• PayPal sandbox uses test buyer accounts rather than raw card numbers.
• In the PayPal Developer Portal go to: Sandbox → Accounts
· You will see a pre-created buyer and seller account. Use the buyer accountto log in during test checkouts.
• Default sandbox buyer email: sb-XXXXX@personal.example.com
(shown in the Accounts list; set a password via "..." → "Edit")
• Alternatively, go to: Sandbox → Accounts → Create Account to make a fresh buyer account with a known password.
• To test a checkout:
· 1. Initiate a membership purchase with Mode=Sandbox.
· 2. You are redirected to sandbox.paypal.com.
· 3. Log in with the sandbox buyer credentials.
· 4. Approve the payment.
· 5. You are redirected back to the site. The platform captures the payment server-side and the PAYMENT.CAPTURE.COMPLETED webhook fires.
• For webhook testing locally, expose your local server with ngrok or similar. PayPal cannot send webhooks to localhost.
-
8. GO LIVE CHECKLIST
[ ] Create a Live app in PayPal Developer Portal (My Apps & Credentials → Live tab)
[ ] Copy Live Client ID and Secret into Admin → Gateways → PayPal
[ ] Add the webhook in the Live app and copy the Live Webhook ID
[ ] Set Mode to "live" in Admin → Gateways → PayPal
[ ] Confirm your PayPal business account is verified and bank account linked
[ ] Test a real payment for a small amount before launch
[ ] Confirm PAYMENT.CAPTURE.COMPLETED webhook fires and membership activates
Crypto Configuration (USDC on Base, Polygon, Arbitrum)
CryptoDriver enables direct blockchain payments in USDC (stablecoin) without any third-party payment processor. Users send USDC directly to your hardware wallet address. The platform polls the blockchain via RPC to verify the transaction, then automatically activates the membership. No private keys are stored on the server; funds go directly to your wallet.
Key benefits:
• Non-custodial (direct wallet-to-wallet transfer)
• No KYC or account verification required
• Supports Base, Polygon, and Arbitrum networks
• Automatic verification via blockchain queries
• Minimal transaction fees
• Complete privacy for customers
-
1. CHOOSE YOUR BLOCKCHAIN NETWORK
• Base (Sepolia testnet: chainId 84532, Mainnet: chainId 8453)
• Polygon (Mumbai testnet: chainId 80001, Mainnet: chainId 137)
• Arbitrum (Sepolia testnet: chainId 421614, Mainnet: chainId 42161)
For initial testing, use Base Sepolia testnet. For production, use Base mainnet.
-
2. GET YOUR WALLET ADDRESS
• Use your hardware wallet (Ledger, Trezor, etc.) or MetaMask.
• Open the wallet and copy your public address (starts with 0x).
• This is your RECIPIENT ADDRESS — the address that receives USDC payments.
• This is public information and safe to store in the platform.
Important: The private key NEVER goes on the server. Only the public address is stored. Users send funds to your address voluntarily.
-
3. GET AN RPC ENDPOINT (Free or Paid)
• Option A — Free (Alchemy free tier — recommended for starting out)
· Go to https://www.alchemy.com and sign up for free
· Create a new app, select Base (Sepolia for testnet, Mainnet for production)
· Copy the HTTPS endpoint URL (looks like: https://base-sepolia.g.alchemy.com/v2/YOUR_KEY)
· You get 150K requests/day free (enough for moderate volume)
• Option B — Paid (higher rate limits)
· Alchemy: $100/month for 10M requests
· QuickNode: $99/month for unlimited requests
· Infura: https://www.infura.io (similar pricing)
• Option C — Self-hosted (if you're running your own node)
· Deploy a Base node on your server
· Use http://localhost:8545 or your node's public URL
-
4. CONFIGURE CRYPTO GATEWAY IN ADMIN PANEL
• Go to Admin → Gateways
• Enter your credentials for the selected blockchain network.
• Example configuration:
• Explanation of fields:
· chain — Blockchain network: "base", "polygon", or "arbitrum"
· recipient_address — Your public wallet address (0x...)
· rpc_url — RPC endpoint URL https://YOUR_ALCHEMY_ENDPOINT (from Alchemy, QuickNode, etc.)
· poll_interval_minutes — How often to check blockchain (5 = every 5 min)
· block_confirmations — How many block confirmations before marking settled (testnet: 2, mainnet: 12+)
· mode — "testnet" or "mainnet"
-
5. SCHEDULE THE VERIFICATION CRON JOB
The verification cron must run every 5-10 minutes to poll the blockchain. See full cron job instructions here: https://help.wojoscripts.com/guides/tips-and-tricks/
• Option A — Linux/Mac crontab
Add to your server's crontab (crontab -e): */5 * * * * curl https://yourdomain.com/admin/cron/run/crypto-verify?key=YOUR_CRON_KEY > /dev/null 2>&1• Option B — PHP cron runner (if using internal cron system)
· File: library/Cron/CryptoVerificationCron.php
· Method: run()
· Schedule it to execute every 5 minutes via your existing cron runner
• Option C — Manual testing (for verification)
php -r " require 'config/init.php'; \$cron = new \\Wojo\\Cron\\CryptoVerificationCron(); echo json_encode(\$cron->run()); -
6. TEST ON TESTNET (CRITICAL)
This section reflects the exact steps that have been tested end-to-end and confirmed working. Follow them in order.
• A. Add Base Sepolia to MetaMask
· 1. Open MetaMask → Settings → Networks → Add a network → Add manually
· 2. Enter these values:
· Network name: Base Sepolia
· RPC URL: https://sepolia.base.org
· Chain ID: 84532
· Currency: ETH
· Explorer: https://sepolia.basescan.org
3. Switch MetaMask to the Base Sepolia network.
• B. Get testnet ETH (needed to pay gas for USDC transfers)
· Go to https://app.optimism.io/faucet (Superchain Faucet)
· Connect your MetaMask wallet
· Select "Base Sepolia" from the network dropdown
· Request ETH — you receive a small amount of testnet ETH for gas
NOTE: LearnWeb3 and some other faucets require existing mainnet activity;
the Superchain Faucet does not.
• C. Get testnet USDC
· Go to https://faucet.circle.com
· Connect your MetaMask wallet
· Select "Base Sepolia" as the network and "USDC" as the token
· Request USDC — you receive testnet USDC directly on Base Sepolia
· No bridging required.
· Add the USDC token to MetaMask if it does not appear automatically:
Token contract: 0x036CbD53842c5426634e7929541Ec2318F3dCf7E
• D. Configure gateway for testnet in Admin → Gateways → Crypto
{ "chain": "base", "recipient_address": "0xYOUR_TEST_WALLET", "rpc_url": "https://base-sepolia.g.alchemy.com/v2/YOUR_KEY", "poll_interval_minutes": 5, "block_confirmations": 2, "mode": "testnet" }• Use block_confirmations: 2 for testnet (faster feedback).
• Use a DIFFERENT wallet address as the recipient than your sending wallet.
• E. Run the end-to-end test
· 1. Register a new test user on the site and select a membership with a crypto payment option. Complete the registration form.
· 2. You are redirected to /crypto-payment?order_id=CRYPTO_xxx
· 3. The page shows the recipient wallet address and the exact USDC amount due.
· 4. In MetaMask (on Base Sepolia), send that exact USDC amount to the displayed address. Copy the address carefully — even one wrong character fails the match.
· 5. Transaction confirms on-chain in a few seconds. Copy the tx hash from MetaMask's activity tab or from https://sepolia.basescan.org.
· 6. Wait for the cron to run (up to poll_interval_minutes), or trigger it manually: curl "https://yourdomain.com/admin/cron/run/crypto-verify?key=YOUR_CRON_KEY"
· 7. The payment page auto-polls and will update to "Payment Confirmed!" when done, then redirect the user to their dashboard.
· 8. Verify in the database:
SELECT status, tx_hash, confirmed_at FROM crypto_payments WHERE order_id = 'CRYPTO_xxx'; SELECT * FROM user_memberships WHERE user_id = YOUR_TEST_USER_ID ORDER BY id DESC LIMIT 1; SELECT membership_id, mem_expire, active FROM users WHERE id = YOUR_TEST_USER_ID; -
7. ADD BASE SEPOLIA NETWORK TO ALCHEMY (Optional but helpful)
1. Log in to Alchemy dashboard
2. Create a new app (if you don't have one)
3. Select network: Base → Sepolia (testnet)
4. Copy the HTTPS endpoint
-
8. EXPLORE TRANSACTIONS (for debugging)
All transactions are viewable on the block explorer:
• Base Sepolia: https://sepolia.basescan.org/
• Base Mainnet: https://basescan.org/
• Polygon Mumbai: https://mumbai.polygonscan.com/
• Polygon Mainnet: https://polygonscan.com/
• Arbitrum Sepolia: https://sepolia-explorer.arbitrum.io/
• Arbitrum Mainnet: https://arbiscan.io/
Search by wallet address to see all transactions received.
-
9. GO LIVE CHECKLIST (MAINNET)
[ ] Verify payments.txn_id is VARCHAR(100) or longer (ALTER TABLE if needed)
[ ] Switch mode from "testnet" to "mainnet" in Admin → Gateways → Crypto
[ ] Use mainnet RPC endpoint (https://base.g.alchemy.com/v2/YOUR_KEY)
[ ] Set block_confirmations to 12 (for security)
[ ] Recipient address verified on mainnet block explorer before going live
[ ] Cron job scheduled and running every 5 minutes
[ ] Test payment flow with small amount (e.g. 0.10 USDC) before opening to customers
[ ] Monitor logs for errors (storage/logs/crypto-verification.log)
[ ] Confirm membership activated and database records correct after test payment
-
10. ADDING POLYGON/ARBITRUM SUPPORT (Later)
To support additional chains, simply update the gateway config:
• For Polygon Mainnet:
{ "chain": "polygon", "recipient_address": "0xYOUR_WALLET_ADDRESS", "rpc_url": "https://polygon.g.alchemy.com/v2/YOUR_KEY", "poll_interval_minutes": 5, "block_confirmations": 64, "mode": "mainnet" }• For Arbitrum Mainnet:
{ "chain": "arbitrum", "recipient_address": "0xYOUR_WALLET_ADDRESS", "rpc_url": "https://arb-mainnet.g.alchemy.com/v2/YOUR_KEY", "poll_interval_minutes": 5, "block_confirmations": 13, "mode": "mainnet" }No code changes required — the ChainRegistry already contains all configurations.