Getting started
Create a merchant account, set up payouts, deploy a cart-signing route on your server, mount the SDK, and run one full sandbox checkout before you touch live mode.
Copy this page as a setup prompt for your coding assistant.
Full implementation example
Try the live sandbox store at ante-demo-store.vercel.app — a complete Next.js shop with cart signing, @splitante/react-sdk, webhooks, and test/live credential switching.
Clone the source on GitHub: plurel-company/ante-demo-store. The repository is public (anyone can clone or fork); only Plurel maintainers can push to main.
Before you start
You need a server (or serverless function) that can hold a signing secret and compute HMAC-SHA256. Node 20+ with @splitante/sdk/signing is the path of least resistance, but any language works if it matches the canonical cart format. Stripe test mode is enough for sandbox.
1. Merchant account
- Sign up at /merchants/sign-up (or complete onboarding after Google sign-in).
- Enter the one-time code emailed to you (email sign-up).
- On Home, open the Setup guide in the top bar (next to the Test mode pill) and note your
ante_merch_*merchant ID in the business menu or Settings.
2. Payout setup
Open Payments in the merchant portal and finish payout onboarding. Settlements for funded groups are sent to your linked bank account. Live payouts require identity verification; sandbox testing does not. This is step 1 in the Setup guide. Optional payout currency preference (Business settings) controls when Ante withholds an FX fee — Connect transfers always use the checkout currency.
New merchants start in test mode (sandbox). API keys and the signing secret are not issued automatically — create them from the Setup guide or Developers.
3. Credentials
In the Setup guide, click Create sandbox API keys (full publishable and secret values shown once — copy immediately). Generate the cart signing secret under Developers → Signing. If you lose a key, rotate it on the Developers tab; revoke old prefixes under Key management. Treat all secrets like passwords.
Storefront checkout
For the hosted modal (CDN, npm, or React), you need the publishable key and signing secret only. The secret API key (ante_sk_*) is for headless REST and webhook admin — not for browser checkout. See Credentials.
| Name | Example shape | Storefront? | Where |
|---|---|---|---|
| Merchant ID | ante_merch_… | Yes | Ante.init merchantId |
| Publishable key | ante_pk_test_… | Yes | Browser SDK / session create |
| Signing secret | ante_sign_… | Yes | Server env ANTE_SIGNING_SECRET |
| Secret API key | ante_sk_test_… | No | Headless REST only (after approval) |
| Webhook secret | whsec_… | Recommended | Verify group.funded deliveries |
4. Cart signing route
Publishable keys cannot create a session without a valid signature. Add an HTTPS route on your domain (not splitante.com) that returns { "signature": "…" }:
import { createCartSignature } from "@splitante/sdk/signing";
export async function POST(req: Request) {
const { cart } = await req.json();
const signature = createCartSignature(cart, process.env.ANTE_SIGNING_SECRET!);
return Response.json({ signature });
}5. Storefront button
Pick an integration path — they all use the same credentials and signing route:
| Path | Docs section |
|---|---|
| CDN script tag (vanilla HTML) | /docs/sdk § CDN script tag |
| npm @splitante/sdk (bundled JS, no React) | /docs/sdk § npm — bundled JavaScript |
| npm @splitante/react-sdk (Next.js, React) | /docs/sdk § npm — React |
| REST only — no button | /docs/api |
Full examples and option reference: JavaScript SDK.
<script src="https://splitante.com/sdk/v1/ante.js" async></script>
<script>
Ante.init({
merchantId: "ante_merch_YOUR_ID",
publishableKey: "ante_pk_test_YOUR_KEY",
getSignature: async (cart) => {
const res = await fetch("/api/cart/sign", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ cart }),
});
if (!res.ok) throw new Error("Signing failed");
return (await res.json()).signature;
},
});
Ante.createButton({
cart: {
total: 12000,
currency: "usd",
items: [{ id: "sku_1", name: "Ticket", quantity: 2, unit_price: 5000 }],
tax: 1000,
shipping: 1000,
},
group: { minSize: 2, maxSize: 6 },
}).mount("#ante-button");
</script>6. Webhooks
Register at least one HTTPS endpoint under Webhooks. Subscribe to group.funded. Verify Ante-Signature on every POST. Details: Webhooks.
7. Sandbox test
Walk through the live demo store first — it runs the production SDK in sandbox with cart signing, webhooks, and a one-tap test card. Then repeat on your staging URL:
- Click the button on a staging URL.
- Configure the group in the modal. Pay each share with card
4242 4242 4242 4242. - Confirm
group.createdandgroup.fundedhit your endpoint with valid signatures. - Match the session in the dashboard against your order logic.
Dashboard snippets
Integration generates the same examples with your merchant ID and API base URL filled in.
When sandbox is clean, use the go-live checklist. Headless REST is optional: REST API.