Skip to main content
POST
Apply payment to invoices

Authorizations

X-App-Id
string
header
required

App ID for authentication

X-Api-Key
string
header
required

API Key for authentication

Path Parameters

id
string<uuid>
required

The UUID of the payment

Body

application/json
invoices
object[]
required

The invoices and how much of the payment goes on each, in cents. Together they have to come to the whole payment, and none can be more than its invoice owes.

Required array length: 1 - 50 elements

Response

Applied. Returns the payment, with allocations for each invoice and unapplied_amount of 0.

Returned by GET /transactions/:id, Record transaction, and Apply payment to invoices. Note: this returns the transaction object directly, not wrapped in a transaction key. This differs from /orders, /invoices, /customers etc, which wrap their resource. Kept this way for v1 backwards compatibility.

uuid
string<uuid>
created_at
string<date-time>
currency
enum<string>

ISO currency code. Most resources support these. Products are limited to USD, CAD, EUR, GBP, AUD.

Available options:
USD,
CAD,
GBP,
EUR,
AUD,
JPY,
INR
amount
integer

The amount, in cents. For a payment applied to invoices in another currency, this is what it paid in the invoices' currency, and received holds what arrived.

fee
integer | null

The processing fee, in cents. Null when there's none, as for a payment you recorded.

payment_source
string
memo
string | null
payout_date
string<date> | null

Null if the transaction has not been paid out yet.

net_amount
integer
self_recorded
boolean
display_type
string
txn_files
object[]
invoice
object | null

The invoice the transaction is recorded on, the first of allocations. Null if it isn't on an invoice, such as a payment that hasn't been applied.

recipient
object
received
object | null

What arrived, when a payment was applied to invoices in another currency in the Streamlined app. The transaction's amount, currency, and fee are then what it paid in the invoices' currency, and payouts use the received figures. Null for every other transaction.

Example:
conversion
object | null

The rate a payment was applied at, when it was applied to invoices in another currency. Null for every other transaction.

allocations
object[]

Where the transaction's money went, one entry per invoice, the invoice it's recorded on first. Empty while a payment is unapplied. A payment bigger than its invoice shows the whole amount on that invoice; the rest is credit there.

unapplied_amount
integer

How much of the transaction isn't on an invoice yet, in cents. The whole amount while a payment is unapplied, else 0.