To authorize an upsell at checkout and capture it later — for example, 24 hours after the sale — send the upsell as its own Add Order call instead of bundling it into the main order. A capture settles the whole authorization of an order, so an upsell that rides inside the main order cannot be captured on its own.
Step 1: Authorize the Upsell
Call the Add Order endpoint with the main order's ID and "TransactionType": "auth":
$ curl -X POST 'https://openapi.admoji.com/api/v2/open/orders' \
-H "Authorization: ApiKey secret_492796e421a34666a5695d53cd311111" \
-H "Content-Type: application/json" \
-d '{
"OrderID": 1234567,
"TransactionType": "auth",
"Products": [{ "ProductID": 55123 }]
}'OrderIDis the ID returned for the main order. It links the upsell to that order.No payment information is needed. Admoji charges the payment method saved at checkout.
TransactionTypeset toauthruns an authorization only. What you send in the API takes priority over the Transaction Mode of the product and the processor.Keep the order ID of the upsell from the response — you need it to capture.
Step 2: Capture the Upsell
Choose one of these:
Capture it yourself — call
POST https://openapi.admoji.com/api/v2/open/capture/{orderId}with the upsell's order ID when you are ready. A successful capture returns"Status": 0.
$ curl -X POST 'https://openapi.admoji.com/api/v2/open/capture/1234568' \
-H "Authorization: ApiKey secret_492796e421a34666a5695d53cd311111"Let Admoji capture it — open the upsell product, go to the Auth / Capture tab, set Transaction Mode to Auth + Capture and Capture Delay (Days) to 1. The capture job runs every 6 hours, so the charge settles about a day after the authorization.
Related articles