In-App Purchase Details
Overview
The In-App Purchases details can be obtained via different sources. To better understand each values received from the different sources, this guide will explain all the correlations between the data given and how to obtain extra data apart from the default information received after a Purchase is complete in the Android Billing SDK.
Sources that provide Purchase data
The sources that provide information about a Purchase are the following:
Android Billing SDK
After a Purchase is made, the Android Billing SDK, using the PurchasesUpdatedListener, will notify your application of that Purchase with the data explained in the Purchase class.
This information is the base for the rest of the requests you can do to the Aptoide services to obtain more data about the Purchase.
In-App Purchase Validation (Server-to-Server)
Once received the Purchase in the PurchasesUpdatedListener, follow the Server to Server - Server flow to receive additional information. In here you will use the sku
/productId
of the Purchase and purchaseToken
.
In-App Purchase details (Server-to-Server ProductV2 API)
This API is used to obtain the UID
, which can be viewed in the Aptoide Connect information page of a transaction made by a User. This UID
is used to do further requests which will give more information about the Purchase.
To use this API. use the following endpoint (same endpoint is use for both INAPPs
and Subscriptions
):https://api.catappult.io/productv2/8.20241201/inapp/purchases/{purchaseToken}
The data received from this endpoint is the following:
{
"uid": String,
"sku": String,
"domain": String,
"type": String,
"status": String,
"state": String,
"payload": String,
"created": String,
"buyer": {
"type": String,
"reference": String
},
"order": {
"uid": String,
"gateway": String,
"reference": String,
"status": String,
"created": String
}
}
The parameters in this payload are described as the following:
Name | Type | Description |
---|---|---|
uid | String | Purchase ID defined as token in the Purchase class. |
sku | String | SKU of the Product purchased. |
domain | String | Package name of the application that originated this Purchase. |
type | String | Type of the Product purchased. |
status | String | Status of the transaction. |
state | String | State of the transaction. |
payload | String | String based payload specified by the Developer when initiating this Purchase. |
created | String | String based timestamp of the creation date. Eg: 2025-01-14T11:06:31.231117Z |
buyer | Object | Object with information of the Buyer source. |
buyer.type | String | Buyer type. Example: WALLET |
buyer.reference | String | Buyer reference. |
order | Object | Object with the information of the Order made in the Payment. |
order.uid | String | UID of the Order. Defined as orderId in the Purchase class. |
order.gateway | String | Gateway of the order. Possible value is broker . |
order.reference | String | Reference ID of the Order. Defined as UID in Aptoide Connect channels. |
order.status | String | Status of the Order made. |
order.created | String | String based timestamp of the creation date. Eg: 2025-01-14T11:06:31.231117Z |
type
Value | Description |
---|---|
CONSUMABLE | Product type is a Consumabled. |
SUBSCRIPTION | Product type is a Subscription. |
status
Value | Description |
---|---|
PENDING | The purchase is pending one or more actions to be completed. Example: Consumption |
COMPLETED | The purchase is successfully completed. |
VOIDED | The purchase is voided. |
state
Value | Description |
---|---|
PENDING | The purchase is pending acknowledgement or consumption. |
CONSUMED | The purchase has been consumed. |
AKCNOWLEDGED | The purchase has been acknowledged. |
order.status
Value | Description |
---|---|
PENDING | The order is pending one or more actions to be completed. |
COMPLETED | The order is successfully completed. |
FAILED | The order failed to be completed due to an error. |
CANCELED | The order is canceled and may no longer be completed. |
REFUNDED | The order was refunded. |
CHARGEDBACK | The order was chargedback. |
Broker Purchase Details (Server-to-Server Broker API)
This API is used to obtain more detailed information about the Purchase. In here you are able to obtain information about the price of the Purchase, the TxID
, which can be viewed in the Aptoide Connect information page of a transaction made by a User and also in our Wallet Application further used to assists users in resolution of potential issues during the Payments or items attribution.
To use this API. use the following endpoint (same endpoint is use for both INAPPs
and Subscriptions
):https://api.catappult.io/broker/8.20240901/transactions/{UID}
The data received from this endpoint is the following:
{
"uid": String,
"domain": String,
"product": String,
"wallet_from": String,
"type": String,
"method": String,
"country": String,
"reference": String,
"hash": String,
"status": String,
"added": String,
"modified": String,
"gateway": {
"name": String
},
"metadata": {
"purchase_uid": String,
"developer_payload": String
},
"price": {
"currency": String,
"value": String,
"appc": String,
"usd": String,
"vat": {
"percentage": String,
"value": String,
"usd": String
},
"discount": {
"percentage": String,
"value": String,
"usd": String
}
},
"channel": String,
"platform": String,
"market": String
}
The parameters in this payload are described as the following:
Name | Type | Description |
---|---|---|
uid | String | UID of the Order. Defined as UID in Aptoide Connect channels. |
domain | String | Package name of the application that originated this Purchase. |
product | String | SKU of the Product purchased. |
wallet_from | String | String based value of the Wallet Address used in the Purchase. |
type | String | Type of the Product purchased. |
method | String | Method used in the Purchase. Example: credit_card |
country | String | String value following the ISO-3166-1-A2 guidelines. Example: US |
reference | String | The transaction reference. Defined as orderReference in the BillingFlowParams. |
hash | String | Hash of the transaction. Defined as TxID in the Aptoide Connect and Wallet App. |
status | String | Status of the transaction. |
added | String | String based timestamp of the addition date. Example: 2025-01-14T11:06:31.231117Z |
modified | String | String based timestamp of the modification date. Example: 2025-01-14T11:06:31.231117Z |
gateway | Object | Object with information of the Gateway used. |
gateway.name | String | Gateway name. Example: adyen_v2 |
metadata | Object | Object with information about the Purchases metadata. |
metadata.purchase_uid | String | Purchase ID defined as token in the Purchase class. |
metadata.developer_payload | String | String based payload specified by the Developer when initiating this Purchase. |
price | Object | Object with information of the Price of the Purchase. |
price.currency | String | The currency used in the Payment, as an ISO 4217 alphabetic code. Example: USD |
price.value | String | The price value of the Payment. Example: 1.12 |
price.appc | String | The price value in APPC currency. Example: 1120000 |
price.usd | String | The price value in USD currency. Example: 1.10 |
price.vat | Object | Object with information about the VAT. |
price.vat.percentage | String | Percentage of the VAT. Example: 20.5 |
price.vat.value | String | Value of the VAT. Example: 4.45 |
price.vat.usd | String | Value of the VAT in USD . Example: 1.12 |
price.discount | Object | Object with information about the Discount applied in the Purchase. |
price.discount.percentage | String | Percentage of the discount. Example: 20.5 |
price.discount.value | String | Value of the discount. Example: 4.45 |
price.discount.usd | String | Value of the discount in USD . Example: 1.12 |
channel | String | Channel used for the Purchase. |
platform | String | Platform used for the Purchase. |
market | String | Market from which the Purchase was made. |
type
Value | Description |
---|---|
INAPP | Product of type inapp was purchased via Android Billing SDK. |
INAPP_SUBSCRIPTION | Product of type subscription was purchased via Android Billing SDK. |
INAPP_UNMANAGED | Product of type inapp was purchased via OSP. |
status
Value | Description |
---|---|
PENDING_SERVICE_AUTHORIZATION | Transaction wating for service authorization. |
PENDING_USER_PAYMENT | Transaction waiting for user payment. |
PROCESSING | Transaction beeing processed. |
SETTLED | Transaction settled. |
COMPLETED | Transaction completed. |
CANCELED | Transaction canceled. |
DUPLICATED | Transaction duplicated. |
FAILED | Transaction failed. |
CHARGEBACK | Transaction chargeback. |
REFUNDED | Transaction refunded. |
channel
Value | Description |
---|---|
ANDROID | Android channel type used. |
IOS | IOS channel type used. |
platform
Value | Description |
---|---|
ANDROID | Android channel type used. |
IOS | IOS channel type used. |
market
Value | Description |
---|---|
NATIVE | Native market was used. Android or iOS. |
WEB | Web market was used. |
Broker Transaction Details (Server-to-Server Broker API)
This API is used to obtain information about the transaction using the TxID
. This is used to understand the details of the transaction which the User will report in case there are any issues.
To use this API. use the following endpoint (same endpoint is use for both INAPPs
and Subscriptions
):https://api.catappult.io/broker/8.20241201/transactions?hash={TxID}
The data received from this endpoint is:
{
"next": null,
"items": [
TransactionObject,
]
}
The TransactionObject
is defined in here.
Updated 14 days ago