Card Widget (Beta)
Integrate Card widget to your React Native App using hyperswitch-node
Last updated
Integrate Card widget to your React Native App using hyperswitch-node
Last updated
Currently in beta please contact to get early access
Hyperswitch recommends using the PaymentSheet instead of the Card Widget. Using only the Payment Element, you can accept multiple payment methods.
HyperProvider
to your React Native appUse HyperProvider
to ensure that you stay PCI compliant by sending payment details directly to Hyperswitch server.
HyperProvider
To initialize Hyperswitch in your React Native app, wrap your payment screen with the HyperProvider component. Only the API publishable key in publishableKey is required. The following example shows how to initialize Hyperswitch using the HyperProvider component.
Make a network request to the backend endpoint you created in the previous step. The clientSecret returned by your endpoint is used to complete the payment.
Use Hyperswitch CardField
component to display a text field to securely collect card details. By using CardField
, you guarantee that sensitive card details never touch your server.
Pass the PaymentIntent’s clientSecret
to initPaymentSession() function. Hyperswitch SDK automatically collects the card details from CardField
component.
To confirm the Payment, integrate a "Pay Now" button within the checkout page, which, when clicked, invokes the confirmWithCardForm() function. This function will return an asynchronous payment response with various payment status.
Congratulations! Now that you have integrated the Card Widget