Skip to content

Checkout Workflow (Shop)

Turn a ready cart into an order: set addresses, choose a shipping method, choose a payment method, place the order. A logged-in customer's saved addresses (and past orders) are surfaced so they can reuse them.

Agent-ask inputs

  • Storefront key — ask the user; send it on every Shop request. Never invent it.
  • Server URL — ask the user for their Bagisto server's base URL (e.g. https://store.example.com) and prefix every endpoint path with it. Never assume localhost or a demo domain.

Prerequisites

  • A cart with at least one item (Cart workflow).
  • A valid storefront key.

Dependency diagram

Ordered call table

#StepEndpointDepends onNote
1Read saved addressesGET addresseslogged-in customerCustomer path; prefill from saved. Past orders: customer orders
2Set billing addressPOST set-billing-address · GraphQLcart with itemsGuest sends a full address; customer may reuse a saved one
3Set shipping addressPOST set-shipping-addressbilling set
4List shipping methodsGET shipping-methodsshipping address set
5Set shipping methodPOST set-shipping-methoda chosen shipping method
6List payment methodsGET payment-methodsshipping method set
7Set payment methodPOST set-payment-methoda chosen payment method
8Place orderPOST place-order · GraphQLpayment method setReturns the created order

End-to-end example

Customer: get-addresses → set-billing → set-shipping → get-shipping-methods → set-shipping-method → get-payment-methods → set-payment-method → place-order. Guest: same, minus get-addresses (send a full billing/shipping address). Follow each linked page for the exact request/response body (REST and GraphQL).

Customize

To change checkout behavior on the server, see Customization → Shop.

Released under the MIT License.