---
title: "Create Checkout Session"
method: POST
path: "/checkout/v1/session"
---

# Create Checkout Session

`POST /checkout/v1/session`

Creates a checkout session.

## Headers

- `x-publisher-token` string, required

## Request body

- CheckoutSessionRequest
  - `priceDetails` object, required
    - `price` integer, required — Price in the smallest currency unit. For example, if the price is $10.00, pass `1000`, not `10.00`. For currencies with no subunit, such as JPY, the value represents the full unit. See [Supported Currencies](/../../merchant-of-record/finance/supported-currencies) for per-currency decimal rules.
    - `currency` string, required — Currency in ISO 4217 format.
  - `offer` object, required
    - `name` string, required — Offer name. Cannot be an empty string.
    - `sku` string, required — Offer ID (SKU).
    - `displayName` string — Localized offer name.
    - `pricePointMetadata` integer — Base price of the price point in USD cents.
  - `items` object[] — List of items in the offer.
    - `name` string, required — Item name.
    - `assetUrl` string, uri — URL of the asset (should be on a CDN).
    - `sku` string, required — Item SKU.
    - `quantity` integer, required — Item quantity. Should be minimum 0 and equal to or less than 30 digits long.
    - `quantityDisplay` string — Overrides the `quantity` value displayed in the checkout. Useful for presenting time-based products or showing abbreviated values.
    - `displayName` string — Localized item name.
  - `countryCode2` string — Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. Required if `playerIp` is not provided. Example: `US`.
  - `playerIp` string — Player IP address in [IPv4](https://en.wikipedia.org/wiki/IPv4) format. Required if `countryCode2` is not provided. Example: `192.0.2.1`.
  - `customer` object, required
    - `id` string, required — Unique customer identifier.
    - `email` string, email — Customer email address.
    - `identitySignals` object — Information regarding the player's identity. Pass this field to improve risk decisions and reduce false declines.
      - `firstSeenAt` string, date-time — First time the player was observed on your monetization platform. For example, the player's account creation date in your game. Used to differentiate veteran players from new accounts during risk evaluation. Must be a past date.
  - `receiptMetadata` object — Metadata for the receipt. **Note:** If you want the receipt to be sent in a specific language, first configure your translations in the Publisher Dashboard or via the [Translations API service](/../../api-reference/translations/introduction), and then include the desired locale here.
    - `locale` string — The locale code. Both ISO-639 language code and ISO-3166 country code formats are supported. **Note:** This value must match the language code configured in the Publisher Dashboard, or the `locale` used in the [Set Translations API](/../../api-reference/translations/set-translations).
  - `sessionMetadata` object — This entity serves as a versatile container for storing any pertinent information related to the player's session. You can add any additional data you wish to pass as a payload.
  - `attributes` object — A set of custom key-value pairs that you can define to tag players for segmentation and A/B testing. These attributes can then be used to filter players in the Publisher Dashboard. Example: { "BF_test": "test", "monetization_persona": "non_payer" }
  - `redirectUrl` string, uri — A deeplink URL for redirecting the player to your domain, bringing them back to the game. For more information, see [Link Out Without SDK](/../../guides/payment-links/link-out-without-sdk). **Note:** This property is not relevant if you're using the Payment Links SDK.

## Response `201`

Checkout session created successfully.

- CheckoutSessionResponse
  - `checkoutSessionToken` string — Checkout session token. Use this token when calling the [Cancel Checkout Session API](./cancel-checkout-session) to cancel the session.
  - `purchaseId` string — Purchase ID.
  - `url` string — Checkout session URL hosted on Appcharge.
  - `parsedUrl` string — New checkout session URL hosted on Appcharge.

## Other responses

- `400` — Invalid input
- `403` — Forbidden

---

[API](https://skmtc.net/appcharge/apis/grant-award.md) · [All operations](https://skmtc.net/appcharge/apis/grant-award/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/appcharge/grant-award/revisions/b4f6759240d5/schema)
