#arielbo
1 messages · Page 1 of 1 (latest)
hello
please orakaro, could you guide me, whats wrong in my code,
thanks a lot in advance
billing_details seems to under payment_method_data https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data-billing_details
yes I see this, in this case whats bad in my code sorry
and thank you for your help
maybe payment_method_data: { billing_details: {
name: document.getElementById("s_name").value,
phone: document.getElementById("s_phone").value
} } ?
yes' let's try that
any you need to see the error log or console. It would tell you better than me what's wrong 🙂
works good
thanks a lot you always are very helpful !!
another ask is possibe add metadata confirmPayment ?
Not possible afaik. Please use Update PaymentIntent (server-side) to add meta-data before confirming
how can I do this ?
Um simply call the Update PaymentIntent API? 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.
I see, and another ask , please I need to disable receipt_email in paymentintent is possible? I dont would to send stripe receipt to my customers either my own receipt
If you don't specify receipt_email I believe we won't send an email
Yes I dont specify its enough? or maybe I need to put false in some place
Orakaro
async function handleSubmit(e) {
e.preventDefault();
setLoading(true);
const paymentIntent = await stripe.update(
clientSecret, { metadata: { order_id: '674335' } }
);
const { error } = await stripe.confirmPayment({
elements,
confirmParams: {
dont work update 😦
Hey that's client-side. The Update PaymentIntent needs to be called server-side
You would need to make an ajax call from your client-side to server-side, then in server-side make the call of Update PaymentIntent API to add metadata
const paymentIntent = await stripe.update(
clientSecret, { metadata: { order_id: '674335' } }
);
yes now I understand
api call
in my server side
can I send parameters in confirmPayment({
elements,
confirmParams: {
// Make sure to change this to your payment completion page
return_url: "https://www.website.com/" + s_event_id + '?email' + s_email+'&name'+s_name,
?
Um you can try I guess
Yes in webhook
I think there is no limit
guest user can be in the future customers? how would be customer ?
I don't think there is a limit
When I create webook I see that I have versions api
which impact have this in all my code ? I have now 2020 -08-28 but I see that now exist 2022-11-15?
Generally we recommend to use the latest version
You can upgrade your account's API version here: https://dashboard.stripe.com/test/developers (Test mode)
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Keep in mind that after you go live, upgrading API version could introduce breaking changes, and you may want to test before upgrading version
but if you are only testing, let's jump to the latest API version