#nero_1113_49637

1 messages · Page 1 of 1 (latest)

hoary prismBOT
leaden arch
#

hi @foggy lotus

#

Please help me.

foggy lotus
#

Hello there! Which UIs/APIs are you using for one-time payments? Checkout? Payment Links? Payment Elements?

leaden arch
#

I am using checkout in python.

#

when payment is success, I have to trig some function.

foggy lotus
leaden arch
#

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.

foggy lotus
#

You do it async via a webhook as per the doc I shared explains

leaden arch
#

could you plz share sample code?

foggy lotus
#

There's code on the page