Documentation

GetPaymentToken

For payments flows where the provider requires playfab (the fulfiller) to initiate the transaction, but the client completes the rest of the flow. In the Xsolla case, the token returned here will be passed to Xsolla by the client to create a cart. Poll GetPurchase using the returned OrderId once you've completed the payment.

Request Details

GetPaymentTokenRequest
Request Properties
TokenProvider (required) String

The name of service to provide the payment token. Allowed Values are: xsolla

POST https://{{TitleID}}.playfabapi.com/Client/GetPaymentToken
    Content-Type: application/json
    X-Authentication: <user_session_ticket_value>
{
  "TokenProvider": "xsolla"
}
        

Response Details

GetPaymentTokenResult
Result Properties
OrderId String

PlayFab's purchase order identifier.

ProviderToken String

The token from provider.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "ProviderToken": "uV0iCEvWkUGVqWerTgbrndWePOMiLAfO",
    "OrderId": "8853591446005860822"
  }
}

Authentication

SessionTicket

Possible Error Codes

Name Code
InvalidPaymentProvider 1063
NoPartnerEnabled 1192