Quickstart
Add PPP discounts to your site in under 5 minutes.
Get up and running with GoPayLocal in three steps.
-
Sign up for free
Create your account at app.gopaylocal.com. No credit card required — the free tier lets you try every feature on 1 product with 10K API hits/month.
-
Add the banner script
Copy your public API key from the dashboard and add the script tag to your site:
<!-- Add before </body> --><scriptsrc="https://api.gopaylocal.com/v1/banner/script.js?key=gpl_pk_live_abc123"async></script>// app/layout.tsx (App Router)import Script from 'next/script';export default function RootLayout({ children }) {return (<html><body>{children}<Scriptsrc="https://api.gopaylocal.com/v1/banner/script.js?key=gpl_pk_live_abc123"strategy="afterInteractive"/></body></html>);}src/layouts/Layout.astro <html><body><slot /><scriptsrc="https://api.gopaylocal.com/v1/banner/script.js?key=gpl_pk_live_abc123"is:inlineasync></script></body></html>Replace
gpl_pk_live_abc123with your actual public API key from the dashboard. -
Configure discounts in the dashboard
Go to your Dashboard and:
- Create a Product with your product name and base price
- Create a Campaign and choose a pricing mode
- Connect a Payment Integration (Stripe, Paddle, etc.) for automatic coupon creation
- Customize your Banner appearance
That’s it. Visitors from countries with lower purchasing power will now see a personalized discount banner.
What Happens Next
Section titled “What Happens Next”When a visitor loads your page:
- The script detects their country via Cloudflare’s edge (zero latency, no external API call)
- It looks up the appropriate PPP discount from edge cache (< 10ms)
- It checks for VPN/proxy usage
- A customizable banner appears showing the discount and coupon code
- Analytics are tracked via
sendBeacon
Want More Control?
Section titled “Want More Control?”The banner script is the simplest integration. For deeper control over pricing display, consider:
- React SDK — Components and hooks for React/Next.js apps
- JavaScript SDK — Imperative API for any JS framework
- Auto-apply discounts — Skip the coupon code entirely
Test It Locally
Section titled “Test It Locally”You can test PPP behavior without deploying by using browser dev tools to set a different country. GoPayLocal reads the CF-IPCountry header set by Cloudflare. In development, you can override the country by adding a query parameter:
http://localhost:3000?gpl_country=IN