Create a payment

Records a payment received from a customer, e.g. a bank transfer or check collected outside Paid. Allocate it to invoice lines with the payment allocations endpoints.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Request

Body
amountintegerRequired

Payment amount in cents (minor currency units).

currencystringRequired=3 characters

Three-letter ISO currency code.

paymentTypeenumRequired
How the payment was made.
customerIdstringOptional>=1 character
Paid customer ID the payment belongs to.
externalCustomerIdstringOptional>=1 character
Your external customer ID the payment belongs to.
paymentDatedatetimeOptional

When the payment was made (ISO 8601). Defaults to the current time.

statusenumOptionalDefaults to posted
Initial status. Use draft to keep the payment editable, posted to record it as received. Defaults to posted.
metadatamap from strings to anyOptional

Key-value metadata stored on the payment.

Response

201
idstring
Unique payment identifier.
numberinteger

Sequential payment number within your organization (shown as “PAY-0001”).

customerIdstring
The customer this payment belongs to.
invoiceIdstring or null
The invoice this payment was collected for, when created by an automatic charge. Null for manually recorded payments.
orderIdstring or null
The order this payment relates to, when known.
amountinteger

Payment amount in cents (minor currency units).

allocatedAmountinteger
Portion of the amount already allocated to invoice lines, in cents.
balanceinteger
Unallocated remainder of the payment, in cents.
currencystring

Three-letter ISO currency code.

paymentDatedatetime
When the payment was made.
paymentTypestring
How the payment was made, e.g. creditCard, bankTransfer, ach, cash, or check.
statusstring

Payment status: draft, posted, processing, requiresAction, failed, or canceled.

metadatamap from strings to any or null

Key-value metadata stored on the payment.

createdAtdatetime
updatedAtdatetime

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error