Skip to main content
Skip to main content

Payment

A payment is originally created from a payment session. Once a payment session is authorized, the payment is created to represent the authorized amount with a given payment method. Payments can be captured, canceled or refunded. Payments can be made towards orders, swaps, order edits, or other resources.

Properties

amountnumberRequired
The amount that the Payment has been authorized for.
amount_refundednumberRequired
The amount of the original Payment amount that has been refunded back to the Customer.

Default: 0

canceled_atstring | DateRequired
The date with timezone at which the Payment was canceled.
captured_atstring | DateRequired
The date with timezone at which the Payment was captured.
cartCartRequired
The details of the cart that the payment session was potentially created for.
cart_idstringRequired
The ID of the cart that the payment session was potentially created for.
created_atDateRequired
The date with timezone at which the resource was created.
currencyCurrencyRequired
The details of the currency of the payment.
currency_codestringRequired
The 3 character ISO currency code of the payment.
dataRecord<string, unknown>Required
The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.
idstringRequired
The payment's ID
idempotency_keystringRequired
Randomly generated key used to continue the completion of a payment in case of failure.
metadataRecord<string, unknown>Required
An optional key-value map with additional details
orderOrderRequired
The details of the order that the payment session was potentially created for.
order_idstringRequired
The ID of the order that the payment session was potentially created for.
provider_idstringRequired
The id of the Payment Provider that is responsible for the Payment
swapSwapRequired
The details of the swap that this payment was potentially created for.
swap_idstringRequired
The ID of the swap that this payment was potentially created for.
updated_atDateRequired
The date with timezone at which the resource was updated.
Was this section helpful?