#nickderobertis

1 messages ยท Page 1 of 1 (latest)

safe fjordBOT
winged vapor
#

Next time feel free to use your existing thread if it's still open ๐Ÿ™‚

silent tulip
#

oh ok cool, just thought I would use a different one because it's a different question

winged vapor
silent tulip
#

payment intent, save afterr payment

winged vapor
#

Gotcha - so what you want to be comparing instead is the generated_card, not the card_present Payment Method that you get from the reader

silent tulip
#

Hmm, ok. I'm trying to figure out how we can get this info in our current flow.

#

Because right now we are getting the payment method that was used by listening to payment_intent.success events by webhook

#

That just gives us the ID of the payment method, which we then use to query for the payment method to get the additional details. But I don't see anything like generated_card in that response. Also don't see anything like that in terminal_reader webhooks. We are using the server-driven integration.

winged vapor
#

The generated_card would be somethign you have have to pull from the Charge

#

So if you're listening for payment_intent.* events you should be able to retrieve the charge (if you're on the most recent API version you'd get the charge ID back in latest_charge), and after retrieving that you should be able to get back the generated_card

silent tulip
#

Ok, that makes sense. Thanks.

safe fjordBOT
silent tulip
#

Will generated_card only be set for reader transactions, not for regular payment intent transactions via Stripe SDK? Trying to think through how I can separate the events in the webhook handling, to handle both reader-generated and regular payment-flow generated events and get the card we can charge later either way

winged vapor
#

Yup - generated_card is only for card-present transactions

silent tulip
#

Or I guess the whole card_present won't be set, card will be set instead?