#nero_1113_49637
1 messages · Page 1 of 1 (latest)
Hello there! Which UIs/APIs are you using for one-time payments? Checkout? Payment Links? Payment Elements?
I am using checkout in python.
when payment is success, I have to trig some function.
Nice! Then I recommend you take a look at this doc: https://stripe.com/docs/payments/checkout/fulfill-orders
Thanks
hi
checkout_session = stripe.checkout.Session.create(
line_items=[
{
'price': 'price_1ONyxcAUc2UvaLkJ0p6Ik8dc',
'quantity': 1,
},
],
customer_email=request.user.email,
mode='payment',
success_url=settings.MAIN_DOMAIN + '/',
cancel_url=settings.MAIN_DOMAIN + '/setting',
)
this is code for checkout creation.
How to detect whether this is succeeded.
You do it async via a webhook as per the doc I shared explains
could you plz share sample code?
There's code on the page