Stripe checkout (with require_once) inside twig page

I am trying to get up and working Stripe within Grav (I don’t want to use official Grav-Stripe plugin as it includes shopping cart which in my case is unecessary).

So I am following examples on Stripe site and I need to require_once the code Stripe needs to initiate on page load. How can I achieve it inside twig page?

By require_once, I assume you mean the PHP function and intend to include a local library. This would have to be wrapped in a plugin, as Twig does not parse PHP directly.

Yes, that’s what I am trying to achieve. For now my workaround is to direct user to another pure .php page where to handle payments.