#Russ
1 messages · Page 1 of 1 (latest)
Since it's a custom flow, any additional fields added would be done by you (can be an html form or whatever). It would be separate from the Stripe Payment Element
So there is no way to append the username to the metadata once the checkout session has been created?
Well in Checkout Sessions, you can't add your own field since it's a hosted solution
You'd need to do this with Elements
Although, I recommend reaching out to support to let them know you're interested in having a custom field within Checkout. A number of users have expressed interest in this, so they may be able to accommodate something
If I used a cutsom payment flow could I append the username to the metadata of the payment intent?
Hi yeah you could do that
Would just need to update the PI with the metadata: https://stripe.com/docs/api/payment_intents/update#update_payment_intent-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok so using the stripe example https://stripe.com/docs/payments/quickstart, when the button is clicked in checkoutform.jsx I would
- catch it with e.preventDefault()
- then get the value of my custom username field with a dom query
-then update the payment intent metadata and finally return the handleclick?
Yes that sounds right
Ok, thank you!