Development mode
Test purchases and access in debug builds without the App Store or Google Play.
Development mode lets a debug build buy from a simulated store while Voidhash processes the purchase
for real: products, perks, receipts and analytics all behave as in production. Use it to build your
purchase flow before you connect a store. Its purchases are recorded in the test environment and
never unlock production; see Environments.
Turn it on
Create the client with dev: true and the test publishable key in debug builds:
import { createVoidhashClient } from "@voidhash/react-native";
export const voidhash = createVoidhashClient(__DEV__ ? "vh_pk_test_..." : "vh_pk_...", {
dev: true,
});devonly works in debug builds. Release builds ignore it and use the real store.- Voidhash refuses simulated purchases made with the production key.
- Enable simulated purchases in Settings → General must be on. It is on for new projects.
- Subscription products need a billing duration, which sets their renewal and expiry dates. No store mapping is needed.
- Observer mode blocks simulated purchases like any other, with
READ_ONLY_PURCHASE_NOT_ALLOWED.
A purchase shows a confirmation sheet instead of the store sheet. After you confirm, the SDK records
the purchase with Voidhash and refreshes the person, so useHasPerk sees the new perk.
Test prices
Simulated products use fixed USD prices:
| Product | Price |
|---|---|
| Weekly subscription | $4.99 |
| Monthly subscription | $9.99 |
| Quarterly subscription | $24.99 |
| Six-month subscription | $39.99 |
| Annual subscription | $49.99 |
| Non-consumable | $19.99 |
| Consumable | $4.99 |
A subscription without a duration is simulated as monthly, with a warning.
Simulate renewals and refunds
Move a person's simulated purchases through their lifecycle with the CLI. Each action applies once, however often you run it.
voidhash sandbox view user_123
voidhash sandbox renew user_123
voidhash sandbox grace-period user_123 pro_monthlyThe CLI isn't published to a package registry yet. The same actions work through the MCP server and the HTTP API; see Simulate renewals, expiry and refunds.
| Command | Effect |
|---|---|
sandbox view <person> | Shows the person's simulated subscriptions, purchases and access. |
sandbox renew <person> [product] | Renews a subscription for another period. |
sandbox expire <person> [product] | Ends a subscription now. |
sandbox grace-period <person> [product] | Starts a 3-day billing grace period. |
sandbox refund <person> [product] | Refunds a one-time purchase; its access ends. |
sandbox revoke <person> [product] | Revokes a purchase or subscription. |
sandbox reset | Deletes every simulated purchase in the project. |
<person> is a distinct ID, email or person ID. Pass [product] when the person has several.
In Studio, choose Test in the environment switcher to see simulated purchases and their revenue.
Delete simulated purchases in Settings → General does the same as sandbox reset; it never
touches production, store sandbox, Stripe test mode or payment source test purchases.
Next steps
- Test with store sandboxes (Help center)
- Connect the App Store (Help center)
- Connect Google Play (Help center)
- Go-live checklist
Something wrong or missing on this page? Tell us by email or on Discord.