Skip to main content
Fulfillment is how the order reaches the shopper: an address and a method. Both are set with update_checkout on an open checkout, after create_checkout.
Send the address, the method, or both. The call can also carry payment.use_vaulted_card. It returns the checkout with new totals, a new review_hash, and fulfillment.methods.

Address

AgentMall does not store addresses. Send the address on each thread that needs one.

Method

A method is { id, kind, label }. kind is shipping, delivery or pickup. Copy the whole object from fulfillment.methods in the latest checkout response. Do not build an id yourself.
The list can change after the address changes, so read it again from the update_checkout response. A method id that is not on the page returns delivery_method_not_found: pick one from the latest fulfillment.methods. Delivery time slots are not listed and cannot be chosen.

Delivery date

fulfillment.delivery_date is the date the checkout shows for the chosen method:
latest is null for a single day. The whole field is null when the page shows no readable date. It is for showing the shopper. It is not part of review_hash.

Estimates before the card

To show shipping and tax before asking for a card, call update_checkout with only fulfillment.address, and optionally fulfillment.method. The returned totals have subtotal, tax and total. status stays incomplete until a card is set.

Fulfillment and the review

The address summary and the method’s id and label are part of review_hash. Changing either after the shopper approved the total gives a new hash. Read the checkout again and show it before complete_checkout. See Review and Safety.