Invoices vs orders: These guides walk through invoices (formal billing, line items, publish). The collect flow is the same for orders — use
/v1/orders/* instead of /v1/invoices/* and set source_type: "ORDER" on the checkout session. See Orders and Parties & counterparties.Hosted checkout: To skip party, invoice, session, and execute steps entirely, see Hosted checkout.Fastest path for Next.js: Hosted checkout — create a checkout source server-side and redirect to
url. No Stripe or payment-account setup required.API Reference: Obtain token · Collect
Prerequisites
- Next.js 14+ (App Router)
- Environment variables in
.env.local(notNEXT_PUBLIC_except Stripe publishable key for card UI):
Option A — Hosted checkout (recommended)
GET /v1/status/source before fulfilling — see Hosted checkout.
Option B — API-embedded collection
1
Route Handler — obtain token
2
Server Action — full collect flow
Follow Quick Start steps: party → counterparty → invoice → publish → session → payment account → execute. Or use Collect with card for Stripe Elements.
3
Poll from a Route Handler
Try it yourself
Hosted checkout
Mobile money and card on a Dollr-hosted page — fastest path.
Orders
Same collect flow with
source_type: ORDER and /v1/orders/*.Direct checkout
One API call to create source — API-embedded flow.
