Skip to content
Discussion options

You must be logged in to vote

Small correction to the Gitdog answer above: the token source is right, but I would not recommend passing the purchase token/JWS from the frontend on every premium API request.

In OpenIAP, purchase.purchaseToken is the unified token field:

  • iOS: StoreKit 2 JWS
  • Android: Google Play's opaque purchaseToken

In expo-iap, the current API is verifyPurchaseWithProvider with provider: "iapkit" (there is not a separate verifyPurchaseWithIAPKit export today). If you want to verify with IAPKit directly from an Expo app after purchase/restore, it looks like this:

import { Platform } from "react-native";
import {
  kitApi,
  verifyPurchaseWithProvider,
  type Purchase,
} from "expo-iap";

const IAPKIT…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@gitdogbot
Comment options

@hyochan
Comment options

Comment options

You must be logged in to vote
2 replies
@timolino13
Comment options

@hyochan
Comment options

Answer selected by hyochan
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ question Further information is requested 💬 discussion Discuss issues expo-iap expo-iap library kit IAPKit (receipt-validation SaaS)
2 participants