#james.ballow
1 messages · Page 1 of 1 (latest)
Hello 👋
Are you trying to integrate Stripe elements OR is Stripe Checkout a good fit too?
https://stripe.com/docs/payments/accept-a-payment
With Stripe Hosted Checkout, you don't build any front-end yourself, you create a session server-side and redirect users to that URL.
Stripe takes care of collecting the Payment method details securely
I just want to have a Stripe element (I think). I don't need a page, just a credit card form (I want it to join nicely, easily into my front-end's HTML). I don't want any page redirection whatsoever.
Gotcha in that case you can use the custom flow here which utilizes PaymentElement
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
PaymentElement is rendered in an iframe so there's not much you can do to extract PAN information from it. It allows you to tokenize the PaymentMethod securely and send it to Stripe
EUREKA! This is what I was looking for, I think. Only, now I have a question about the return values:
- If I wanted to write an API to communicate with my Stripe account (to fetch the transaction that just took place), and to gather information about that transaction (e.g., confirmation number), would doing this require me to be PCI compliant?
- Is it possible to catch some kind of ID (e.g., transaction ID) from the element upon transaction?
If I wanted to write an API to communicate with my Stripe account (to fetch the transaction that just took place), and to gather information about that transaction (e.g., confirmation number), would doing this require me to be PCI compliant?
Nope.
Is it possible to catch some kind of ID (e.g., transaction ID) from the element upon transaction?
You can use PaymentIntents objects for that.
Also we have webhooks that would allow you to listen for events (like a payment happening) in real time rather than needing to fetch the transaction data periodically
https://stripe.com/docs/webhooks
That way the information comes to you (rather than you fetching for it)
Okay, so to finish this up here is what I'm thinking to do:
- Use https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements <- This in my front-end
- Set up a webhook: https://stripe.com/docs/webhooks
- Then, have that webhook store the information from the webhook into a storage bucket.
Does this makes sense to you?
Correct
You have saved me HOURS of work trying to figure this all out. You've been super helpful. THank you so much