---
title: "Checkout"
method: POST
path: "/2023-10/subscription/{subscriptionId}/checkout"
---

# Checkout

`POST /2023-10/subscription/{subscriptionId}/checkout`

This endpoint creates a checkout for a subscription contract, enabling customers to complete payment for prorated charges resulting from subscription changes.

## Path parameters

- `subscriptionId` integer, required

## Request body

- object
  - `lines` object[], required — List of items to be included for the proration charges.
    - `variantShopifyId` integer, required — Shopify variant ID of the line item.
    - `quantity` integer, required — Number of units for the given variant.
    - `price` number, float, required — The base price of the product variant used for prorated charge calculations during checkout. The value is treated in the subscription contract's currency and applies only to the checkout order.
    - `type` 'SUBSCRIPTION' | 'ONETIME', required — Specifies whether the item is a subscription or one-time purchase.
    - `isUpsell` boolean — Indicates whether the item is added as an upsell for tracking purposes.
    - `upsellSource` 'ADMIN_PORTAL' | 'CUSTOMER_PORTAL' | 'API' — Source from where the upsell was triggered (e.g., admin, customer portal, or API).
    - `attributes` object[] — Custom key-value attributes associated with the line item.
      - `key` string
      - `value` string
  - `manualDiscounts` object[], required — List of manual discounts to be applied during checkout.
    - `title` string, required — Name or label of the discount applied.
    - `type` 'FIXED_AMOUNT' | 'PERCENTAGE', required — Defines whether the discount is a fixed amount or percentage-based.
    - `value` number, float, required — Value of the discount to be applied.

## Response `200`

200

- object
  - `success` boolean — Indicates whether the checkout operation was successful.
  - `message` string — Human-readable message describing the result of the operation.
  - `data` object — Contains checkout-related details generated after processing the request.
    - `checkout` object
      - `id` integer
      - `status` string
  - `code` string — Status code representing the result of the operation.
  - `pageInfo` string — Additional metadata related to the response (if applicable).

---

[API](https://skmtc.net/loopwork/apis/storefront-api.md) · [All operations](https://skmtc.net/loopwork/apis/storefront-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loopwork/storefront-api/versions/1524500daa02/schema)
