InApp Purchase
InApp purchase allows a user to pay for a subscription using either the Apple or Google InApp Payment platform.
While InApp Purchase is not only a very convinient way to pay for a subscription, it can also be used to replace an account creation flow, if the user only wants to use the product on one specific device or devices which are linked to his Apple or Google account. Apple and Google will take care of the authentication and the returned Receipt or Purchase Token can be used as an alternative way to authenticate the customer.
This endpoint is used to implement several flows in the In-App Purchase process:
The backend validates the purchase.
a. Authentication Token provided without customer details
Purchase is assigned to the existing account
b.Authentication Token provided customer details
Purchase is assigned to the existing account
Account e-mail is being updated with the provided e-mail address
User will receive a mail which asks him to confirm the new e-mail address and set a new password
The response will have
email_confirmation_requiredset to true
c. No Authentication Token provided, customer details provided
The purchase is linked to a new account.
The account is created using the specified details.
The user receives a password reset email to set the password.
The response will have
email_confirmation_requiredset to true
d. No Authentication Token provided, NO customer details provided
A random username and password are generated for the new account.
Backend returns Authentication Credentials. If the new Authentication credentials refer to an account which is different to the one identified by the Authentication Token, the property
account_switchedwill be set to true.
An OpenID Access Token
The app version of the client making the request.
8.10.123The type of the device making the request
["desktop","mobile","tablet","firetv","appletv"]The operating system of the client making the request.
["windows","macos","linux","android","ios","web"]The operating system version of the client making the request.
10.0.1234The SDK version making the request
5.0.123Real User's IP address, required for Fraud Prevention
192.168.1.1Successful response containing user location and VPN connection status
Rate limited
Last updated