#Sudarshanan G
1 messages ยท Page 1 of 1 (latest)
help me how to achevie this
Hi ๐ that sounds reasonable, you can update the invoice_settings.default_payment_method on the Customer object to do so.
https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method
also my card is indian based card
when I need this to do.. before payment or after payment is success
In your initial message I got the impression that you were hoping to trigger this after a Subscription's successful payment.
okay
one more doubt, I'm using setupIntent to add card to a customer. on confirmSetupIntent in react. Stripe taking to payment screen with either a $0 or a $1 amount. On providing otp and completing process card is getting added but no amount is debited from my account.
also before If I add a new card and make it as primary method. Subscription auto renewal fails.
this was the error This PaymentIntent requires an on-session action. Please get your customer back on session and re-confirm the PaymentIntent with a payment method when the customer is on session.
Is this regarding actions you're doing in live mode, like these are real transactions? In test mode it's expected for funds to not be pulled from real payment methods (using real payment methods should result in failures)
yeah in live mode only
That is something that can happen. The issuer of the customer's card ultimately decides whether they require the customer complete authentication in order for them to approve a transaction, so your flow will need to be prepared for situations where that occurs on Subscription renewal. You will need a mechanism for bring your customers back on session so they can complete that authentication.
Gotcha, how recent were those transactions? It takes time for them to process, and I don't know how long it will take your bank to display those authorizations (if they do at all) on your account.
may I know which one you are asking
Actually on completion of the card setup the show amount is not debited at all.
also invoice payment getting failed on auto capture on the date of renewal.
Can you elaborate on what you mean when you say the amount is not debited at all? Is this still for the authorization charge? I don't believe those are actually collected, the charge is for verification/validation purposes.
I waited and checked for 2 days
yeah for this scenerio only that 1 rupee or 0 rupee is not collected.
That's expected, the amount is only used as part of the verification process, the customer is not actually charged that
https://support.stripe.com/questions/unexpected-1-charge-on-customers-bank-statement#:~:text=Unexpected %241 charge on customer's bank statement %3A Stripe%3A Help %26 Support&text=A customer may see a,will disappear from their statement
okay then will payment will get succeded upon changing the method inbetween an on-going subscription
I'm sorry, I don't think I'm grasping what you're trying to ask there, can you tell me more about the flow you're envisioning?
Speaking generally, I would expect you to be able to process a payment for a previously set up payment method. It's not possible to know whether that payment will succeed though, as it could fail for various reasons. The payment could be declined for common reasons such as there not being enough funds available. It could also fail for authentication reasons if the issuing bank decides to require authentication for the payment.
I'm new to this implementation
yes, and I want to know about the authentication part. Like do I need to authenticate the payment upon each renewal?
But I sure that I payment is not failed because of insufficient funds.
Not necessarily, only when payments fail because the issuer required authentication.
When you set up a Payment Method (done by Setup Intents, Checkout Sessions in setup mode, or when processing Subscription payments) we do everything we can to optimize that payment method for future payments. Part of that process is that for future payments, we ask for an exemption from SCA/3DS challenges being required. The issuing bank decides whether or not they are willing to grant that exemption. That's why we don't have insight into when or how often authentications will be required for future payments, because that decision is made by the issuer rather than by Stripe.
If the issuer requires authentication, the payment will fail with a decline code indicating authentication is required, or the Payment Intent will go into a requires_action state.
okay thanks
can I get help on this subscription(sub_1NuzavSIsmtgMolIBIf9Br2v). I tried to add this payment method that used in this as default method but it is not set.
There is a default payment method set on that Subscription. Is it not the one you tried to set as the default?
$subscription = Subscription::create([
'customer' => $request->customer_id,
'items' => [
[
'price_data' => [
'currency' => $request->currency,
'unit_amount' => $request->planAmount * 100,
'product' => $request->productId,
"recurring" => [
"interval" => 'month',
"interval_count" => $request->interval_count
]
]
]
],
'default_tax_rates' => [
config('services.stripe.stripe_tax')
],
'payment_behavior' => 'default_incomplete',
'payment_settings' => ['save_default_payment_method' => 'on_subscription']
]);
this is the code I used
I have set save_default_payment_method
Yup, and the Payment Method was set as the default on the Subscription when the first payment was completed. This customer.subscription.updated Event shows that change happening:
https://dashboard.stripe.com/events/evt_1NuzdYSIsmtgMolIAdtLMmuC
Okay fine. In my application I have card management module where I can add cards to the customer.
Suppose, if i want to add a new card to customer and use that card to my rest of my subscription billing cycle. what I have to do?. Please guide me
You should run those payment methods through a set up. Exactly how depends on how you'd like to structure your flow. If you only want to set up these payment methods, and not also charge them at that time, then this is a good guide for looking at the paths available for setting those up:
https://stripe.com/docs/payments/save-and-reuse