#Dhaval-sub-3ds
1 messages ยท Page 1 of 1 (latest)
i have done subscription payment with 3d secure card
After month next payment was come but in 3D secure card it will not automatically cut payment
so how to handle this scenario?
Can you share the subscription ID?
sub_1LQURSBlLQmfoqiANPryBbGK
I'm not seeing any 3DS/auth requests for recurring payments on that subscription
The most recent invoice is still awaiting finalization before we'll attempt to charge:https://dashboard.stripe.com/test/invoices/in_1LQqw2BlLQmfoqiAecSF9Fzr
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sorry but i can't unserstand
sub_1LQURSBlLQmfoqiANPryBbGK in this subscription i have done payment with 3D secure card
I was looking for a recurring payment that required 3DS, but there isn't any
now it will be is next due in few min so my payment was failed bcz i have done payment with 3DS casd so i required authentication
i give my subscription id which failed yesterday due to 3DS
sub_1LQ2pEBlLQmfoqiA3Sqwokox
this subscriptionId next payment was failed due to 3DS card
you can also see this "evt_3LQrVUBlLQmfoqiA284lBMxy" event which was failed due to 3DS card authentication
Hi! I'm taking over this thread.
Yes, give me a few minutes to catchup.
ohk
So yes it looks like the second payment for that subscription failed. Trying to see why.
I just want implement Subscription payment flow with 3DS card.
First time payment handle from my side but how to handle second time payment?
I don't think the issue is 3DS. The subscription and the customer has not default payment method, so it's expected that the payment fails.
any easier way that can handle user next payment
i have use this method
stripe.confirmCardPayment(result,
{payment_method: {card: cardElement}},
).then(function(result) {
// Handle result.error or result.paymentIntent
// More details in Step 2.
alert("result.error ->" +result.error);
alert("result ->" +result.paymentIntent.id);
});
//ThreeDsecure(result, cardElement);
}
how to add default payment method in above method
When creating the subscription, you should use payment_settings.save_default_payment_method: "on_subscription" to automatically set the default payment method on the subscription https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_settings-save_default_payment_method
And for existing subscriptions, you can update it's default_payment_method https://stripe.com/docs/api/subscriptions/update#update_subscription-default_payment_method
i have implemented above in server side or client side?
Server side to update the default payment method.
can you please give me that code for java!!
because I have to make default payment to that card which i have enter first time
The simplest option is to update the code that is creating the subscription, and add payment_settings.save_default_payment_method: "on_subscription" as I mentioned above.
params.put("metadata", metadata);
// params.put("tax_percent", subscriptionDetails.getOrderDetails().getBaseTaxInPercentage());
params.put("payment_behavior", "default_incomplete");//allow_incomplete,default_incomplete
params.put("payment_settings.save_default_payment_method", "on_subscription");
like that?
I'm not familiar with Java, give me a few minutes.
Have you tried the code you shared? Did it work?
No it is not working
com.stripe.exception.InvalidRequestException: Received unknown parameter: payment_settings.save_default_payment_method; code: parameter_unknown; request-id: req_1DiZ9fFAiMTgVE
throw me above error
๐ taking over for my colleague. Let me catch up.
could you please try this instead?
paymentSettingsParams.put("save_default_payment_method", "on_subscription");
params.put("payment_settings", paymentSettingsParams);```
ya it i working fine
but it is not showing my payment method as a default
sub_1LQsoyBlLQmfoqiAzDlbpkEA
Hi there?
yes sorry, basically that saves the default payment method on the subscription and not the customer object
So, by doing this it was not throwing error like in this subscription "sub_1LQ2pEBlLQmfoqiA3Sqwokox"
?
"sub_1LQ2pEBlLQmfoqiA3Sqwokox" in this subscription i done payment with 3DS card after his second payment it was failed.
So, i give this subscription id to soma and she told me that you do not have any payment method that's way it is failed
so she give me below code for adding payment method as default
Map<String, Object> paymentSettingsParams = new HashMap<>();
paymentSettingsParams.put("save_default_payment_method", "on_subscription");
params.put("payment_settings", paymentSettingsParams);
now i added this code in my app so now it is working fine right?
first why did you assume that they are a "she". please use gender neutral pronouns as much as possible. thank you ๐
ohk
yes this will save the payment method on the subscription for future invoices to be paid by this payment method
So one more question I have done payment with 3DS card so for next payment i required a authentication?
it really depends on the issuing bank
if they decide that the request should be authenticated then yes otherwise you'll be fine
if suppose they required authentication than what is easiest way to handle that scenario?
how to validate it by end user?
you should probably listen to this event https://stripe.com/docs/api/events/types#event_types-invoice.payment_action_required
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
once you get notified you'll have to either send the user to the Hosted Invoice page
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Map<String, Object> paymentSettingsParams = new HashMap<>();
paymentSettingsParams.put("save_default_payment_method", "on_subscription");
params.put("payment_settings", paymentSettingsParams);
in stripe dashboard where can i find "save_default_payment_method" is on for my subscription?
it would be the Payment method on the subscription page