White-Label API Custom Domain Guide | RiskPay.biz
Last Updated: 2025-04-08
Learn how to mask RiskPay’s API under your own domain using Cloudflare—plus hidden affiliate wallet integration to earn 0.5% lifetime commissions on every transaction.
✅ No coding skills required
✅ Free Cloudflare plan compatible
✅ 100% white-label checkout flow
Prerequisites
- A domain registered with any provider (e.g., GoDaddy, Namecheap).
- A free Cloudflare account.
Step 1: Configure Cloudflare DNS
1. Add Your Domain to Cloudflare
- Sign up for Cloudflare and select the free plan.
- Follow prompts to change your domain’s nameservers to Cloudflare’s (e.g.,
lara.ns.cloudflare.com
).
2. Create Proxied DNS Records
- Navigate to DNS > Records and add
A
records for:api.yourdomain.com
→8.8.8.8
(proxy enabled 🟠)checkout.yourdomain.com
→8.8.4.4
(proxy enabled 🟠)- Note: IPs are placeholders; Cloudflare will reroute traffic.
Step 2: Deploy the Cloudflare Worker
1. Create a New Worker
- Go to Workers & Pages > Create Application.
- Name it (e.g.,
riskpay-proxy
).
2. Paste the Worker Code
Option A: Standard White-Label
// Basic proxy to RiskPay API (no affiliate wallet)
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
const url = new URL(request.url)
url.hostname = 'api.riskpay.biz' // Keep this unchanged
return fetch(url, request)
}
Option B: Affiliate Earnings (0.5% Commission)
// Adds hidden affiliate wallet to all requests
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
const url = new URL(request.url)
url.hostname = 'api.riskpay.biz'
url.searchParams.append('affiliate_wallet', 'YOUR_USDC_POLYGON_WALLET') // Replace with your wallet
return fetch(url, request)
}
3. Deploy the Worker
- Click Save and Deploy.
Step 3: Route Traffic to Your Worker
- In your Worker’s Settings > Triggers, add routes:
api.yourdomain.com/*
checkout.yourdomain.com/*
- Enable the wildcard (
*
) to capture all subpaths.
Cloudflare Worker Routes (Picture coming soon)
Step 4: Rebrand RiskPay’s Plugins (Optional)
- Download our open-source plugins from GitHub.
- Replace all instances of:
api.riskpay.biz
→api.yourdomain.com
checkout.riskpay.biz
→checkout.yourdomain.com
- For WooCommerce: Upload the modified plugins to your clients’ sites.
💡 Pro Tip: Use the affiliate-enabled worker.js to ensure commissions even if clients alter plugin code.
Testing & Troubleshooting
- Verify Setup: Visit
api.yourdomain.com/status
(should returnRiskPay API
). - Common Issues:
- DNS not propagating? Wait 24 hours or flush DNS (
ipconfig /flushdns
). - 502 errors? Double-check worker code for typos.
- DNS not propagating? Wait 24 hours or flush DNS (
Earning Commissions
- Every transaction via your custom domain pays 0.5% lifetime commission (USDC, instant payout).
- Track earnings in your RiskPay Affiliate Dashboard.
Affiliate Dashboard Screenshot (Picture coming soon)
FAQ
Need Help?
Contact our 24/7 Support Team:
- Telegram: @riskpaydotbiz
- Email: [email protected]