VoidhashDocs
DevelopersHelp centerGuidesAPI reference
Dashboard
Get started
Introduction
Quickstart
How Voidhash works
Glossary
Versions and releases
Concepts
Teams, projects and environments
API keys
Products and perks
Offers
Subscription lifecycle
People and identity
Groups
Events
Features
Paywalls in your app
Feature flags and A/B tests
Paywall components
Push notifications
Ad attribution in your app
Client SDKs
React Native
Swift
Kotlin
Web
Your backend
Node.js
PHP
Go
Rust
Other languages
Payment sources
Forward store notifications
Developer tools
CLI
MCP server
Query analytics with VoidQL
React Native SDK
React Native quickstart
Display a paywall
Make and restore purchases
Check access
Identify users
Evaluate feature flags
Capture analytics
Groups
Track screens
Development mode
React Native SDK reference
Errors
Troubleshooting

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:

src/lib/voidhash.ts
import { createVoidhashClient } from "@voidhash/react-native";

export const voidhash = createVoidhashClient(__DEV__ ? "vh_pk_test_..." : "vh_pk_...", {
  dev: true,
});
  • dev only 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:

ProductPrice
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_monthly

The 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.

CommandEffect
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 resetDeletes 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.

PreviousTrack screensNextReact Native SDK reference

On this page

Turn it onTest pricesSimulate renewals and refundsNext steps