Notification types Payloads
Overview
In this page you can better understand the payload that each of the OneTimeProductNotification, SubscriptionNotification and VoidedPurchaseNotification can retrieve and how to deal with them.
OneTimeProductNotification
The OneTimeProductNotification contains the following payload:
{
"version": String,
"notificationType": Int,
"purchaseToken": String,
"sku": String
}
The parameters in this payload are described as the following:
Name | Type | Description |
---|---|---|
version | String | Version of the Payload received. |
notificationType | Int | Type of notification received for the Consumable Product Purchase. Possible values can be seen here. |
purchaseToken | String | Purchase Token of the Consumable Purchase. This is a unique value and should be used to obtain more information about the Purchase. |
sku | String | The SKU of the Product in the Purchase. |
NotificationType
Possible values of the notificationType
are the following:
Value | Title | Description |
---|---|---|
1 | COMPLETED | Inapp Purchase has been completed successfully. |
2 | CANCELED | Inapp Purchase has been canceled. |
Processing the OneTimeProductNotification payload
When you receive a notification of the OneTimeProductNotification
type, use the orderId
parameter to obtain more information about the Purchase to which the Notification is related and then update your backend data with the information you have.
To obtain the Purchase data with orderId
of a InApp type Product, use our In-App Purchase Verification endpoint.
SubscriptionNotification
The SubscriptionNotification contains the following payload:
{
"version": String,
"notificationType": Int,
"purchaseToken": String,
"subscriptionId": String
}
The parameters in this payload are described as the following:
Name | Type | Description |
---|---|---|
version | String | Version of the Payload received. |
notificationType | Int | Type of notification received for a Subscription Purchase. Possible values can be seen here. |
purchaseToken | String | Purchase Token of the Subscription Purchase. This is a unique value and should be used to obtain more information about the Purchase. |
subscriptionId | String | The SKU of the Product in the Purchase. |
NotificationType
Possible values of the notificationType
are the following:
Value | Title | Description |
---|---|---|
1 | SUBSCRIPTION_RECOVERED | A subscription was successfully recovered from account hold. |
2 | SUBSCRIPTION_RENEWED | An active subscription was renewed successfully. |
3 | SUBSCRIPTION_CANCELED | A subscription was canceled, either voluntarily by the user or involuntarily. For voluntary cancellations, this notification is sent when the user initiates the cancellation. |
4 | SUBSCRIPTION_PURCHASED | A new subscription was purchased. |
5 | SUBSCRIPTION_ON_HOLD | A subscription has been placed on account hold (if this feature is enabled). |
6 | SUBSCRIPTION_IN_GRACE_PERIOD | A subscription has entered the grace period due to issues such as payment failure (if this feature is enabled). |
7 | SUBSCRIPTION_RESTARTED | A user has restored their subscription through AppCoins Wallet > Settings > Manage Subscriptions. The subscription had been canceled but was still within its validity period when restored. |
12 | SUBSCRIPTION_REVOKED | The subscription was revoked by the system before its expiration date. |
13 | SUBSCRIPTION_EXPIRED | The subscription has reached its expiration date and was not renewed. |
Processing the SubscriptionNotification payload
When you receive a notification of the SubscriptionNotification
type, use the orderId
parameter to obtain more information about the Purchase to which the Notification is related and then update your backend data with the information you have.
To obtain the Purchase data with orderId
of a Subscription type Product, use our Subscription Purchase Verification endpoint.
VoidedPurchaseNotification
The VoidedPurchaseNotification contains the following payload:
{
"purchaseToken": String,
"orderId": String,
"productType": Int,
"refundType": Int
}
The parameters in this payload are described as the following:
Name | Type | Description |
---|---|---|
purchaseToken | String | Purchase Token of the Voided Purchase. This is a unique value and should be used to obtain more information about the Purchase. |
orderId | String | The order UID (Unique Identifier) used internally in Aptoide. |
productType | Int | Type of the SKU in the Purchase that has been Voided. |
refundType | Int | Type of notification received for the Voided Purchase. Possible values can be seen here . |
productType
Possible values of the productType
are the following:
Value | Title | Description |
---|---|---|
1 | SUBS | A type of SKU for subscriptions. |
2 | INAPP | A type of SKU for in-app products. |
refundType
Possible values for the refundType
are the following:
Value | Title | Description |
---|---|---|
1 | REFUND_TYPE_FULL_REFUND | Purchase has been totally refunded. |
2 | REFUND_TYPE_QUANTITY_BASED_PARTIAL_REFUND | Purchase has been partially refunded. |
Processing the VoidedPurchaseNotification payload
When you receive a notification of the VoidedPurchaseNotification
type, use the orderId
parameter to obtain more information about the Purchase that got Voided to which the Notification is related and then update your backend data with the information you have.
To obtain more information regarding the Voided Purchase itself, follow our guide about In-App Voided Purchases Integration.
FAQ
How to obtain more information about the Purchase?
To obtain more information about the Purchase check our available APIs that have the integral information based on the information you can use.
Updated 24 days ago