#tree_checkout-email
1 messages ยท Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- tree_subscription-checkout, 1 day ago, 25 messages
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1275865096286900224
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
sorry for troubling last time i ask didnt work
https://checkout.stripe.com/c/pay/cs_test_a187gJ89joXo82vKn1Cnz1KZAr8V5gRtPy5qJAifD965VX25OkfNJNAk1k#fidkdWxOYHwnPyd1blpxYHZxWjA0T2wzX3RWT0xAQ2dUV3BNQ1Fpf01TcDcyPUZLX3ZsRn0zaWFQck1OX1E1c0pvVEw3UGBsdjdRN2IzSTVifTRNTX13fHV%2FVT1RNFNXYWlofGJgU2hUdnBENTVgdEBcYWlrXScpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl?prefilled_email=jenny%40example.com if i put this prefilled it doenst work moreover it broke the link // this specific part ?prefilled_email=jenny%40example.com broke the link if u remove the link work fine
@maiden kraken
what does "prefill doesn't work broke link" mean?
ah the page doesn't load at all? I think you did URL encoding wrong. Can you share your exact code?
Share the URL of that doc instead of a full screenshot of your computer
@app.post('/create-checkout-session')
def create_checkout_session():
domain_url = 'http://localhost:8810'
try:
checkout_session = stripe.checkout.Session.create(
success_url=domain_url + '/#/record',
cancel_url=domain_url + '/#/info',
payment_method_types=['card'],
mode='payment',
line_items=[{
'price': 'price_1JjtQCSJIEFbQRuHHl4wmzHh',
'quantity': 1,
}]
)
return checkout_session.url
except Exception as e:
raise HTTPException(403, str(e))
in frontend i call like this ```js
window.location = url+"?prefilled_email=panda@gmail.com"
why prefilled broke the link?
like i have in my backend user email dont wanna retype them
can i ask something if we use this stuff stripe.checkout.Session.create( does we can pass here email as well?
since it just override ur internal part like success url and cancelurl?
that doc is for PaymentLinks, you're using Checkout Session so that can't work
If you want to pre-fill the email you need to pass it server-side when you create the Checkout Session in the customer_email parameter https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-customer_email
tree_checkout-email
ah sec i gonna try now last time i fell sleep
work like a charm
1 last thing i was unfaimilar i could not able to see how much price someone paid sec i will provide little screenshot
it doesnt show much payment user has paid
but the sum was just 10dollar
This is raw JSON. It's text, that we can share in text developers to developers. Sorry but pictures of code always baffle me ๐
The easiest is to look at the underlying PaymentIntent associated with the Checkout Session. You have payment_intent: 'pi_12345' in that picture so you can retrieve that directly and get the information you're after.
You can even expand it while you retrieve the Checkout Session. For that make sure to read https://stripe.com/docs/expand and watch our video https://www.youtube.com/watch?v=m8Vj_CEWyQc
Overall you also have amount_total on that picture you shared so I don't really get your question
ah i think i got u it i should create a dictonary with price and link
thanks alot huge help >,</
nothing all good ></ now