Create purchase
POST/v1/client/android/purchases
Create purchase
Request
- application/json
Body
required
Purchase Details
Possible values: [inapp
, subs
]
The type of product.
Array of product IDs.
The old product ID.
billingFlowParams object
Old Purchase Token
For subscription purchases, the offer tokens associated with the purchase.
The applicationId associated with the app, also referred to as packageName.
Obfuscated account ID
Obfuscated profile ID
Developer payload
Possible values: [PURCHASED
, CANCELED
, PENDING
]
Default value: PURCHASED
The initial state of the purchase.
The artifactId of the library used to make the purchase (optional)
The version of the library used to make the purchase (optional)
Responses
- 200
- 201
- 400
- 409
- 410
- 411
- 500
Purchase created successfully
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
purchases object[]required
{
"purchases": [
{
"purchase": "string",
"signature": "string"
}
]
}
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
purchases object[]required
{
"purchases": [
{
"purchase": "string",
"signature": "string"
}
]
}
Invalid productIds, productType or purchaseState
User already owns the product
Subscription is non-legacy so it requires offerIdToken
Configuration error: Subscription should have one base plan and one offer
Invalid client, user or device or Internal Server Error