IntegrateIntegration modesHeadless CheckoutSDK ReferenceFunctionscreateHeadlessCheckoutOn this pagecreateHeadlessCheckoutfunction createHeadlessCheckout<T, H>( sessionParams, hooks?, apiPaths?): Promise<PurseHeadlessCheckout>; Creates and initializes a new headless checkout instance. Use this function to start a new payment session with the Purse checkout system. Type Parameters Type ParameterT extends | string | PurseHeadlessCheckoutV1ParamsH extends PurseHeadlessCheckoutHooks Parameters ParameterTypeDescriptionsessionParamsTThe checkout session configuration.hooks?HOptional lifecycle hooks to customize checkout behavior See PurseHeadlessCheckoutHooks for available hooksapiPaths?APIPathsdev purposes only to override the APi URL's' Returns Promise<PurseHeadlessCheckout> A promise that resolves to a configured checkout instance Throws PurseHeadlessCheckoutError EXPIRED_SESSION If the session used to create the headless checkout instance is expired. PurseHeadlessCheckoutError INVALID_INIT_PARAMS If the parameters used to init the headless checkout are invalid. PurseHeadlessCheckoutError UNKNOWN_ERROR If tan unknown error is caught during the creation of the headless checkout instance.