This is an app built to demonstarte how to connect Stripe to your Koombea React Native project.
- Create a stripe account here.
- This integration requires endpoints on your server that talk to the Stripe API. You can use this git repo to test your work locally.
To initialize Stripe in your React Native app, either wrap your payment screen with the StripeProvider component, or use the initStripe initialization method. Only the API publishable key in publishableKey is required. The following example shows how to initialize Stripe using the StripeProvider component.
import { StripeProvider } from '@stripe/stripe-react-native';
function App() {
return (
<StripeProvider
publishableKey="YOU_CAN_GET_THIS_FROM_THE_API"
urlScheme="your-url-scheme" // required for 3D Secure and bank redirects
merchantIdentifier="merchant.com.{{YOUR_APP_NAME}}" // required for Apple Pay
>
// Your app code here
</StripeProvider>
);
}
Once stripe has been initializated please use the following documentation resources for help: