createdAt
, and updatedAt
timestamps. Adjustments, fees, and fulfillment can be copied to split items based on configuration. The default setting is NONE
, meaning these elements aren’t copied to split items unless specified.
The following code sample provides an example for split line items request payload:
Click to expand the JSON example.
quantities
array allows users to specify the number and quantity of split items. The total number of split items is quantities.size + 1
.6
units and quantities
set to [2, 1]
splits into 3
items with quantities [2, 1, 3]
, where the last quantity represents the remainder. With adjustmentsBehaviour
, feesBehaviour
, and fulfillmentBehaviour
set to COPY
, adjustments, fees, and fulfillment details from the original item are copied to each split item.
The quantities array lets users specify the number and quantity of split items. The total number of split items will be quantities.size
plus 1.
For example, if a line item has 6 units and quantities is [2, 1]
, it will be split into 3 items with quantities [2, 1, 3]
, where the last quantity is the remainder.
The following code sample provides an example for split line items request payload with the quantities
:
Click to expand the JSON example.
Click to expand the curl example.
Click to expand the curl example.
Click to expand the curl example.