Skip to main content
POST
/
checkout
/
v1
/
session
Create Checkout Session
curl --request POST \
  --url https://api-sandbox.appcharge.com/checkout/v1/session \
  --header 'Content-Type: application/json' \
  --header 'x-publisher-token: <x-publisher-token>' \
  --data '{
  "priceDetails": {
    "price": 1000,
    "currency": "USD"
  },
  "offer": {
    "name": "Treasure Chest",
    "sku": "68452829c5e8",
    "assetUrl": "https://media-dev.appcharge.com/image.png",
    "description": "<string>",
    "displayName": "<string>",
    "pricePointMetadata": 123
  },
  "items": [
    {
      "name": "coins",
      "assetUrl": "https://media-dev.appcharge.com/coin.png",
      "sku": "coins_386f9b",
      "quantity": 3300000,
      "quantityDisplay": "3.3M",
      "displayName": "<string>"
    }
  ],
  "customer": {
    "id": "7c99fba665c4a",
    "email": "customer@appcharge.com"
  },
  "sessionMetadata": {},
  "attributes": {},
  "redirectUrl": "<string>"
}'
{
  "checkoutSessionToken": "<string>",
  "purchaseId": "<string>",
  "url": "<string>"
}

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.

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 Redirect iOS Players Directly Back to Your Game.

Response

Checkout session created successfully.

checkoutSessionToken
string

Checkout session token.

purchaseId
string

Purchase ID.

url
string

Checkout session URL hosted on Appcharge.

I