'Difference between Checkout.Session and PaymentIntent in STRIPE?

I am new to coding so bear my stupid questions. I am working on STRIPE and using NODE JS. Stripe docs are difficult to understand, can anyone help me explaining the difference between Checkout.session.create and PaymentIntent.

Thanks.



Solution 1:[1]

Please refer to the Stripe documentation at here

You create Session for fully hosted (pre-built) payment page.

You create PaymentIntent when you need to integrate your custom payment flow.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 MasterWil