Headless SDK
Juspay Hyperswitch is designed to facilitate the integration and management of payment-related functionalities in a decoupled or headless architecture with flexibility to customize your checkout UI.
Customize the payment experience using Headless functions
import { HyperProvider } from "@juspay-tech/hyperswitch-react-native";
function App() {
return (
<HyperProvider publishableKey="YOUR_PUBLISHABLE_KEY">
// Your app code here
</HyperProvider>
);
}import { useHyper } from "@juspay-tech/react-native-hyperswitch";
const { initPaymentSession } = useHyper();
const [paymentSession,setPaymentSession] = React.useState(null);
const initializeHeadless = async() => {
const { clientSecret } = await fetchPaymentParams();
const params = {clientSecret:clientSecret}
const paymentSession = await initPaymentSession(params);
setPaymentSession(_ => paymentSession)
};
useEffect(() => {
initializeHeadless();
}, []);
options (Required)
Description
options (Required)
Description
Last updated
Was this helpful?

