Checkout API quickstart
Accept USDC payments from your app with Checkout and the Zoneless Node.js SDK. This guide uses Zoneless Cloud in live mode.
Prefer no code? Use the Payment Links quickstart. Self-hosting? Complete the Self-hosting guide first, then continue from Install the SDK using your instance URL instead of https://api.zoneless.com.
1Get your API key
Sign up at zoneless.com (or use an existing account) and copy your live secret key from the dashboard. It starts with sk_live_z_. Keep it server-side only; never expose it in client-side code or commit it to version control.
npm install @zoneless/node
3Initialize the client
Create a Zoneless client with your live secret key and the cloud API base URL.
import { Zoneless } from '@zoneless/node';
const zoneless = new Zoneless('sk_live_z_YOUR_API_KEY', 'https://api.zoneless.com');
4Create a Checkout Session
Create a Checkout Session in payment mode. Use price_data to define the product and amount inline, without creating a Product or Price first. Then redirect your customer to the session URL.
import { Zoneless } from '@zoneless/node';
const zoneless = new Zoneless('sk_live_z_YOUR_API_KEY', 'https://api.zoneless.com');
const session = await zoneless.checkout.sessions.create({
success_url: 'https://yoursite.com/success',
cancel_url: 'https://yoursite.com/cancel',
line_items: [
{
price_data: {
currency: 'usdc',
unit_amount: 1000, // $10.00
product_data: {
name: 'My first product',
},
},
quantity: 1,
},
],
mode: 'payment',
});
// Redirect the customer to session.url
console.log(session.url);
5Collect payment
Redirect your customer to session.url. They complete Checkout with their Solana wallet and pay in USDC. Settlement typically confirms in seconds. See Checkout Sessions for the full API.
Next steps
- Webhooks: Listen for
checkout.session.completedand fulfill the order - Payment Links: Create shareable links via the API or dashboard
- Subscriptions: Recurring USDC billing with invoices
- API quickstart: Onboard sellers and pay them out with Connect
