Update an order where existing items are reversed and new items are added.Documentation Index
Fetch the complete documentation index at: https://docs.dintero.com/llms.txt
Use this file to discover all available pages before exploring further.
Create the original order
Create a draft order with line items.POST /accounts/{aid}/shopping/draft_ordersExample request body:Then complete it to make it active.PUT /accounts/{aid}/shopping/draft_orders/{id}/complete
Authorize and capture the original order
Record the authorization and capture on the order to mark funds as reserved and collected.POST /accounts/{aid}/shopping/orders/{order_id}/authorizationsPOST /accounts/{aid}/shopping/orders/{order_id}/captures
Reverse the existing item and add a new one
Create a new draft linked to the original Then complete the draft to apply the update to the order.PUT /accounts/{aid}/shopping/draft_orders/{id}/complete
order_id. Include a reversal of the existing item (negative amounts) and a new replacement item. Use related_item to link the item being reversed.POST /accounts/{aid}/shopping/draft_ordersAuthorize and capture the reversed and new items
Record the authorization and capture for both the reversed item (negative) and the new item.POST /accounts/{aid}/shopping/orders/{order_id}/authorizationsPOST /accounts/{aid}/shopping/orders/{order_id}/capturesReversed item:New item:
Refund remaining amount (if applicable)
If the original authorization is higher than the new items, include a refund line item in the draft update. Then authorize, capture, and refund that line.POST /accounts/{aid}/shopping/orders/{order_id}/authorizationsPOST /accounts/{aid}/shopping/orders/{order_id}/capturesAuthorize and capture the new item with the refund line:POST /accounts/{aid}/shopping/orders/{order_id}/refundsRefund the remaining amount:
Additional captures for partial authorization (if applicable)
If the original authorization is lower than the new item amount, add additional authorization and capture calls for the new item.POST /accounts/{aid}/shopping/orders/{order_id}/authorizationsPOST /accounts/{aid}/shopping/orders/{order_id}/captures