In the API, an invoice is a payment link — the endpoints and field names below say
paymentLink. Same thing; this guide says “invoice” because that’s what your customer sees.Before you start: You need a customer (see the Quickstart) and a webhook subscription to hear when authorizations are granted. Amounts are in cents throughout.
Ask the customer to authorize you
Request authorization with The authorization starts
POST /customer/{customerId}/requestChargeAuthorization. With sendEmail: true, Nickel emails the customer a secure form where they enter their card or bank details; with false, you get the form’s url back to deliver however you like:active: false with no payment method — it activates when your customer completes the form. transactionLimitCents caps any single charge, and expirationDate (YYYY-MM-DD) sets an end date.Watch the field names: you send
transactionLimitCents, but responses return transactionLimitInCents — and expiresAt comes back as epoch milliseconds.Already have a signed ACH form? Skip the wait
If the customer already signed an ACH debit authorization (a common part of net-terms paperwork), create the authorization directly — upload the signed PDF via No waiting — the authorization is
POST /file with type=ACH_DEBIT_AUTHORIZATION_PDF, then attach it with their bank details:active: true immediately, because the customer already consented on paper. Keep the signed PDF honest: it’s your proof of authorization for ACH rules.Wait for the green light
When the customer completes the hosted form (or you upload a signed PDF), your webhook receives Confirm with
charge_authorization.authorized — here’s a real delivery:GET /chargeAuthorization/{chargeAuthorizationId} — you’re looking for active: true and a populated paymentMethod.Charge invoices
Create invoices as usual (Per invoice you can add
POST /paymentLink), then pay them with POST /chargeAuthorization/pay. The request is a batch — one entry per authorization, each charging one or more invoices via the paymentLinks array:amountCents (omit it to charge the invoice’s remaining balance) and withdrawalDate (YYYY-MM-DD, today or later) to schedule the charge instead of processing immediately.Notice the response above: the ACH charge was created (paymentId is set) but the invoice still shows status: "ACTIVE" and completedAmountCents: 0 — bank debits take days to settle. Card charges settle synchronously and complete the invoice right away.Handle the aftermath
The batch partially succeeds: invoices that couldn’t be charged (authorization expired, over the transaction limit, already paid) come back in
errors[] with a paymentLinkId and a human-readable error, while the rest go through. Check it on every call.From here it’s the standard payment lifecycle — payment.made fires (for ACH that means initiated; the payment is PENDING until funds arrive), and you track it exactly as in Send an Invoice and Get Paid.One more event matters to autopay: charge_authorization.deleted fires if the customer (or you) revokes the authorization. Stop charging when you receive it — a quick GET to confirm active before each batch is cheap insurance.Where to go next
Receive webhooks
The receiver that hears charge_authorization.authorized.
Refund or void a payment
When an autopay charge shouldn’t have happened.
