▲
Add crypto payments to your Next.js project in under 10 minutes.
Get Your API KeyInstall the Zateway SDK: npm install @zateway/sdk
Create a /checkout route in your Next.js app
Use server-side API route to create payment sessions
Redirect users to the Zateway hosted checkout page
Handle webhook callbacks for payment confirmation
// app/api/create-payment/route.ts
export async function POST(req) {
const { amount, currency } = await req.json();
const res = await fetch('https://zateway.com/api/v1/payments', {
method: 'POST',
headers: {
'X-API-Key': process.env.ZATEWAY_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({ amount, currency, chain: 'polygon' }),
});
return Response.json(await res.json());
}Get your API key and start accepting crypto payments in minutes.
Get Started Free