Storefront Checkout

A checkout represents a customer's virtual shopping cart at the point of purchase.

This resource is intended to be accessed directly by customers using a customer token.

Endpoints

POST
/checkouts
  • Request Headers

  • Name
    Authorization
    Type
    customer auth
    Tags
    REQUIRED
    Description

    the token of your customer prefixed with customer, see more information here


Create Checkout

This endpoint creates a new checkout.

  • Fields

  • Name
    subscription
    Type
    boolean
    Tags
    Description

    boolean indicating if this checkout is for a subscription

  • Name
    lines
    Type
    []CreateCheckoutRequestLine
    Tags
    Description

    list of items in checkout

Checkout line object structure

  • Fields

  • Name
    product_id
    Type
    flake
    Tags
    Description

    id of the product

  • Name
    gift_to
    Type
    CustomerPlatformAccount?
    Tags
    OPTIONAL
    Description

    gift using a platform

  • Name
    gift_to_customer_id
    Type
    flake?
    Tags
    OPTIONAL
    Description

    id of the customer to gift to

  • Name
    selected_gameserver_id
    Type
    flake?
    Tags
    OPTIONAL
    Description

    id of the selected gameserver if product has single_game_server_only set to true

  • Name
    quantity
    Type
    integer
    Tags
    Description

    the quantity (count) of products in this line

Checkout Gift

  • Fields

  • Name
    platform
    Type
    enum
    Tags
    Description

    platform used to gift

    Allowed enum values
    steam
    Steam platform
    paynow_name
    PayNow name - used for Minecraft or games that only require the nick
  • Name
    id
    Type
    string
    Tags
    Description

    id of the platform customer account to gift to

Create Checkout Request

{
  "subscription": false,
  "lines": [
      {
          "product_id": "124249183568797696",
          "gift_to": {
              "platform": "example_platform",
              "id": "example_id"
          },
          "gift_to_customer_id": "123456789",
          "quantity": 2
      }
  ]
}

Create Checkout Response

{
	"id": "367465872819765248",
	"token": "7olvnbg2nu9clh6h4bf29s8mez24",
	"url": "https://checkout.paynow.gg/?t=7olvnbg2nu9clh6h4bf29s8mez24"
}