Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Elastic Path Checkout API

The checkout workflow ties together many of the key concepts covered in this section. When a customer initiates the checkout process, an order is created from the cart. The order is incomplete until after a successful payment is made. A complete order can be shipped and the product deducted from inventory counts.![Checkout workflow](/assets/checkout-flow.png)### Summary of the checkout workflow1. Add a product to a cart. A cart and its reference number is generated.2. Manage the cart items. For example, you might add items, remove items, and change quantities.3. Check out the cart. An incomplete order is created.4. Pay for an order: provide billing and shipping details, if you are a new customer. The order is now in the processing status.5. If using a manual gateway, after you authorize and capture it, Composable Commerce considers the order complete. If you use a third-party integration supported by Composable Commerce (such as Stripe), after the third-party gateway authorizes and captures the payment, the order becomes complete. Usually capture does not occur at the same time as authorization. For more information, see the Capture section.6. After the order is shipped, you can manually flag it as fulfilled.### CartsWhen a product is added to a cart, a cart is generated together with its unique reference ID that on checkout becomes a part of the order ID. If you are using our JavaScript software development kit, generating a cart reference ID is done for you; otherwise, add a cart reference generator to your functionality.### Promotions and custom itemsOptionally, apply a promotion code on a cart, or add custom_items to modify the product price (typically to handle taxes, customs, or shipping).### CheckoutYou can checkout a cart with an associated customer name and email (customer object). Typically, this would be used for new customers or ones that prefer to shop as guests. Use the `customer.id` checkout option to checkout for an existing customer. After a successful checkout is completed, the response contains an order.Email addresses that either begin or end with a period, or contain consecutive periods, are considered invalid, resulting in the following error:```json"errors": [ { "status": 400, "source": "data.customer.email", "title": "format", "detail": "Does not match format 'email'" }] ```### PaymentsOn checkout, an incomplete order is created. You can then use a third-party integration to handle your payment gateway. If the payment gateway is supported by Composable Commerce, such as Stripe, the payment is processed externally but handled internally. When a successful validation is returned, Composable Commerce flags the order as complete.If you are using a payment method not officially supported by Composable Commerce, the gateway needs to be implemented and handled manually. After the payment has been authorized and captured either through Commerce Manager or API, the status of an order becomes complete.### ShippingThe status of an order and the status of shipping are handled separately, and so an order can be complete but not shipped. Orders that have not been shipped yet have a status of unfulfilled. This flag is generated automatically by Composable Commerce when an order is created. Currently, you can only update the shipping status manually, through the API. After the order is shipped, flag its shipping status as fulfilled.### InventoryIf enabled, you can manage your stock. As such, your stock is automatically updated as soon as a product is checked out.

Elastic Path Checkout API is one of 100 APIs that Elastic Path publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Checkout. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 1 operation across 1 path, and defines 30 schemas. It is described by OpenAPI 3.1.0, at version 25.1126.6886238.

Requests are made against 2 base URLs: https://useast.api.elasticpath.com, https://euwest.api.elasticpath.com.

1 operations 1 paths 30 schemas 1 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
25.1126.6886238
Base URL
https://useast.api.elasticpath.com
Authentication
HTTP Bearer
License
Resource Areas
1

Authentication & Security 1

Elastic Path Checkout API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (BearerToken). By default, every request must be authenticated.

Paths & Operations 1

Across 1 path, the API surfaces 1 operation — 1 POST. Each is listed below with its method, path, parameters, and response codes.

Checkout 1

The checkout workflow ties together many of the key concepts covered in this section. When a customer initiates the checkout process, an order is created from the cart. The order…

POST
/v2/carts/{cartID}/checkout
Checkout API
checkoutAPI 2 params body → 201400500

Schemas 30

The contract defines 30 schemas that model the data the API accepts and returns. The most detailed are OrderItemResponse (23 properties), OrderResponse (17 properties), AddressCommon (10 properties), CondensedPromotionResponse (9 properties). Each schema is shown below with its type and property counts.

CustomDiscountResponse
object
8 properties
OrderTimestamps
object
3 properties
OrderItemResponse
object
23 properties
DiscountFormattedPriceData
object
3 properties
Timestamps
object
2 properties
Response.ErrorItem
object
5 properties 2 required
FormattedPriceData
object
3 properties
CondensedPromotionResponse
object
9 properties
ShippingAddress
Shipping address information. You must specify at least one of region (state/province) or county.
RelationshipItem
object
Relationship data entry
2 properties 2 required
TaxItemResponse
object
7 properties
AddressWithRegion
DiscountData
object
6 properties
BillingAddress
Billing address information. You must specify at least one of region (state/province) or county.
Customer
object
3 properties
AddressWithCounty
SingleRelationship
object
Single relationship
1 property
NonNegativeFormattedPriceData
object
3 properties
OrderResponse
object
17 properties
OrderMeta
object
3 properties
Response.ErrorResponse
object
1 property 1 required
CustomerCheckout
object
1 property
Contact
object
2 properties
AccountCheckout
object
1 property
OrderItemFormattedUnitPriceData
object
2 properties
CustomAttributes
object
Specifies custom attributes for cart or order objects. Each attribute includes a top-level key, as well as corresponding type and value entries. Attribute valu…
OrderEntityResponse
object
3 properties
OrderPriceData
object
3 properties
AddressCommon
object
10 properties 5 required
RelationshipArray
object
Array of relationships
1 property

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

elastic-path-checkout-api-openapi.yml Raw ↑

Other APIs Elastic Path publishes across the network.

Elastic Path GraphQL API
Elastic Path Account Addresses API
Elastic Path Account Authentication Settings API
Elastic Path Account Cart Associations API
Elastic Path Account Management Authentication API
Elastic Path Account Members API
Elastic Path Account Membership API
Elastic Path Account Membership Settings API
Elastic Path Account Tags API
Elastic Path Accounts API
Elastic Path Administrator Latest Releases Catalog API API
Elastic Path Application Keys API