#kanonhian
1 messages · Page 1 of 1 (latest)
hello
Hi there!
hi
I am working in a form for paying through stripe elemnts
now I need to add metadata to the payment intent
so I can catch it in a webhook
basically because user pays in a landing page out of our system
and we subscribe through hooks
Got it. You can include PaymentIntent metadata as part of confirmParams: https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams
cool
another question
if I wanted to register a new customer
on the successfull paymentintent
is there a way of doing it?
That's up to you. You can have the end user create a customer before they pay and include that customer when creating the PaymentIntent: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-customer
You'll need to also use setup_future_usage, as mentioned in the docs
Or you could use setup_future_usage when confirming the PaymentIntent and then make a separate call to attach the resulting PaymentMethod to a customer you create: https://stripe.com/docs/api/payment_intents/confirm#confirm_payment_intent-setup_future_usage
great