#Sarvesh
1 messages ยท Page 1 of 1 (latest)
How can we help?
I created payment intent request which status shows succeed BUT I can see
type: "invalid_request_error"
- also even after click on submit, user is still on the same page and can click multiple times so how to handle this submit click event?
- I did not received any webhook response on successful payment
Can you share the request ID (req_xxx) under request_log_url in the screenshot?
During PaymentIntent creation, payment_method is already set and Stripe uses it to complete the payment: https://dashboard.stripe.com/test/logs/req_BrIpHel6Nrgof0
It's invalid to confirm a successful payment since the payment has been made
I'd recommend removing pm_card_bypassPending from payment_method, so that you can collect payment method at frontend
ok, removed, I have set another 2 params
'confirm' => true,
'automatic_payment_methods' => ['enabled' => true],
are those fine or you want to suggest for ti?
if I remove payment_method, gets an error
You cannot confirm this PaymentIntent because it's missing a payment method. You can either update the PaymentIntent with a payment method and then confirm it again, or confirm it again directly with a payment method.
confirm will only be useful when you have a payment_method set. In your case that the payment method is not collected, you shoul remove confirm: true.
Since you're going to collect a payment method, payment_method and confirm should be removed
ok and 'return_url' => $baseUrl.'/intentdata',?
now it gets error for it.
The parameter return_url cannot be passed when creating a PaymentIntent unless confirm is set to true.
return_url should be set at confirm stage, so it can be removed as well
I'd recommend following Direct Charges doc on the parameters to set when creating a PaymentIntent for payment: https://stripe.com/docs/connect/direct-charges
ok, I will do same
on submit, I need to handle event of click and redirect to some page to user or stripe will redirect?
and how to get webhook with payment sucess/fail etc?
I'd recommend reading the Payment Element doc integration here: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
on submit, I need to handle event of click and redirect to some page to user or stripe will redirect?
On submit, your frontend should callstripe.confirmPaymentthat will handle remaining actions including redirection
how to get webhook with payment sucess/fail etc?
Webhook guide provide you how to set up a webhook and listen to an event: https://stripe.com/docs/webhooks/quickstart
ok, thank you
No problem! Happy to help ๐
They look fine to me. Account is for events on your account and Connect is for the events on connected accounts
ok, so user payments success/fail will get received on these connect webhook response right?
which fields to specifically change in the webhook to update the payment status as success/failed?
*check
Yes if the payment is a Direct Charge
ya, we are only doing direct charge payments only from the application
Yup! Then your server will receive Direct Charge payment intent events in Connect webhook endpoint
good, which fields to specifically check in the webhook response to update the payment status as paid/failed?
You may refer to the payment intent event types here: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-post-payment
In general,
payment_intent.succeeded: successful paymentpayment_intent.payment_failed: failed payment
great, thank you!
No problem! Happy to help ๐