#clutch-guy_code

1 messages ¡ Page 1 of 1 (latest)

rigid bobcatBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1389329767202947134

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

wild path
#

Hello
There's no way to differentiate between cards when you create a SetupIntent.

The payment method needs to be tokenized to know if the card is credit or debit

lean sorrel
#

Okay, can you share an example/point me to docs, so I can go down that road?

wild path
#

We don't have an exact end to end guide, however, you could follow - https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=setup

And after step 3, create a confirmation token - https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=setup#create-ct

The confirmation token would let you inspect the funding type, under payment_method_preview.
https://docs.stripe.com/api/confirmation_tokens/object#confirmation_token_object-payment_method_preview-card-funding

If it says, debit then you can skip the rest of the steps and return an error.

lean sorrel
#

Hmm okay. This appears to be a bit roundabout or at-least a change to our workflow. I guess I need to discuss with the team on the right approach.

wild path
#

Yup