Documentation

StartPurchase

Creates an order for a list of items from the title catalog

Request Details

This is the first step in the purchasing process. For security purposes, once the order (or "cart") has been created, additional inventory objects may no longer be added. In addition, inventory objects will be locked to the current prices, regardless of any subsequent changes at the catalog level which may occur during the next two steps.

StartPurchaseRequest
Request Properties
CatalogVersion String

Catalog version for the items to be purchased. Defaults to most recent catalog.

Items (required) List<ItemPurchaseRequest>

Array of items to purchase.

StoreId String

Store through which to purchase items. If not set, prices will be pulled from the catalog itself.

POST https://{{TitleID}}.playfabapi.com/Client/StartPurchase
    Content-Type: application/json
    X-Authentication: <user_session_ticket_value>
{
  "CatalogVersion": "0",
  "StoreId": "BonusStore",
  "Items": [
    {
      "ItemId": "something",
      "Quantity": 1,
      "Annotation": "totally buying something"
    }
  ]
}
        

Response Details

StartPurchaseResult
Result Properties
Contents List<CartItem>

Cart items to be purchased.

OrderId String

Purchase order identifier.

PaymentOptions List<PaymentOption>

Available methods by which the user can pay.

VirtualCurrencyBalances Dict<String, int32>

Current virtual currency totals for the user.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "OrderId": "8853591446005860822",
    "Contents": [
      {
        "ItemId": "shield_level_5",
        "ItemClass": "shields",
        "DisplayName": "Level 5 Shield",
        "VirtualCurrencyPrices": {
          "RM": 199,
          "GV": 25
        }
      }
    ],
    "PaymentOptions": [
      {
        "Currency": "RM",
        "ProviderName": "Steam",
        "Price": 199,
        "StoreCredit": 0
      },
      {
        "Currency": "RM",
        "ProviderName": "Amazon",
        "Price": 199,
        "StoreCredit": 0
      },
      {
        "Currency": "RM",
        "ProviderName": "Paypal",
        "Price": 199,
        "StoreCredit": 0
      },
      {
        "Currency": "GV",
        "ProviderName": "TitleA90A",
        "Price": 25,
        "StoreCredit": 0
      }
    ],
    "VirtualCurrencyBalances": {
      "GV": 25
    }
  }
}

Authentication

SessionTicket

Possible Error Codes

Name Code