Skip to main content
POST
Create Checkout Session

Headers

x-publisher-token
string
required

Your checkout token that will be presented at Appcharge's dashboard under Admin section -> Integration tab -> Publisher token

Body

application/json
priceDetails
object
required
offer
object
required
customer
object
required
items
object[]

List of items in the offer.

countryCode2
string

Two-letter country code in ISO-3166 alpha-2 format. Required if playerIp is not provided. Example: US.

Example:

"US"

playerIp
string

Player IP address in IPv4 format. Required if countryCode2 is not provided. Example: 192.0.2.1.

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, and then include the desired locale here.

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.

Note: This property is not relevant if you're using the Payment Links SDK.

Response

Checkout session created successfully.

checkoutSessionToken
string

Checkout session token. Use this token when calling the Cancel Checkout Session API to cancel the session.

Example:

"61ed143b22d24815a713e215e99b0ea6"

purchaseId
string

Purchase ID.

Example:

"purchase_abc123def456"

url
string
deprecated

Checkout session URL hosted on Appcharge.

Example:

"https://checkout-v2.appcharge.com"

parsedUrl
string

New checkout session URL hosted on Appcharge.

Example:

"https://pay.appcharge.com/61a164d563c54014b1959a5c78704964#boot={PUBLISHER_BOOT_DATA}"