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:

NameTypeDescription
versionStringVersion of the Payload received.
notificationTypeIntType of notification received for the Consumable Product Purchase. Possible values can be seen here.
purchaseTokenStringPurchase Token of the Consumable Purchase. This is a unique value and should be used to obtain more information about the Purchase.
skuStringThe SKU of the Product in the Purchase.

NotificationType

Possible values of the notificationType are the following:

ValueTitleDescription
1COMPLETEDInapp Purchase has been completed successfully.
2CANCELEDInapp 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:

NameTypeDescription
versionStringVersion of the Payload received.
notificationTypeIntType of notification received for a Subscription Purchase. Possible values can be seen here.
purchaseTokenStringPurchase Token of the Subscription Purchase. This is a unique value and should be used to obtain more information about the Purchase.
subscriptionIdStringThe SKU of the Product in the Purchase.

NotificationType

Possible values of the notificationType are the following:

ValueTitleDescription
1SUBSCRIPTION_RECOVEREDA subscription was successfully recovered from account hold.
2SUBSCRIPTION_RENEWEDAn active subscription was renewed successfully.
3SUBSCRIPTION_CANCELEDA subscription was canceled, either voluntarily by the user or involuntarily. For voluntary cancellations, this notification is sent when the user initiates the cancellation.
4SUBSCRIPTION_PURCHASEDA new subscription was purchased.
5SUBSCRIPTION_ON_HOLDA subscription has been placed on account hold (if this feature is enabled).
6SUBSCRIPTION_IN_GRACE_PERIODA subscription has entered the grace period due to issues such as payment failure (if this feature is enabled).
7SUBSCRIPTION_RESTARTEDA 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.
12SUBSCRIPTION_REVOKEDThe subscription was revoked by the system before its expiration date.
13SUBSCRIPTION_EXPIREDThe 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:

NameTypeDescription
purchaseTokenStringPurchase Token of the Voided Purchase. This is a unique value and should be used to obtain more information about the Purchase.
orderIdStringThe order UID (Unique Identifier) used internally in Aptoide.
productTypeIntType of the SKU in the Purchase that has been Voided.
refundTypeIntType of notification received for the Voided Purchase. Possible values can be seen here .

productType

Possible values of the productType are the following:

ValueTitleDescription
1SUBSA type of SKU for subscriptions.
2INAPPA type of SKU for in-app products.

refundType

Possible values for the refundType are the following:

ValueTitleDescription
1REFUND_TYPE_FULL_REFUNDPurchase has been totally refunded.
2REFUND_TYPE_QUANTITY_BASED_PARTIAL_REFUNDPurchase 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.