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

additional_itemsLineItem[]Required
The details of the new products to send to the customer, represented as line items.
allow_backorderbooleanRequired
If true, swaps can be completed with items out of stock

Default: false

canceled_atDateRequired
The date with timezone at which the Swap was canceled.
cartCartRequired
The details of the cart that the customer uses to complete the swap.
cart_idstringRequired
The ID 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.
created_atDateRequired
The date with timezone at which the resource was created.
deleted_atnull | DateRequired
The date with timezone at which the resource was deleted.
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.
fulfillment_statusSwapFulfillmentStatusRequired
The status of the Fulfillment of the Swap.
fulfillmentsFulfillment[]Required
The details of the fulfillments that are used to send the new items to the customer.
idstringRequired
The swap's ID
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
no_notificationbooleanRequired
If set to true, no notification will be sent related to this swap
orderOrderRequired
The details of the order that the swap belongs to.
order_idstringRequired
The ID of the order that the swap belongs to.
paymentPaymentRequired
The details of the additional payment authorized by the customer when difference\_due is positive.
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.
return_orderReturnRequired
The details of the return that belongs to the swap, which holds the details on the items being returned.
shipping_addressAddressRequired
The details of the shipping address that the new items should be sent to.
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_methodsShippingMethod[]Required
The details of the shipping methods used to fulfill the additional items purchased.
updated_atDateRequired
The date with timezone at which the resource was updated.
Was this section helpful?