https://api.staging.streamlinedpayments.com/api/v1) with your X-App-Id and X-Api-Key headers. Amounts are in cents.
The rules
These hold for payments you record and for payments you apply:
Record transaction and Apply payment to invoices can’t apply more than the invoices owe. For a deposit larger than the invoice, use Apply deposit to invoice, which keeps the rest as credit. For any other overpayment, record or apply it in the Streamlined app.
Record a payment received elsewhere
Record transaction withtype: payment records the payment and applies it to the invoices you list, in one request. payment_source is how it was paid: ach_credit (a bank transfer), check, cash, or card (a card taken outside Streamlined). invoices is required: a payment without it is refused with invalid_invoices, and nothing is recorded. It’s dated now.
201 with the payment:
invoice is the one invoice the payment is recorded on, the one with the smallest amount. allocations is where all of it went, that invoice first. invoice.invoice_token is the token in that invoice’s payment link, not its uuid, so it doesn’t match an invoice_uuid. To find the invoice in allocations, take the first entry.
If the amounts break a rule, nothing is recorded: fix the request and send it again with the same Idempotency-Key.
The customer isn’t emailed. Send notify_customer: true to email them that their balance changed.
Apply a payment to invoices
A payment that came in through Streamlined without naming its invoices, such as a bank transfer, shows in List transactions with a nullinvoice, and Get transaction details gives its unapplied_amount. Apply payment to invoices puts it on them:
200 with the payment, in the same shape as above, with allocations filled in and unapplied_amount of 0. Applying again gets already_applied, so a retry can’t apply it twice.
For a deposit, Apply deposit to invoice is simpler: it takes the deposit link’s uuid, and can queue a deposit that’s still processing. See Deposits.
Add a credit or debit note
A credit note lowers what an invoice owes, for a discount, a return, or damaged goods. A debit note raises it, for a late fee or a missed charge. Each is on one invoice, for that invoice’s customer.Retries
Send anIdempotency-Key with every Record transaction, such as your own payment’s ID. Keys are kept for 24 hours.
Apply payment to invoices needs no key: applying a payment that’s already applied is refused with
already_applied.
Audit log
Each payment, credit note, or debit note you record, and each payment you apply, shows in your account’s audit log under your primary contact, marked “via API”. A retry that returns the first transaction adds no row. A payment recorded with a409 and payment_not_applied adds no row either, and neither do its retries. See Authentication.
Error codes
Every error has anerror sentence to show people and a code to branch on.