Make your first payment.
Try it first
Run a recovery-safe test payment#
You need Node 22 and a new folder for this sandbox exercise.
- Install the pinned SDK and save the complete example as t0.mjs.
- Run node t0.mjs and keep .playmos-demo-purchase.json.
- Run it again and compare the payment ID.
Check your result The second run verifies the original purchase instead of creating a second payment.
Install the SDK, make a test payment and inspect a real receipt. No wallet is needed for the public sandbox IAP path.
1. Install the SDK#
npm install @playmos/sdk@0.3.38
Examples target SDK 0.3.38. For Node, use a runtime supported by the package’s engines; Node 22 is supported. The browser entry is @playmos/sdk. Webhook verification uses the server-only entry.
2. Create a payment#
Save the complete example as t0.mjs in your project. It saves a purchase key before calling pay(). The public sandbox key and settle: 'server' use the service’s Base Sepolia test signer.
node t0.mjs
The runner keeps .playmos-demo-purchase.json. After a payment ID exists, running it again verifies that same ID. Keep this file for recovery; intentionally use a new purchase file only for a new purchase.
3. Inspect the receipt#
Check the payment ID, status, transaction hash and verification source. If verification remains pending or degraded, retry the read; do not create another purchase.
Run this example4. Connect your backend#
Continue with payment verification and signed webhooks. Sandbox requests are bounded and rate limited. Real testnet IAP is capped at 1.00 test USDC per request; the playground defaults to 0.01.
If it did not work#
After a timeout, keep the purchase file. Verify its saved ID or retry with its original key.
Try one variation Rerun the saved example. Explain why its payment ID must stay the same.
Continue with the next guide →