Skip to content

Snap4ID checks purchases

Documents @snap4id-sdk/purchase-verifier 1.0.0 · @snap4id-sdk/app-embed 1.0.0

When Snap4ID checks purchases you run no server. Your app hands the store receipt to the page; the page posts it to Snap4ID’s verifier (https://snap4.id/verifier), which checks it and unlocks the job.

This requires Snap4ID to know your store specifics: a receipt only proves something when it is checked against your app and your products. You send them once at onboarding and Snap4ID configures them. After a receipt passes, the verifier asks Snap4ID to unlock the job with a request signed by a key Snap4ID holds for your partner id.

Item Example Where you find it
iOS bundle id pl.example.app Xcode target / App Store Connect
Android package name pl.example.app applicationId / Play Console
Product ids pl.example.app.idphoto (one consumable per price, per store) App Store Connect / Play Console in-app products
Play licensing public key MIIBIjANBgkqh… (base64 RSA) Play Console → Monetization setup → Licensing
Accepted environments production; a sandbox window for App Review or your own testing (until a date) your release plan
Platforms iOS, Android, or both

Send only these public identifiers: no store secrets, no App Store Connect keys, no service-account files. Retired product ids stay listed for 30 days so retries of old purchases still verify.

  • Records these details in your partner configuration and sets it to “Snap4ID checks purchases”.
  • Holds the verifier’s signing key for the unlock: you never see or manage a key with this option.
  • Authenticates the page to the verifier itself (App Check): nothing for your app to configure.
  • Opens and closes sandbox windows on request (they expire by themselves).
  • React Native: nothing extra. Leave onVerifyPurchase out of the client config.
  • Native host: answer purchase.result { status: 'succeeded', receipt } and finish the purchase when job.completed arrives (host contract).

Either way the receipt is checked on Snap4ID’s server, never in your app.

Want the same check on your own infrastructure? You check: our verifier server.

Code Usual cause
binding_mismatch the purchase was not made with appAccountToken / obfuscatedProfileId = paymentRef
unknown_product a product id Snap4ID does not have: send the new id
environment_not_allowed a sandbox purchase against production with no sandbox window, or an Xcode / fake receipt
invalid_receipt wrong bundle id / package name, wrong Play key, or a revoked purchase

The page reports a final refusal as unlock_rejected; all codes: error codes.