PayNow

CreateCheckoutSessionRequestDto

Request to create a new checkout session

linesCreateCheckoutSessionLineDto[]Required
The line items to include in the checkout.
product_idFlakeIdRequired
quantityintegerRequired
The quantity of this product to purchase
custom_variablesobjectOptional
Key-value pair mapping custom variable identifiers to their selected values. Required only when the product includes custom variables.
gift_toCustomerPlatformAccountDtoOptional
Represents a customer platform association, used for gifting
idstringRequired
The account ID on the platform
platformenumRequired
Possible enum values
  • invalid
  • steam

    Steam profile platform - the ID param must be a Steam ID 64.

  • minecraft

    Minecraft profile platform - the ID param must be a Minecraft nick. If your store platform is Geyser, this automatically sets the Minecraft platform based on the prefix configured in store settings.

  • paynow_name

    PayNow name profile platform - the ID param must be a PayNow username.

  • paynow

    PayNow name profile platform - the ID param must be a PayNow username.

  • minecraft_java_name

    Minecraft Java Profile Platform - the ID param must be a Java minecraft nick.

  • minecraft_bedrock_name

    Minecraft Bedrock Profile Platform - the ID param must be a Bedrock minecraft nick.

  • xbox_xuid

    Minecraft Xbox XUID Profile Platform - the ID param must be an xbox xuid

  • minecraft_uuid

    Minecraft profile platform - the ID param must be a Minecraft UUID.

gift_to_customer_idFlakeIdOptional
selected_gameserver_idFlakeIdOptional
subscriptionbooleanOptional
Determines whether this line should create a subscription
trialbooleanOptional
Indicates whether the product should be trialed
affiliate_codestringOptional
Optional affiliate code to track referrals. An invalid affiliate code will NOT cause an error.
auto_redirectbooleanOptional
Whether to automatically redirect the customer (return_url must be set)
cancel_urlstringOptional
Optional URL to redirect to if checkout is canceled
coupon_idFlakeIdOptional
promo_codesstring[]Optional
Optional array of promo codes (coupons, gift cards, affiliates) to apply. An invalid promo code will cause an error.
return_urlstringOptional
Optional URL to redirect to after successful checkout
Example
{
  "lines": [
    {
      "product_id": "411486491630370816",
      "quantity": 0,
      "subscription": true,
      "trial": true,
      "gift_to": {
        "id": "76561198152492642",
        "platform": "invalid"
      },
      "gift_to_customer_id": "411486491630370816",
      "selected_gameserver_id": "411486491630370816",
      "custom_variables": {}
    }
  ],
  "coupon_id": "411486491630370816",
  "promo_codes": [
    "string"
  ],
  "affiliate_code": "string",
  "return_url": "string",
  "cancel_url": "string",
  "auto_redirect": true
}