#Dhaval-sub-3ds

1 messages ยท Page 1 of 1 (latest)

strong totem
#

Hey, can you elaborate on your question? It's not clear what you're asking

dark ledge
#

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?

strong totem
#

Can you share the subscription ID?

dark ledge
#

sub_1LQURSBlLQmfoqiANPryBbGK

strong totem
#

I'm not seeing any 3DS/auth requests for recurring payments on that subscription

dark ledge
#

Sorry but i can't unserstand

#

sub_1LQURSBlLQmfoqiANPryBbGK in this subscription i have done payment with 3D secure card

strong totem
#

I was looking for a recurring payment that required 3DS, but there isn't any

dark ledge
#

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

rancid zenith
#

Hi! I'm taking over this thread.

dark ledge
#

Hi

#

Can you plz give me help regarding my above msg

#

?

rancid zenith
#

Yes, give me a few minutes to catchup.

dark ledge
#

ohk

rancid zenith
#

So yes it looks like the second payment for that subscription failed. Trying to see why.

dark ledge
#

I just want implement Subscription payment flow with 3DS card.
First time payment handle from my side but how to handle second time payment?

rancid zenith
#

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.

dark ledge
#

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

rancid zenith
dark ledge
#

i have implemented above in server side or client side?

rancid zenith
#

Server side to update the default payment method.

dark ledge
#

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

rancid zenith
#

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.

dark ledge
#

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?

rancid zenith
#

I'm not familiar with Java, give me a few minutes.

#

Have you tried the code you shared? Did it work?

dark ledge
#

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

pliant granite
#

๐Ÿ‘‹ 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);```
dark ledge
#

ya it i working fine

#

but it is not showing my payment method as a default

#

sub_1LQsoyBlLQmfoqiAzDlbpkEA

#

Hi there?

pliant granite
#

yes sorry, basically that saves the default payment method on the subscription and not the customer object

dark ledge
#

So, by doing this it was not throwing error like in this subscription "sub_1LQ2pEBlLQmfoqiA3Sqwokox"

#

?

pliant granite
#

I don't follow the question

#

could you please elaborate more?

dark ledge
#

"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?

pliant granite
#

first why did you assume that they are a "she". please use gender neutral pronouns as much as possible. thank you ๐Ÿ™‚

dark ledge
#

ohk

pliant granite
#

yes this will save the payment method on the subscription for future invoices to be paid by this payment method

dark ledge
#

So one more question I have done payment with 3DS card so for next payment i required a authentication?

pliant granite
#

it really depends on the issuing bank

#

if they decide that the request should be authenticated then yes otherwise you'll be fine

dark ledge
#

if suppose they required authentication than what is easiest way to handle that scenario?
how to validate it by end user?

pliant granite
#

once you get notified you'll have to either send the user to the Hosted Invoice page

dark ledge
#

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?

pliant granite
#

it would be the Payment method on the subscription page