#mick23_code
1 messages ยท Page 1 of 1 (latest)
๐ 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/1227338486026080380
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- mick23_code, 19 hours ago, 84 messages
- mick23_code, 4 days ago, 48 messages
- mick23_best-practices, 5 days ago, 80 messages
Hello ๐
How can I help?
So the Fingerprint for a card is only returned AFTER I create the Card in Stripe via the API/SDK
So how do I go about checking for duplicates BEFORE hand?
There's no way to generate the fingerprint without tokenizing the card. So unfortunately, no way to check it before hand.
Right ok.
So to the obvious next question. How do I prevent dupliate cards being added to an account?
i.e.
As a Customer of SaaS Application
I want to Add a Card to My Account
So that I can make a Subscription at some point in the future on the card of my choice
So I want to essentially have a page that lists all Customer Cards
Gotcha. I assume you're currently using SetupIntents to store newly provided payment methods?
Yeah that's right
Or.... am I over complicating things for v0.1. i.e. Should I simply be disabling the Add Card to Account feature if I store the Fingerprint of the card just successfully added?
But then thinking ahead... what happens when that card expires etc. (I may be jumping too far ahead to worry about that though....)
Gotcha.
Or.... am I over complicating things for v0.1. i.e. Should I simply be disabling the Add Card to Account feature if I store the Fingerprint of the card just successfully added?
If you disable this then there's no way a customer would be able to switch payment methods on existing subscriptions. They might opt for cancelling and re-subscribing instead. So no you're not over complicating it ๐
Also, with CAU (Card Account Updater) Stripe will hopefully receive the new card information automatically without you needing to manually ask the customer to provide a new payment method.
https://stripe.com/resources/more/what-is-a-card-account-updater-what-businesses-need-to-know
And expired cards can still be charged: https://support.stripe.com/questions/can-an-expired-card-still-be-charged-on-stripe
I mean, creating a table in SaaS db for customer_card_details (to store purely the Fingerprint ID, not the card details obviously) is a simple thing to do, and it's a simple logic check then for: if ( customerHasCardAgainstAccount() ) then disableAddCardToAccountButton() etc.
Oh that's interesting. Never knew that. So that's probably how an expired card against a Jira account is still being charged then. That's been puzzling me for ages, but it's continued working so I haven't been overly concerned. Bit off topic, but sounds like they must be using CAU feature too. I need to read into that to understand that a bit more. That's quite a smart bit of banking tech.
For deduplication, you can do following:
1/ Store the fingerprint in your DB or list customer's attached payment methods using this API:
https://docs.stripe.com/api/payment_methods/customer_list
2/ You can follow this flow to render elements without needing to create an Intent first
https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=setup
In step-3 of the guide though, you'd want to set paymentMethodCreation to manual & call stripe.createPaymentMethod to tokenize the payment method
3/ Once you have the tokenized payment method, you can check it's fingerprint against the one you have from 1 above.
If it's different then you can go ahead with creating a SetupIntent and confirming to attach the payment method to a customer. If the fingerprint is the same then you can just return an error and ask customer to provide a different payment method
Got you, that's making sense now. I had that deferred payment link open in another one of the tabs in my browser, but hadn't got around to looking through that one fully yet.
NP! ๐