Skip to main content

Checkout Totals

POST 

/checkout

Generates information for the checkout page including taxes, totals, and shipping price. This endpoint will return up-to-date price. If the price changed, the user should be notified. The returned inventory is always equal to the requested quantity, and it is not reserved. Inventory check will be done at the time of order placement only.

Request

Body

required
    shipping_address object
    first_name stringrequired

    Customer first name.

    last_name stringrequired

    Customer last name.

    address1 stringrequired

    The street address of the shipping address.

    address2 stringnullable

    An optional additional field for the street address of the shipping address.

    city stringrequired

    The city, town, or village of the shipping address.

    country stringrequired

    The two-letter code (ISO 3166-1 format) for the country of the shipping address.

    name string

    Full name.

    province stringnullable

    The two-letter abbreviation of the region of the shipping address.

    phone string

    The phone number at the shipping address.

    zip stringrequired

    The postal code (zip, postcode, Eircode, …) of the shipping address.

    products object[]required

    Possible values: >= 1

  • Array [
  • public_id stringrequired

    ID of the product

    variant_id stringrequired

    ID of the product variant.

    quantity floatrequired

    Possible values: >= 1

    Quantity of the product variant in the cart

  • ]
  • payment object
    paymentMethod stringrequired

    Possible values: [stripe]

    requestPaymentIntent booleanrequired

    Request a payment intent

    target_currency string

    Possible values: [CAD, USD, GBP, AUD, EUR]

    The currency to return values in.

Responses

Success

Schema
    data object
    subtotal floatrequired

    The price of all products in the cart, in target currency (ex. USD).

    tax floatrequired

    The amount of taxes to be paid, in target currency (ex. USD).

    shipping object[]required
  • Array [
  • amount floatrequired

    The amount of shipping services to be paid, in dollars.

    label stringrequired

    Label to show to the user to indicate the shipping type.

    code stringrequired

    Code that indicates the shipping type.

    merchant_name string

    Merchant name.

    products object[]required

    Products in this shipment.

  • Array [
  • public_id stringrequired

    ID of the product

    variant_id stringrequired

    ID of the product variant.

    quantity floatrequired

    Possible values: >= 1

    Quantity of the product variant.

  • ]
  • ]
  • total floatrequired

    The total amount for the order, in target currency (ex. USD).

    duties float

    The total amount of duties for the order, in target currency (ex. USD).

    line_items object[]required
  • Array [
  • public_id stringrequired

    Public ID of the product.

    variant_id stringrequired

    The ID of the product variant.

    inventory floatrequired

    Available inventory for the order. If the inventory is 0, the product is out of stock.

    price floatrequired

    Product price, in dollars.

    quantity floatrequired

    Purchase quantity requested from the endpoint

    name stringrequired

    Product name

  • ]
  • currency stringrequired

    Possible values: [CAD, USD, GBP, AUD, EUR]

    Currency that values are returned in.

    payment object
    clientSecret string
    shipping_total floatrequired

    Total amount of shipping costs, in target currency (ex. USD).

Loading...