We are unable to complete purchases in Amazon IAP DevTest mode. The purchase flow is initiated successfully, but the response returns an invalid result with receipt: null and responseCode: 4.
This issue is blocking current development, as we cannot test IAP flows in DevTest mode.
This problem was previously encountered and resolved after upgrading to SDK version 22, but it has now started occurring again.
App Name: frndly tv
Bug Severity
Blocks current development
2. Steps to Reproduce
Launch the app on Vega / Fire TV device
Ensure IAP is configured in DevTest mode
Initiate purchase for SKU: ftv-classic-monthly
Observe logs and purchase response
3. Observed Behavior
Purchase flow starts successfully
SDK returns invalid response
Receipt and user data are null
Response code is 4
App logs indicate production mode instead of DevTest
Logs:
[INFO] Response received from IAP Service
requestId: 861147c5-b27b-4a60-a29d-ce8407215bd1
[ERROR] Invalid response received from IAP Service
[INFO] IAP config file not found:
Path: /scratch/amazon.config.json
→ App is running in PRODUCTION mode
[INFO] Purchase timing:
total time → NaN ms
Response:
{
receipt: null,
requestId: "861147c5-b27b-4a60-a29d-ce8407215bd1",
responseCode: 4,
userData: null
}
4. Environment
Please fill out the fields related to your bug below:
Thank you for the detailed bug report on IAP devtest payment.
From your logs, the key indicator is:
[INFO] IAP config file not found:
Path: /scratch/amazon.config.json
→ App is running in PRODUCTION mode
This means the DevTest configuration is not being picked up, causing the app to fall back to production mode, which explains the responseCode: 4 and null receipt/userData.
Could you please confirm:
Is the amazon.config.json file included in your app package and placed in the correct location?
Has anything changed in your build/packaging process since the issue was last resolved with SDK 0.22?
Can you share full device logs (journalctl) captured during the purchase attempt so we can investigate further?
Our team is investigating this issue and will provide an update as soon as we have more information.
Hi @amen ,
1.Yes,amazon.config.jsonis present in our project root with the content {"debug.amazon.sandboxmode": "debug"}. However, from the device logs, we can see it’s not being found at /scratch/amazon.config.json on the device. This suggests the file is not being packaged into the .vpkg during the build process. Could you please clarify the correct way to ensure amazon.config.json gets placed at /scratch/ on the device for Vega/Kepler builds? Is there a specific manifest.toml configuration or build step required?
2.No changes have been made to our build/packaging process since the issue was last resolved with SDK 0.22.
Regarding device logs: On Vega devices, journalctl is not available in the developer shell — we use loggingctl log -f instead. We have attached the device logs captured during the purchase attempt.
The amazon.config.json file is not being packaged into the .vpkg during the build. Could you try pushing it directly to the device using the vda commands below and confirm if it resolves the issue?
HI @amen ,
we have tried following commands ,but still same issue reproducing , unable to do payments
1.vega exec vda push ./amazon.config.json /tmp/
./amazon.config.json: 1 file pushed, …kipped. 0.5 MB/s (41 bytes in 0.000s)
2.vega exec vda shell ################################################## ##### Welcome to Developer mode Shell ##### ################################################## sh(com.amazon.dev.shell):/$cp /tmp/amazon.config.json /tmp/scratch/com.tvap p.frndlytv/
cp: /tmp/scratch/com.tvapp.frndlytv/: Is a directory
sh(com.amazon.dev.shell):/$ ls scratch
amazon.config.json