#davethecust - card validation
1 messages ยท Page 1 of 1 (latest)
Hello. One moment
For insufficient funds, there's not really a good way to protect against that as the account can get depleted in the 7 day trial period. However, since you use SetupIntents, this should help prevent a lot of bank declines.
Are you seeing a large number of bank declines?
yeah that was my thinking too - maybe i am missing some configuration to the setupintent or something. yeah about 50% of my failures are bank declines. and in total about 20% of my subscriptions fail
Gotcha. What does your current flow look like? Is there a certain integration guide you followed?
yeah i can try to find the guide i followed. the flow looks like this:
- on my client a user lands on the page with that renders stripe elements - it requests a setupintent from my backend and passes the client secret into the elements provider
- the user enters their card info and we attempt to confirm it with these parameters
const result = await stripe.confirmSetup({
elements,
confirmParams: {
return_url: redirect,
},
redirect: "if_required",
});
2.5 i handle the error after confirmation if any
// Show error to your customer (for example, payment details incomplete)
} else {
if (!result.setupIntent.payment_method) {
// handle err here too
}```
3. we then send a request to the backend with the following:
``` const subscription = await this.client.subscriptions.create({
customer: customerID,
off_session: true,
items: [
{
price,
},
],
trial_period_days: TRIAL_PERIOD_DAYS,
payment_behavior: "default_incomplete",
});```
4. we then listen to webhooks to provision things as needed
i listen to the following webhooks
```invoice.payment_failed
invoice.paid
product.updated
product.deleted
product.created
customer.subscription.created
customer.subscription.deleted
customer.subscription.updated```
lemme know if any of this looks off or needs more clarification
i think i followed this guide, if i am remembering correctly https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#how-to-model-it-on-stripe
Gotcha. That looks ok. SetupIntents actually aren't necessary for Subscriptions since when we create a subscription, that notifies the bank that we intend to charge this card on a recurring basis
That being said, it shouldn't harm anything to do that
hmm so i think i couldn't capture a payment upfront to create the subscription without the setupintent. but i might have just misunderstood
have you seen any other strategies for validation? the other thing i considered was charging the user upfront and then maybe refunding them? or charging like a cent or something at the time of creation to check the card
Yeah so that guide you linked shows how to do it without the setupintent
Not necessary but it shouldn't impact anything really
Let me check with some colleagues
gotcha maybe i didn't follow that guide then haha
thank you for checking on that ๐๐ป
pi_3KqLuJHIlq7XoOSX0M12Uq16
pi_3KuuBXHIlq7XoOSX1dtLlWgU
pi_3KtEc1HIlq7XoOSX0sVBWOFm
pi_3KsXZsHIlq7XoOSX1Xb0clHD```
lemme know if you need more info for these
That's good. Thanks!
So I just spoke to my colleague about this in depth. They said unfortunately there's not much to be done here:
A certain amount of declines are going to happen, like NSF, and they need to bring their customer back on session in this case and collect a new PM. This is one of the downsides of using a trial and collecting a PM up front.
And as to the charging a small amount and refunding it, you should not do that as that pattern is against card network regulations
got it
that's good to know we won't charge & refund then
do you know if 20% unintended churn is average - should we should expect this level of churn?
also in the above message what does NSF stand for?
also aret here any alternatives to trialing in this way? like i noticed you mention here this is a downside of collecting PM upfront and trialing. just wondering if there's any other approaches i should consider