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
id
stringRequiredThe payment's ID
created_at
DateRequiredThe date with timezone at which the resource was created.
updated_at
DateRequiredThe date with timezone at which the resource was updated.
swap_id
stringRequiredThe ID of the swap that this payment was potentially created for.
The details of the swap that this payment was potentially created for.
cart_id
stringRequiredThe ID of the cart that the payment session was potentially created for.
The details of the cart that the payment session was potentially created for.
order_id
stringRequiredThe ID of the order that the payment session was potentially created for.
The details of the order that the payment session was potentially created for.
amount
numberRequiredThe amount that the Payment has been authorized for.
currency_code
stringRequiredThe 3 character ISO currency code of the payment.
The details of the currency of the payment.
amount_refunded
numberRequiredThe amount of the original Payment amount that has been refunded back to the Customer.
Default: 0
provider_id
stringRequiredThe id of the Payment Provider that is responsible for the Payment
data
Record<string, unknown>RequiredThe 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.
captured_at
string | DateRequiredThe date with timezone at which the Payment was captured.
canceled_at
string | DateRequiredThe date with timezone at which the Payment was canceled.
metadata
Record<string, unknown>RequiredAn optional key-value map with additional details
idempotency_key
stringRequiredRandomly generated key used to continue the completion of a payment in case of failure.
Was this section helpful?