Skip to main content
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.
Call the Dollr API from server-only code for API-embedded flows. Never expose your Client Secret in the browser.
API Reference: Obtain token · Collect

Prerequisites

  • Next.js 14+ (App Router)
  • Environment variables in .env.local (not NEXT_PUBLIC_ except Stripe publishable key for card UI):
On your success page, verify server-side with 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

Do not expose DOLLR_CLIENT_SECRET to Client Components. Use Route Handlers or Server Actions only.

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.
Last modified on June 23, 2026