#valeriepomerleau-help

1 messages · Page 1 of 1 (latest)

austere fable
#

How to pass additional details (e.g., user email) that I've added to the form

It depends on where you want to save those additional details. And, what do you want to save those additional details for?

If you want to save it on the PaymentMethod - then you're going to need to update it after it's been created : https://stripe.com/docs/api/payment_methods/update#update_payment_method-billing_details-email

If you want to save it on the Customer, then you're going to need to create the Customer first : https://stripe.com/docs/api/customers/create#create_customer-email

How do I retrieve the completed transaction details so that I can store them in my SQL database?

You should rely on webhooks :
https://stripe.com/docs/webhooks

wanton beacon
#

Thanks, Alex! I was thinking about saving the email address as a way to search the payments and associate them with the customer without creating full accounts. My app is for one-time purchases only (not subscriptions), and I wasn't planning on saving payment methods.

If I can create a customer with just an email address, that might work.

As for retrieving transaction/payment details, what is the key that I should save in my database? I have a feeling I shouldn't store the client-secret, so wondering if the transactions have an ID that I can retrieve?

austere fable
#

i think i would suggest you create a customer, you can choose not to attach the payment method to the customer

wanton beacon
#

Great, thanks! I'll give it a go

austere fable
#

btw, have you considered Stripe Checkout instead?

wanton beacon
#

I did, but I wanted more customization for this particular project.

austere fable
#

aaah, alright then! just wanted to make sure you weren't missing out on an easier integration option if it fits your use case

wanton beacon
#

I partly picked the Payment Element for the learning experience too, even though the learning curve is a bit steep 😄

#

thanks for your help!