In the API, an invoice is a payment link — the endpoints and field names below say
paymentLink. Same thing; these guides say “invoice” because that’s what your customer sees.Before you start: You need an API token. Organizations on the Nickel Pro plan create and manage tokens in the dashboard under Settings → API — each token is shown once at creation, so store it securely. If you don’t have a Pro plan yet, get in touch about API access. This guide uses a sandbox token against
https://rest.staging.nickel.com, so you can experiment freely.Set up your key
Every request carries your API token in the
Authorization header. Export your sandbox token once so you can copy-paste the commands below as-is:Make your first request
List your customers with On a fresh account the list is empty:If you get a
GET /customers. This is a read-only request, so it’s a safe way to confirm your key works:401 instead — {"error": "Missing or invalid authorization header"} — check that the header reads exactly Authorization: Bearer nkl_....Create a customer
A customer is who you’re billing. Create one with Hold on to the
POST /customer — all it needs is a name and at least one email address:id — the next step uses it. The other fields echo your organization’s payment settings, not anything you sent: feePassthroughPercent is the share of the card processing fee your customers cover, and this sandbox organization is configured to pass 50% through (a new organization starts at 100). You can override these per customer later with PUT /customer/{customerId}.Create the invoice
Create the invoice with The invoice starts out
POST /paymentLink, giving it a name (your invoice number works well), the customer’s id, an amount, and a due date:ACTIVE with no payments against it. As your customer pays, completedAmountCents climbs and the status moves to COMPLETED.See what your customer sees
Open the
url from the response in your browser. That’s the hosted checkout page where your customer views the invoice and pays by card or bank transfer — no code required on your side. The subdomain is yours: you choose it when you set up your Nickel account, and this sandbox organization chose nickel. Production checkout pages live at <your-subdomain>.nickelpayments.com; sandbox ones at <your-subdomain>.staging.nickelpayments.com.From here you’d typically email the invoice to your customer with POST /paymentLink/{paymentLinkId}/send and get notified of the payment by webhook.The interactive playground on the API Reference pages runs against the sandbox environment too — use your sandbox key there.
Where to go next
Send an invoice and get paid
The full workflow: create, send, get paid, get notified.
How payments work
Card vs. ACH, payment statuses, and what happens after your customer pays.
Webhook events
Get notified when a payment lands instead of polling.
Pay a vendor bill
The other direction: paying your vendors through the API.
