Add an In-App Subscription
In-App Subscriptions are currently under development and will be released soon. This endpoint may change before launch.
You can add In-App Subscriptions to your application on Aptoide Connect via the Developer Console or our API as described below.
Endpoint
| Method | URL |
|---|---|
| POST | https://ws.catappult.io/api/applications/{applicationName}/subscriptions |
Authentication
To access this API, you need to have an active account subscription on Aptoide Connect and authenticate with an API key (check here how to generate one).
In-app subscriptions can only be created by accounts of type Developer.
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Api-Key | string | Required | Used to authenticate your API requests. The value is your Aptoide Connect API key. |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
applicationName | string | Identifies the application for which the in-app subscription will be created. (e.g. com.example.test). |
Query Parameters
Parameter | Type | Required | Description |
|---|---|---|---|
|
| Optional (default: | Specifies the operating system for which the in-app subscription should be added for the given application. Possible values: |
Body Parameters
All parameters must always be sent as form data (multipart/form-data), even when you’re providing URLs instead of uploading files.
JSON requests are not supported. Use the -F flag in cURL to send each field.
Notes:
- If no country-specific retail price is defined, the final charge will be automatically converted from the reference price at the time of purchase.
- All countryPrices parameters (
countryPrices[<country_code>][...]) can use any supported ISO 3166-1 alpha-2 country code. - All locale parameters (
locales[<language_code>][...]) can use any ISO 639 language code. You can provide locale parameters for multiple languages at once, but only one can be set as the default.
| Parameter | Type | Required | Description |
|---|---|---|---|
sku | string | Required | Unique identifier for the in-app subscription (e.g., subscription01). |
period | string | Required | Period in the ISO 8601 format. See available periods. |
gracePeriod | string | Optional | Grace period in the ISO 8601 format. See available grace periods. |
freeTrialPeriod | string | Optional | Free trial period, in the ISO 8601 format. See available free trial periods. |
referencePriceCurrency | string | Required | ISO 4217 currency code of the reference price. See available currency codes . |
referencePriceAmount | string | Required | Numeric value of the reference price. |
countryPrices[<country_code>] | string | Optional | Price in the specified country. |
locales[<language_code>][title] | string | Optional | Title in the specified language. |
locales[<language_code>][description] | string | Optional | Description in the specified language. |
locales[<language_code>][isDefault] | boolean | Optional | Set this language as default. |
Response
Success
If the API call returns an HTTP 200 status code, the request was successful and the in-app subscription has been added to your application.
Examples
Example for the in-app subscription subscription01 in the app com.example.app, with a period of 1 week, grace period of 0 days, reference price of 1 USD,a country-specific price for Portugal (PT) set to 2 EUR, and localized content for Spanish (es) and Portuguese (pt) (cURL):
curl -X POST "https://ws.catappult.io/api/applications/com.example.app/subscriptions?operatingSystem=android" \
-H "Api-Key: YOUR_API_KEY" \
-F "sku=subscription01" \
-F "period=P1W" \
-F "gracePeriod=P0D" \
-F "referencePriceCurrency=USD" \
-F "referencePriceAmount=1" \
-F "countryPrices[PT]=2" \
-F "locales[es][title]=Titulo" \
-F "locales[es][description]=Descripcion" \
-F "locales[es][isDefault]=true" \
-F "locales[pt][title]=Titulo" \
-F "locales[pt][description]=Descricao" \
-F "locales[pt][isDefault]=false"