Developers

Build with BAM NFT

Drop a fully hosted NFT checkout into your own page, listen for signed webhooks, and let BAM handle minting, payments, PCI scope, and delivery. Two lines of HTML for the happy path — REST + webhooks when you need more.

Quickstart

Two lines of HTML

No npm install, no build step. Replace lnk_… with a CheckoutLink id from your dashboard.

<!-- 1. Drop the loader on your page -->
<script async defer src="https://bamnft.com/embed/loader.js"></script>

<!-- 2. Drop a mount point per checkout -->
<div data-bam-checkout-link-id="lnk_…"></div>

<!-- 3. Listen for the buyer reaching success -->
<script>
  document.addEventListener('bam-checkout:complete', (e) => {
    window.location.href = '/thanks?order=' + e.detail.orderId;
  });
</script>

Start here

How it fits together

1

You drop the loader

A 4 KB script tag plus a div with a CheckoutLink id. The script mounts an iframe at bamnft.com/embed/… per matching div.

2

BAM hosts the checkout

Buyer fills email + wallet, picks an acquirer (Stripe / uPayWise), pays on the acquirer’s hosted page in a new tab. iframe polls for terminal state.

3

Your backend gets the webhook

Signed POST to your registered URL on `checkout.session.completed` (and `order.minted` when the mint lands). Idempotent via `bam-event-id`.

REST endpoints

All endpoints require a merchant API key (Authorization: Bearer bam_live_…). Mutations require the checkout:write scope. Idempotency-Key is honored on every POST.

MethodPathDescription
POST/v1/checkout/linksCreate a reusable checkout link (returns ready-to-paste snippet)
GET/v1/checkout/linksList your links
PATCH/v1/checkout/links/:idUpdate price, currency, walletRequired, active, metadata
POST/v1/checkout/sessionsCreate a one-shot session for a dynamic cart
GET/v1/checkout/sessionsList sessions (filter by `state`, `linkId`)
GET/v1/checkout/sessions/:idGet a session (token redacted)
POST/v1/merchants/:id/allowed-originsRegister an origin allowed to embed checkout
POST/v1/merchants/:id/webhook-endpointsRegister an outbound webhook endpoint (returns secret once)
POST/v1/merchants/:id/webhook-endpoints/:id/rotate-secret30-day grace window; worker emits `bam-signature-old` during the window

Tools you'll use

Need a hand?

Open the onboarding wizard for an interactive walk-through, or email help@bamnft.com — we typically reply within a business day.