1👍
Create two routes that return JSON, one for ‘Create an Order’ and one for ‘Capture Order’, documented here. You can use the Checkout-Python-SDK.
Pair your two routes with the JS front-end: https://developer.paypal.com/demo/checkout/#/pattern/server
Source:stackexchange.com