> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sezzle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

The Sezzle Express checkout button is a powerful tool for custom platform merchants. Integrated directly into the cart page, the button allows shoppers to select Sezzle as their payment method with a single click, leveraging their Sezzle account for a seamless payment experience. This feature is designed to reduce cart abandonment, increase conversion rate, and enhance customer satisfaction.

## Installation

### Include SDK code

Include the following script in the `<head>` section of the page.

```html theme={"system"}
<script
    type="text/javascript"
    src="https://checkout-sdk.sezzle.com/express_checkout.min.js"
></script>
```

### Checkout Configuration

#### Configuration Options

<Tabs>
  <Tab title="Template">
    ```javascript theme={"system"}
    const checkoutSdk = new Checkout({
      mode: string,
      publicKey: string,
      apiMode: string,
      apiVersion: string,
    });
    ```
  </Tab>

  <Tab title="Example">
    ```javascript theme={"system"}
    const checkoutSdk = new Checkout({
      mode: "popup",
      publicKey: "sz_pub_...",
      apiMode: "live",
      apiVersion: "v2",
    });
    ```
  </Tab>

  <Tab title="Options">
    <ParamField path="mode" default="popup" type="string">
      Available options: `popup`, `iframe`, `redirect`

      <Warning>
        If you use `iframe` mode, add `*.sezzle.com` to your site's Content Security Policy (CSP) allowlist so the Sezzle checkout iframe can load.
      </Warning>

      <Note>
        **popup** mode will work out-of-the-box, and Sezzle recommends it for most browser-based SDK integrations.
        If your checkout runs inside a webview or embedded browser where popups may be blocked, use **iframe** mode instead. **iframe** mode will not work properly without first contacting Sezzle. For security reasons, Sezzle must enable **iframe** for your domain(s). To have it enabled, please submit a request with your Sezzle Merchant UUID and a list of domains to be allowed per environment (production and sandbox). For example, [*please enable uat1.mysite.com, uat2.mysite.com in sandbox and www.mysite.com, mysite.com in production*](http://www.mysite.com).
        **redirect** mode is also supported, but it is generally less useful with the SDK because the SDK's main value is handling the in-context checkout experience and window messaging between your site and Sezzle.
      </Note>
    </ParamField>

    <ParamField path="publicKey" type="string" required>
      Used when creating a checkout or capturing payment. Find your API keys at [https://dashboard.sezzle.com/merchant/settings/apikeys](https://dashboard.sezzle.com/merchant/settings/apikeys)
    </ParamField>

    <ParamField path="apiMode" default="live" type="string">
      Environment in which the checkout is to be completed

      Available options: `live`, `sandbox`
    </ParamField>

    <ParamField path="apiVersion" default="v2" type="string">
      Sezzle Checkout SDK Version

      Available options: `v2`
    </ParamField>
  </Tab>
</Tabs>

### Sezzle Button

#### Sezzle Button Configuration

Create a placeholder element for the Sezzle Button to be rendered on the page(s).

<Tabs>
  <Tab title="Template">
    ```html theme={"system"}
    <div
        id="sezzle-smart-button-container"
        style="text-align: center"
    ></div>
    ```
  </Tab>

  <Tab title="Example">
    ```html theme={"system"}
    <div
        id="sezzle-smart-button-container"
        style="text-align: center"
        templateText="Pay with %%logo%%"
        borderType="semi-rounded"
        customClass="action,primary,checkout"
    ></div>
    ```
  </Tab>

  <Tab title="Options">
    <ParamField path="templateText" default="Checkout with %%logo%%" type="string">
      Text to appear inside the button. Use `%%logo%%` inside the text to
      display the Sezzle image
    </ParamField>

    <ParamField path="borderType" type="string">
      Available options: `square`, `semi-rounded`
    </ParamField>

    <ParamField path="customClass" type="string">
      Custom classes to be applied
    </ParamField>

    <ParamField path="paddingTop" default="1px" type="string">
      Negative space between top of content and edge of button
    </ParamField>

    <ParamField path="paddingBottom" default="7px" type="string">
      Negative space between bottom of content and edge of button
    </ParamField>

    <ParamField path="paddingLeft" default="30px" type="string">
      Negative space between left side of content and edge of button
    </ParamField>

    <ParamField path="paddingRight" default="30px" type="string">
      Negative space between right side of content and edge of button
    </ParamField>

    <ParamField path="sezzleImageWidth" default="84px" type="string">
      Width of the Sezzle logo within the button
    </ParamField>

    <ParamField path="sezzleImagePositionTop" type="string">
      Position of the Sezzle logo from top.
    </ParamField>

    <ParamField path="sezzleImagePositionBottom" type="string">
      Position of the Sezzle logo from bottom.
    </ParamField>

    <ParamField path="sezzleImagePositionLeft" type="string">
      Position of the Sezzle logo from left.
    </ParamField>

    <ParamField path="sezzleImagePositionRight" type="string">
      Position of the Sezzle logo from right.
    </ParamField>

    <ParamField path="letterSpacing" type="string">
      Spacing between the templateText letter.
    </ParamField>

    <ParamField path="width" type="string">
      Width of the button
    </ParamField>

    <ParamField path="height" default="4.2em" type="string">
      Height of the button.
    </ParamField>
  </Tab>
</Tabs>

#### Render the Sezzle Button

Requires having the checkout object created from above to render the button. Call renderSezzleButton passing the id of the placeholder element defined in Button Configuration, above.

```javascript theme={"system"}
await checkoutSdk.renderSezzleButton("sezzle-smart-button-container");
```

### Initialize the Checkout

#### Event Handlers

The SDK requires the following event handlers that can be used to extend features in your application.

<Tabs>
  <Tab title="Template">
    ```javascript expandable theme={"system"}
    checkoutSdk.init({
      onClick: function () {
        event.preventDefault();
        checkoutSdk.startCheckout({...});
      },
      onComplete: function (response) {
        console.log(response.data);
      },
      onCancel: function () {
        alert("Transaction cancelled.");
      },
      onFailure: function () {
        alert("Transaction failed.");
      },
      onCalculateAddressRelatedCosts: async function (
        shippingAddress,
        order_uuid
      ) {
        // Call authentication endpoint
        const response = await fetch(
          "https://gateway.sezzle.com/v2/authentication",
          {
            method: "POST",
            headers: {
              "Content-Type": "application/json",
            },
            body: JSON.stringify({
              public_key: string,
              private_key: string,
            }),
          }
        );
        const data = await response.json();
        const token = data.token;
        const updateResponse = await fetch(
          `https://gateway.sezzle.com/v2/order/${order_uuid}/checkout`,
          {
            method: "PATCH",
            headers: {
              "Content-Type": "application/json",
              Authorization: `Bearer ${token}`,
            },
            body: JSON.stringify({
              currency_code: string,
              address_uuid: shippingAddress.uuid,
              shipping_options: [
                 {
                   name: string,
                   description: string,
                   shipping_amount_in_cents: integer,
                   tax_amount_in_cents: integer,
                   final_order_amount_in_cents: integer
                 }
              ]
            }),
          }
        );
        const updateStatus = updateResponse.ok;
        return {
          ok: updateStatus,
        };
      },
    });
    ```
  </Tab>

  <Tab title="Example">
    ```javascript expandable theme={"system"}
    checkoutSdk.init({
      onClick: function () {
        event.preventDefault();
        checkoutSdk.startCheckout({
          checkout_payload: {
            // "cancel_url":{
            //     "href": "http://localhost:44300/demo/v2checkout.html"
            // },
            // "complete_url":{
            //     "href": "http://localhost:44300/demo/v2checkout.html"
            // },
            express_checkout_type: "multi-step",
            order: {
              intent: "AUTH",
              reference_id: "543645yg5tg5675686",
              description: "sezzle-store - #12749253509255",
              requires_shipping_info: true,
              items: [
                {
                  name: "widget",
                  sku: "sku123456",
                  quantity: 1,
                  price: {
                    amount_in_cents: 1000,
                    currency: "USD",
                  },
                },
              ],
              discounts: [
                {
                  name: "20% off",
                  amount: {
                    amount_in_cents: 1000,
                    currency: "USD",
                  },
                },
              ],
              metadata: {
                location_id: "123",
                store_name: "Downtown Minneapolis",
                store_manager: "Jane Doe",
              },
              order_amount: {
                amount_in_cents: 10000,
                currency: "USD",
              },
            },
          },
        });
      },
      onComplete: function (response) {
        alert("Completed transaction. Capture started.");
        checkoutSdk
          .capturePayment(response.data.order_uuid, {
            capture_amount: {
              amount_in_cents: 10000,
              currency: "USD",
            },
            partial_capture: false,
          })
          .then((r) => {
            console.log(r);
          });
      },
      onCancel: function () {
        alert("Transaction cancelled.");
      },
      onFailure: function () {
        alert("Transaction failed.");
      },
      onCalculateAddressRelatedCosts: async function (
        shippingAddress,
        order_uuid
      ) {
        // Call authentication endpoint
        const response = await fetch(
          "https://gateway.sezzle.com/v2/authentication",
          {
            method: "POST",
            headers: {
              "Content-Type": "application/json",
            },
            body: JSON.stringify({
              private_key: sz_pr_...
              public_key: sz_pub_...
            }),
          }
        );
        const data = await response.json();
        const token = data.token;
        const updateResponse = await fetch(
          `https://gateway.sezzle.com/v2/order/${order_uuid}/checkout`,
          {
            method: "PATCH",
            headers: {
              "Content-Type": "application/json",
              Authorization: `Bearer ${token}`,
            },
            body: JSON.stringify({
              currency_code: "USD",
              address_uuid: shippingAddress.uuid,
              shipping_options: [
                 {
                   name: "Standard Shipping",
                   description: "3-5 business days",
                   shipping_amount_in_cents: 2000,
                   tax_amount_in_cents: 3000,
                   final_order_amount_in_cents: 10200
                 },
                 {
                   name: "Express Shipping",
                   description: "1-2 business days",
                   shipping_amount_in_cents: 2000,
                   tax_amount_in_cents: 3000,
                   final_order_amount_in_cents: 10200
                 }
              ]
            }),
          }
        );
        const updateStatus = updateResponse.ok;
        return {
          ok: updateStatus,
        };
      },
    });
    ```
  </Tab>

  <Tab title="Options">
    <ParamField path="onClick" type="function" required>
      Sezzle Button is clicked by the user.

      <Note>
        See [Checkout Initialization](#checkout-initialization) section for payload options.
      </Note>
    </ParamField>

    <ParamField path="onComplete" type="function" required>
      Sezzle payment is successfully completed. A successfully completed Sezzle checkout will trigger an event to the `onComplete` handler. The event should include a data object with data relevant to the start checkout input parameter.

      <Note>
        See [capturePayment](#capture-payment) section for payload options.
      </Note>
    </ParamField>

    <ParamField path="onCancel" type="function" required>
      Sezzle payment is cancelled. If the user exits the Sezzle checkout for any reason, the `onCancel` handler will be executed.
    </ParamField>

    <ParamField path="onFailure" type="function" required>
      Sezzle payment has failed. If there is an error loading the Sezzle checkout page, the `onFailure` handler will be executed.
    </ParamField>

    <ParamField path="onCalculateAddressRelatedCosts" type="function">
      Required if `express_checkout_type` is `single-step` or `multi-step`. Once shopper has provided shipping address via Sezzle express checkout, this function should return tax and shipping costs to Sezzle.
    </ParamField>
  </Tab>
</Tabs>

#### Checkout Initialization

<Tabs>
  <Tab title="Template">
    ```javascript expandable theme={"system"}
    checkoutSdk.startCheckout({
      checkout_payload: {
        // "cancel_url":{
        //     "href": string
        // },
        // "complete_url":{
        //     "href": string
        // },
        express_checkout_type: string,
        order: {
          intent: string,
          reference_id: string,
          description: string,
          requires_shipping_info: boolean,
          items: [
            {
              name: string,
              sku: string,
              quantity: integer,
              price: {
                amount_in_cents: integer,
                currency: string,
              },
            },
          ],
          discounts: [
            {
              name: string,
              amount: {
                amount_in_cents: integer,
                currency: string,
              },
            },
          ],
          metadata: {
            some_property: string,
            some_other_property: string
          },
          order_amount: {
            amount_in_cents: integer,
            currency: string,
          },
        },
      },
    });
    ```
  </Tab>

  <Tab title="Example">
    ```javascript theme={"system"}
    checkoutSdk.startCheckout({
      checkout_payload: {
        // "cancel_url":{
        //     "href": "http://localhost:44300/demo/v2checkout.html"
        // },
        // "complete_url":{
        //     "href": "http://localhost:44300/demo/v2checkout.html"
        // },
        express_checkout_type: "multi-step",
        order: {
          intent: "AUTH",
          reference_id: "543645yg5tg5675686",
          description: "sezzle-store - #12749253509255",
          requires_shipping_info: true,
          items: [
            {
              name: "widget",
              sku: "sku123456",
              quantity: 1,
              price: {
                amount_in_cents: 1000,
                currency: "USD",
              },
            },
          ],
          discounts: [
            {
              name: "20% off",
              amount: {
                amount_in_cents: 1000,
                currency: "USD",
              },
            },
          ],
          metadata: {
            location_id: "123",
            store_name: "Downtown Minneapolis",
            store_manager: "Jane Doe",
          },
          order_amount: {
            amount_in_cents: 10000,
            currency: "USD",
          },
        },
      },
    });
    ```
  </Tab>

  <Tab title="Options">
    <ParamField path="cancel_url" type="object">
      The HTTP request information used to redirect the customer in the case of a cancellation

      <Expandable title="child attributes">
        <ParamField path="href" type="string">
          The URL used when redirecting a customer
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="complete_url" type="object">
      The HTTP request information used to redirect the customer upon completion of the session

      <Expandable title="child attributes">
        <ParamField path="href" type="string">
          The URL used when redirecting a customer
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="express_checkout_type" type="string" required>
      * `single-step`: only one shipping method exists, or only use default shipping method for Sezzle express checkout flow
      * `multi-step`: allow the user to select from merchant-supported shipping methods
      * `no-shipping`: purchase contains no shippable items and shopper does not have option to select, such as digital download or buy online pick up in store (BOPIS)
              <Warning>
                For `single-step and `multi-step`, `requires\_shipping\_info`must be`true`. For `no-shipping`, `requires\_shipping\_info`must be`false\`
              </Warning>

      Available options: `single-step`, `multi-step`, `no-shipping`
    </ParamField>

    <ParamField path="order" type="object">
      The order for this session

      <Expandable title="child attributes">
        <ParamField path="intent" type="string">
          If your checkout flow requires the user to confirm their checkout on your site after being approved by Sezzle, use “AUTH” as your intent. If you prefer the checkout be captured immediately, use “CAPTURE”.

          Available options: `AUTH`, `CAPTURE`
        </ParamField>

        <ParamField path="reference_id" type="string">
          Your reference ID for this order (must contain only alphanumeric characters, dashes (-), and underscores (\_))
        </ParamField>

        <ParamField path="description" type="string">
          Your description for this order
        </ParamField>

        <ParamField path="requires_shipping_info" type="boolean">
          Flag to indicate if you would like us to collect shipping information for this checkout from the customer. If omitted, defaults to false.

          <Warning>
            If `express_checkout_type` is `single-step` or `multi-step`, `requires_shipping_info` must be `true`. For `express_checkout_type`: `no-shipping` and standard checkout, use `false`
          </Warning>
        </ParamField>

        <ParamField path="items" type="array">
          The items being purchased

          <Expandable title="child attributes">
            <ParamField path="name" type="string">
              The name of the item
            </ParamField>

            <ParamField path="sku" type="string">
              The sku identifier
            </ParamField>

            <ParamField path="quantity" type="integer">
              The quantity purchased
            </ParamField>

            <ParamField path="price" type="object">
              The price object

              <Expandable title="child attributes">
                <ParamField path="amount_in_cents" type="integer">
                  The amount of the item in cents
                </ParamField>

                <ParamField path="currency" default="USD" type="string">
                  The 3 character currency code as defined by ISO 4217
                </ParamField>
              </Expandable>
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField path="discounts" type="array">
          The discounts applied to this order. Must be included in total

          <Expandable title="child attributes">
            <ParamField path="name" type="string">
              The description of the discount
            </ParamField>

            <ParamField path="amount" type="object">
              A price object

              <Expandable title="child attributes">
                <ParamField path="amount_in_cents" type="integer">
                  The amount of the item in cents
                </ParamField>

                <ParamField path="currency" default="USD" type="string">
                  The 3 character currency code as defined by ISO 4217
                </ParamField>
              </Expandable>
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField path="metadata" type="object">
          Object for any custom data you want to submit with the checkout. You are not limited to the key-value pairs shown in the example, and you may use any key-value pairs you like

          <Expandable title="child attributes">
            <ParamField path="some_field_name" type="string">
              Custom metadata field
            </ParamField>

            <ParamField path="some_other_field_name" type="string">
              Custom metadata field
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField path="tax_amount" type="object">
          The taxes applied to this order. Must be included in the total. If `express_checkout_type` is `single-step` or `multi-step`, this can be omitted - it will be provided after shopper confirms shipping address.

          <Expandable title="child attributes">
            <ParamField path="amount_in_cents" type="integer">
              The amount of the item in cents
            </ParamField>

            <ParamField path="currency" default="USD" type="string">
              The 3 character currency code as defined by ISO 4217
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField path="order_amount" type="object">
          The total amount of the order

          <Expandable title="child attributes">
            <ParamField path="amount_in_cents" type="integer">
              The amount of the item in cents
            </ParamField>

            <ParamField path="currency" default="USD" type="string">
              The 3 character currency code as defined by ISO 4217
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </ParamField>
  </Tab>
</Tabs>

Start checkout should be implemented in the checkout `onClick` handler. There are two methods for hosting a checkout.

**Use a checkout payload as detailed in the Session Object**

* The cancel and complete URLs are not required for `iframe` and `popup` mode.

**Use an existing checkout URL**

* The `mode` used when configuring the SDK checkout must match the `checkout_mode` when [creating a session](/docs/api/core/sessions/postv2session).
* The parent window `origin` must be provided in the cancel and complete urls when the `checkout_mode` is `iframe` or `popup`.

<Note>
  **Customer Tokenization** This is not supported in the `onComplete` event.
  To receive a customer UUID, subscribe to the
  [customer.tokenized](/docs/api/core/webhooks/postv2webhooks#valid-webhook-events)
  event.
</Note>

#### Capture Payment

<Note>
  Capturing an order is not required if the `CAPTURE` intent was used when
  creating the checkout.
</Note>

<Tabs>
  <Tab title="Template">
    ```javascript theme={"system"}
    checkoutSdk
      .capturePayment(response.data.order_uuid, {
        capture_amount: {
          amount_in_cents: integer,
          currency: string,
        },
        partial_capture: boolean,
      })
      .then((r) => {
        console.log(r);
      });
    ```
  </Tab>

  <Tab title="Example">
    ```javascript theme={"system"}
    checkoutSdk
      .capturePayment(response.data.order_uuid, {
        capture_amount: {
          amount_in_cents: 10000,
          currency: "USD",
        },
        partial_capture: false,
      })
      .then((r) => {
        console.log(r);
      });
    ```
  </Tab>

  <Tab title="Options">
    <ParamField path="capture_amount" type="object">
      The amount to capture on this order

      <Expandable title="child attributes">
        <ParamField path="amount_in_cents" type="integer">
          The amount in cents
        </ParamField>

        <ParamField path="currency" default="USD" type="string">
          The 3 character currency code as defined by ISO 4217
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField path="partial_capture" default="false" type="boolean" />
  </Tab>
</Tabs>

#### onCalculateAddressRelatedCosts

<Warning>
  For security purposes, authentication and checkout update must originate
  from merchant's back-end code.
</Warning>

1. Get authentication token
   * Call the [authentication](/docs/api/core/authentication/postauthentication) endpoint to obtain a bearer token
   * You should have already set this up in your back-end for the standard integration
   * Instead of pointing directly to Sezzle as in the below example, you can re-use your existing function
2. Update the order
   * Call the Update Checkout endpoint to provide Sezzle with shipping option(s) and final tax and shipping amount based on shopper's shipping address
   * See `Options` tab below for more details

<Warning>
  Once `shipping_options` have been provided to Sezzle for a checkout, they cannot be edited unless the shopper changes their shipping address.
</Warning>

<Tabs>
  <Tab title="Template">
    ```javascript expandable theme={"system"}
    onCalculateAddressRelatedCosts: async function (
      shippingAddress,
      order_uuid
    ) {
      // Call authentication endpoint
      const response = await fetch(
        yourBackendAuthenticationURL,
        {
          method: "POST",
          headers: {
            "Content-Type": "application/json",

          },
          body: JSON.stringify({
            public_key: string,
            private_key: string,
          }),
        }
      );
      const data = await response.json();
      const token = data.token;
      const updateResponse = await fetch(
        yourBackendUpdateOrderURL,
        {
          method: "PATCH",
          headers: {
            "Content-Type": "application/json",
            Authorization: `Bearer ${token}`,
          },
          body: JSON.stringify({
            currency_code: string,
            address_uuid: shippingAddress.uuid,
            shipping_options: [
               {
               name: string,
               description: string,
               shipping_amount_in_cents: integer,
               tax_amount_in_cents: integer,
               final_order_amount_in_cents: integer
               }
            ]
          }),
        }
      );
      const updateStatus = updateResponse.ok;
      return {
        ok: updateStatus,
      };
    },
    ```
  </Tab>

  <Tab title="Example">
    ```javascript expandable theme={"system"}
    onCalculateAddressRelatedCosts: async function (
      shippingAddress,
      order_uuid
    ) {
      // All this must be done inside your backend endpoint and this should be replaced with your endpoint communication logic
      // Call authentication endpoint
      const response = await fetch(
          `https://sandbox.gateway.sezzle.com/v2/authentication`,
          {
              method: "POST",
              headers: {
                  "Content-Type": "application/json",
              },
              body: JSON.stringify({
                  private_key: sz_pr_...,
                  public_key: sz_pub_...,
              }),
          }
      );
      const data = await response.json();
      const token = data.token;

      // Calculate your shipping options based on the provided shippingAddress
      const shipping_options = [
          {
              name: "Standard Shipping",
              description: "3-5 business days",
              shipping_amount_in_cents: 1000,
              tax_amount_in_cents: 500,
              final_order_amount_in_cents: 11500
          },
          {
              name: "Express Shipping",
              description: "1-2 business days",
              shipping_amount_in_cents: 2000,
              tax_amount_in_cents: 1000,
              final_order_amount_in_cents: 13000
          }
      ]
      // Update your checkout with the calculated shipping options
      const updateResponse = await fetch(
          `https://sandbox.gateway.sezzle.com/v2/order/{order_uuid}/checkout`,
          {
              method: "PATCH",
              headers: {
                  "Content-Type": "application/json",
                  Authorization: `Bearer ${token}`,
              },
              body: JSON.stringify({
                  currency_code: "USD",
                  address_uuid: shippingAddress.uuid,
                  shipping_options,
              }),
          }
      );
      const updateStatus = updateResponse.ok;
      return {
          ok: updateStatus,
      };
    }
    ```
  </Tab>

  <Tab title="Options">
    <ParamField path="currency_code" type="string" required>
      The 3 character currency code as defined by ISO 4217
    </ParamField>

    <ParamField path="address_uuid" type="string" required>
      The address UUID for the order
    </ParamField>

    <ParamField path="shipping_options" type="array" required>
      The available shipping options for the order, in order of recommendation/preference

      <Warning>
        * If `express_checkout_type` is `multi-step` but only one method is provided, user experience will follow `single-step` flow from this point
        * If `express_checkout_type` is `single-step` but multiple methods are provided, the shopper will be presented with an error.
        * If `express_checkout_type` is `multi-step` or `single-step` and no methods are provided, the shopper will be asked to review their shipping address and try again.
      </Warning>

      <Expandable title="child attributes">
        <ParamField path="name" type="string" required>
          The name of the shipping method
        </ParamField>

        <ParamField path="description" type="string">
          The description of the shipping method, such as number of business days
        </ParamField>

        <ParamField path="shipping_amount_in_cents" type="integer" required>
          The shipping amount in cents for the order
        </ParamField>

        <ParamField path="tax_amount_in_cents" type="integer" required>
          The tax amount in cents for the order
        </ParamField>

        <ParamField path="final_order_amount_in_cents" type="integer" required>
          The final total amount in cents for the order
        </ParamField>
      </Expandable>
    </ParamField>
  </Tab>
</Tabs>

##### Response

<Tabs>
  <Tab title="Template">
    ```json theme={"system"}
    {
      ok: boolean,
      error: {
        code: string
      }
    }
    ```
  </Tab>

  <Tab title="Example">
    ```json theme={"system"}
    {
      ok: false,
      error: {
        code: "merchant_unsupported_shipping_address"
      }
    }
    ```
  </Tab>

  <Tab title="Options">
    <ParamField path="ok" type="boolean" />

    <ParamField path="error" type="object">
      <Expandable>
        <ParamField path="code" type="string">
          Available options: `merchant_unsupported_shipping_address`, `merchant_error`

          <Note>
            `merchant_unsupported_shipping_address` indicates that the merchant does not support the shipping address provided.
            `merchant_error` is generic error returned by the merchant when something goes wrong on their end.
          </Note>
        </ParamField>
      </Expandable>
    </ParamField>
  </Tab>
</Tabs>
