Myket In-App Purchase FAQ
What is the difference between consumable and non-consumable products?
inapp products fall into two categories based on purchase behavior:
- Non-consumables: The user buys these once and retains ownership permanently, such as removing ads, unlocking a premium edition, or opening locked levels. Do not consume these products.
- Consumables: The user can buy these repeatedly, such as coins, fuel, or account credit. After a successful purchase, consume the product and deliver it to the user only after the consume request succeeds. This makes the product available for purchase again.
Does Myket support subscriptions and automatic renewals?
No. Myket In-App Purchase (ir.mservices.market) does not currently support subscriptions (subs) or automatic renewals. To offer a time-limited plan, such as a one- or three-month subscription, define it as a consumable (inapp) product, consume it after each purchase, and manage the user's expiration date on your own server.
Why should I query a user's purchases when the app starts?
Query purchases at startup for two important reasons:
- Restore non-consumables: If the user reinstalls the app or signs in on another device, the query lets you restore previously purchased non-consumables, such as a premium edition.
- Recover unfinished consumables (crash recovery): The user may have paid for a product, but the app could close or lose its connection before delivering the product or consuming the purchase. Querying purchases helps you find and complete these unfinished transactions.
When should I deliver a consumable product to the user?
Send the consume request first, and only add and persist the product (such as coins or fuel) in the user's balance after consume succeeds. This helps prevent one purchase from being delivered multiple times due to an error or connection loss.
Can changing the capitalization of packageName disrupt billing?
Yes. The package name (packageName or applicationId) is case-sensitive. The package name configured in your project must match the one registered in the Myket Developer Panel exactly; otherwise, connecting to the billing service or identifying products may fail.
What is the public key (Public Key / RSA Key), and how should I manage it?
Each app has a public key in the In-App Purchase section of the Myket Developer Panel. It is used to verify purchase signatures. Unlike a private key, a public key is not secret, but you must use the correct key for your app and avoid replacing it with an invalid value. For stronger security, preferably validate purchase signatures on your own server. Obfuscating or reconstructing the key at runtime may make it harder to extract, but does not secure billing by itself.
What is developerPayload, and what properties should it have?
developerPayload is an optional string sent when a purchase starts and returned to the app in the purchase receipt after the flow finishes. To use it:
- Do not use a value stored only locally on the same device; it will not be available on another device.
- Use distinct values for different users or orders so that a purchase can be associated with the right user or order.
- Store and validate the value and purchase token on your server.
- Do not treat it as proof of purchase ownership or a replacement for signature validation.
What is the maximum allowed length for developerPayload?
The maximum allowed developerPayload length is 800 characters. Keep it short; exceeding this limit may result in error code 6 (Error) or the payment window closing quickly.
Why does queryInventory return no products?
An empty result is commonly caused by one of the following:
- No product IDs (
skuIds) were provided: If the user has not purchased a product yet and you need product details such as price and title, enable product-detail retrieval (querySkuDetails) and pass the product IDs to the query method. - The SKU is undefined or inactive in the panel: Product IDs must be defined and active in the Myket Developer Panel, with exact capitalization.
- The product was consumed: Consumed products no longer appear in the user's active purchases.
- The package name does not match: The app's package name must match the one registered in the Myket panel.
Why do I get Signature verification failed (code -1003)?
This means the purchase signature returned by the market does not match the public key used by your app. Common causes include:
- The public key was copied incorrectly from the Myket panel or belongs to another app.
- An extra space or character was added when entering the key in code or plugin settings.
- In a multi-market project, the key for another market was used instead of the Myket public key.
What is 3:Billing Unavailable, and why does it happen?
This error means billing is currently unavailable on the user's device. Possible causes include:
- The user is not signed in to the Myket app.
- The installed Myket app version is outdated.
- In-App Purchase has not been enabled for the app in the Myket Developer Panel.
- The Myket app is not installed and, for web billing, Google Chrome is unavailable or the device has no internet connection.
- The manifest settings or market identifier (
ir.mservices.market) are not configured correctly.
What does Item Already Owned (code 7) mean, and how can I fix it?
This error occurs when a user tries to buy a product they already own before it has been consumed.
- For a non-consumable, check ownership by querying purchases and grant the product; do not offer the user another purchase.
- For a consumable, the previous purchase may not have been fully consumed. Query purchases with
queryInventory, consume the unconsumed purchase, and deliver the product so it can be purchased again.
What does SkuAlreadyConsumed or Item not owned (code 8) mean?
This error occurs when you try to consume a product or purchase token that has already been consumed or is not owned by the user. Make sure you do not call the consume method more than once for the same purchase.
What is another async operation ... is in progress (code -1011), and how can I prevent it?
The billing service allows only one asynchronous operation (such as a query, purchase, or consume) at a time. This error occurs if you start another operation before the previous one completes.
- Wait for the initial
queryInventoryto finish before enabling purchases. - While a billing operation is running, show a loading state and disable purchase buttons so repeated taps cannot send concurrent requests.
What causes Developer Error (code 5)?
- The app's
packageNamedoes not match the name registered in the Myket Developer Panel. - A purchase parameter, such as
skuoritemType, is invalid or empty.
What information should I send to technical support if I have an implementation issue?
- Before contacting support, check whether the same scenario works in the official sample app.
- Capture and send the complete Logcat output from the start of payment until the result, including
responseCodeand callback messages. EnableenableDebugLogging(true)before capturing the logs. - Provide the exact SDK or plugin version, platform or game engine, device model, Android version, and precise steps to reproduce the problem.