Developer Sandbox

5-Minute Quickstart

From zero to processing your first test payment. See how easy it is to build with the DevCarts headless API.

1

Get your API Keys

Sign up for a free DevCarts account and grab your publishable and secret keys from the dashboard.

2

Initialize the Client

Install our SDK and initialize it with your keys.

Terminal
npm install @devcarts/node

import { DevCarts } from '@devcarts/node';
const store = new DevCarts('sk_live_...');
3

Fetch Products

Query your store inventory to display products on your custom frontend.

Terminal
const products = await store.products.list();
console.log(products);
4

Create a Checkout Session

Send cart items to DevCarts and get a secure checkout URL back.

Terminal
const checkout = await store.checkout.create({
  items: [{ id: 'prod_123', quantity: 1 }]
});
window.location = checkout.url;

You're ready to launch!

That's all it takes. Explore our full API reference for advanced features like coupons, webhooks, and customer management.

Explore Full API