#nickderobertis
1 messages ยท Page 1 of 1 (latest)
Next time feel free to use your existing thread if it's still open ๐
oh ok cool, just thought I would use a different one because it's a different question
So for your question - when you say you "previously saved via the reader", how did you save it? DId you use a setupintent like we talk about here (https://stripe.com/docs/terminal/features/saving-cards/save-cards-directly) or did you use a payment intent (which is only availble in the US https://stripe.com/docs/terminal/features/saving-cards/save-after-payment)
payment intent, save afterr payment
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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.
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
Ok, that makes sense. Thanks.
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
Yup - generated_card is only for card-present transactions
Or I guess the whole card_present won't be set, card will be set instead?