Skip to main content
Skip to main content

Swap

A swap can be created when a Customer wishes to exchange Products that they have purchased with different Products. It consists of a Return of previously purchased Products and a Fulfillment of new Products. It also includes information on any additional payment or refund required based on the difference between the exchanged products.

Properties

idstringRequired
The swap's ID
created_atDateRequired
The date with timezone at which the resource was created.
updated_atDateRequired
The date with timezone at which the resource was updated.
deleted_atnull | DateRequired
The date with timezone at which the resource was deleted.
fulfillment_statusSwapFulfillmentStatusRequired
The status of the Fulfillment of the Swap.
payment_statusSwapPaymentStatusRequired
The status of the Payment of the Swap. The payment may either refer to the refund of an amount or the authorization of a new amount.
order_idstringRequired
The ID of the order that the swap belongs to.
orderOrderRequired
The details of the order that the swap belongs to.
additional_itemsLineItem[]Required
The details of the new products to send to the customer, represented as line items.
return_orderReturnRequired
The details of the return that belongs to the swap, which holds the details on the items being returned.
fulfillmentsFulfillment[]Required
The details of the fulfillments that are used to send the new items to the customer.
paymentPaymentRequired
The details of the additional payment authorized by the customer when difference\_due is positive.
difference_duenumberRequired
The difference amount between the order’s original total and the new total imposed by the swap. If its value is negative, a refund must be issues to the customer. If it's positive, additional payment must be authorized by the customer. Otherwise, no payment processing is required.
shipping_address_idstringRequired
The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order.
shipping_addressAddressRequired
The details of the shipping address that the new items should be sent to.
shipping_methodsShippingMethod[]Required
The details of the shipping methods used to fulfill the additional items purchased.
cart_idstringRequired
The ID of the cart that the customer uses to complete the swap.
cartCartRequired
The details of the cart that the customer uses to complete the swap.
confirmed_atDateRequired
The date with timezone at which the Swap was confirmed by the Customer.
canceled_atDateRequired
The date with timezone at which the Swap was canceled.
no_notificationbooleanRequired
If set to true, no notification will be sent related to this swap
allow_backorderbooleanRequired
If true, swaps can be completed with items out of stock

Default: false

idempotency_keystringRequired
Randomly generated key used to continue the completion of the swap in case of failure.
metadataRecord<string, unknown>Required
An optional key-value map with additional details
Was this section helpful?