Create a payment


Errors

In addition to the Errors applicable to all API endpoints, the following errors are specific to creating a payment:

status code error code description
404 order.not-found No order was found meeting the requirements. Make sure to use the right orderId and API key. test objects can only be accessed using test keys and live object with live keys.
409 order.cannot-capture No payment can be created. The error message will include the reason. Common reasons include: the order was already captured or the order expired.
409 payment.excessive-amount The payment exceeds the order's amount available for capture
Body Params

Create Payment

number
required
≥ 0

The amount to be captured.

string
enum

Whether to cancel remaining amount in case of a partial capture. Defaults to automatic, which means only a single capture is allowed and any remaining, uncaptured amount is cancelled. Set to manual if you would like to create multiple partial captures.

Allowed:
string
required

Three-letter ISO currency code, in uppercase. Must be a supported currency.

string
length between 1 and 80

An arbitrary - ideally descriptive - long form explanation of the Payment, meant to be displayed to the customer.

lineItems
array of objects

A list of the IDs of the Line Items of the original order this Payment captures.

lineItems
metadata
object

Set of up to 20 key-value pairs that you can attach to the object.

string
required

The unique identifier for the Payment object.

string
length between 1 and 40

A - ideally unique - string to reference the Payment (e.g. a customer ID, a cart ID, etc.) which can be used to reconcile the Payment with your internal systems.

Responses

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json