Webhooks - In-App Purchase Validation
If you are selling subscriptions through different channels, such as Apple App Store, Google PlayStore, or Amazon Fire TV, Cleeng does not handle your payments, but acts as an observer and tracks in-app purchase lifecycle events.
The process of purchase validation in app stores is asynchronous because Cleeng needs to verify purchase receipt with an external app store.
Because it requires validation with an external app store, we are not able to return the outcome synchronously in the API request response. Therefore, we provide webhooks that inform broadcasters about results of purchase validation once the process is completed.
If subscribed to below topics, you will receive a webhook notification whenever in-app purchase validation is completed with information about the outcome of the validation result. This can reduce the amount of support enquiries and improve user experience by making it more reliable and frictionless.
Possible outcomes of in-app purchase validation and webhooks sent:
Validation Result | Webhooks sent |
---|---|
Validation succeeded: a new subscription is created | - inappPurchaseValidationSucceeded webhook with the respective payload (result : "SubscriptionCreated" )- subscriptionCreated webhook |
Validation succeeded: an existing subscription is transferred from one user to another This happens when the same purchase receipt has already been used with a different account. | - inappPurchaseValidationSucceeded webhook with the respective payload including the IDs of the old and the new subscription (prevSubscriptionId and prevCustomerId )- subscriptionTerminated webhook - for the old subscription and then subscriptionCreated webhook - for the new subscription (transferred). |
Validation succeeded: no action is taken because the customer already has a subscription (a subscription already exists) This happens when the same purchase receipt has already been used with the same account. | - inappPurchaseValidationSucceeded webhook with the respective payload including the ID of the existing subscription. |
Validation failed | - inappPurchaseValidationFailed webhook with the reason for failure |
For details of in-app purchase validation webhooks, see Webhooks - In-App purchase Topics.
Updated 9 months ago