stripe-cut.mp4
This example shows how to use Stripe in your app and website.
npx create-expo -e with-stripe
- Set the app.json
merchantIdentifierto a value starting withmerchant., then runeas build -p iosto register the merchant identifier with Apple. - Set the
.envvalues with your Stripe keys. - Follow the setup steps in the Stripe docs to ensure you have Apple configured correctly.
- Start the app with:
npx expo
Deploy on all platforms with Expo Application Services (EAS).
- Deploy the API Routes and website:
npx eas-cli deploy— Learn more - Deploy on iOS and Android using:
npx eas-cli build— Learn more
This project has EXPO_UNSTABLE_DEPLOY_SERVER=1 enabled in the .env file. This will publish the server during the build process and set the preview URL as the origin for the app. This will ensure the app always uses a version of the server that is in sync with the app.
Alternatively, you can set the origin in the app.json and manually publish the server to have a more evergreen system where the native app always calls into the latest stable server deployment.
- Learn more about React Native Stripe.