#james_35976

1 messages · Page 1 of 1 (latest)

wraith ermineBOT
#

Hello james_35976, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
james_35976-stripe-tax-also-webhooks, 2 hours ago, 74 messages
james_35976, 16 hours ago, 23 messages
james_35976, 16 hours ago, 43 messages
james_35976, 20 hours ago, 5 messages
james_35976, 1 day ago, 7 messages
james-checkout-php, 1 day ago, 103 messages
and 1 more

gloomy breach
#

I have created a sessionpayment but got a payment_intent.succeeded callback

#

it was checkout.session.completed in test mode

spring imp
#

Hello! The payment_intent.succeeded Event fires when a Payment Intent succeeds, and the Event contains the Payment Intent. The checkout.session.completed Event fires when a Checkout Session is successfully completed and contains the Checkout Session.

gloomy breach
#

i use same code in Formal environment

wraith ermineBOT
gloomy breach
#

in test mode I got a checkout.session.completed
which is what i expect

#

but in Formal environment, I got a payment_intent.succeeded

sacred badger
#

can you share the Checkout Session id? it'll have the prefix cs_live_

gloomy breach
#

yes

#

cs_live_b1qwRuflgKSf6ivspmVWWKn4WirgTx5wg2yvMyvU1unGe41dIoA9IVIusO

#

"object": "checkout.session",

sacred badger
#

your livemode webhook endpoints are not listening for the checkout.session.completed event

#

you should configure it to listen for the checkout.session.completed event

gloomy breach
#

ok.

#

customer paid also trigger the payment_intent.succeeded?

#

does checkout.session.completed means the payment is success ?

sacred badger
#

underlying a Checkout session with mode=payment is a PaymentIntent. So yes, for payments, it'll also trigger the payment_intent.succeeded event

gloomy breach
#

how to disable async payment

sacred badger
#

you can enable or disable payment methods in your Dashboard settings > Payment Methods

#

right now it looks like you're only accepting cards, so you don't have to deal with async payment methods

gloomy breach
#

I just noticed checkout.session.completed
not equal payment successed

#

even the payment failed it still trigger checkout.session.completed event, right?

sacred badger
#

do you have an example Checkout Session id where you're seeing this?

gloomy breach
#

cs_test_a1QZ9jTRmborXA3HUhMMZpUjXcih2I73xJHRX6otVymBxnNJog3vtjqDKw

sacred badger
#

but the payment is successful

gloomy breach
#

i need to check the "payment_status” to determine the status ,right?

#

receive the session.completed , means buyer paid ? I do not think so.

sacred badger
#

if you're only accepting card payments, you can depend on checkout.session.completed event to indicated that payment is successful

gloomy breach
#

got it.

#

What happens if it is failed

#

we never receive any callback if failed. right?

#

How can I get the radar score(risk score) ? and how can I get the payment card last 4 digits

sacred badger
#

we never receive any callback if failed. right?

it's on a hosted Checkout page, the hosted Checkout page will automatically inform the customer that the payment failed. What are you trying to achieve with a callback if a payment fails?

gloomy breach
#

How can I get the radar score(risk score) ? and how can I get the payment card last 4 digits

sacred badger
#

How can I get the radar score(risk score) ?

You can get it from the Charge object. : https://stripe.com/docs/api/charges/object#charge_object-outcome-risk_score. When you receive the checkout.session.completed event, you can make a request to retrieve the PaymentIntent in payment_intent and expand [0] latest_charge

[0] https://stripe.com/docs/api/expanding_objects