#Shadab-sub-change-price

1 messages · Page 1 of 1 (latest)

stray grail
hazy vessel
#

Is it 3D secure2??

#

basically we want to upgrade the subscription via 3D Secure

#

Can you please share another document for upgrade via 3D Secure2

#

?

stray grail
#

I'm not sure how the 2 are related. If you're upgrading/downgrading with a pre-authorised payment method there's no need for an additional 3DS check

#

The bank may request auth following the next invoice payment, but you should just handle that like any other 3DS/auth challenge flow

hazy vessel
#

Can you check this subscription sub_1JxTfRFaGWhFAaijeIDYZ5CD

#

Initially we created a subscription via 3D secure,

#

after that while we are trying to upgrade it then it showing past due

#

I believe it's because of 3D secure authentication

#

Can you please also check this customer cus_KbECzU8agRn5ez

robust pagoda
#

Based on the information in the payment intent that was created for the invoice that was generated when the subscription was upgraded, it does look like it failed due to needing to pass 3DS. For these upgrades, is your user on-session?

hazy vessel
#

we had an existing 3DS subscription

#

and then i just exexute this code

#

Stripe.apiKey = "sk_test_HlqESuTXPwPrma9XC4qKflCJ";
Subscription subscription = Subscription.retrieve("sub_1JxTfRFaGWhFAaijeIDYZ5CD");
Map<String, String> metaData = subscription.getMetadata();
metaData.put("planId", "WooVIPAge30Plus101");
metaData.put("isUpgraded", "true");

    SubscriptionUpdateParams params = SubscriptionUpdateParams.builder().setCancelAtPeriodEnd(false)
            .setProrationBehavior(SubscriptionUpdateParams.ProrationBehavior.ALWAYS_INVOICE)
            .addItem(SubscriptionUpdateParams.Item.builder()
            .setId(subscription.getItems().getData().get(0).getId()).setPrice("price_1I9RKVFaGWhFAaijkaGxbx8x").build())
            .putAllMetadata(metaData)
            .build();
    Subscription subscriptionUpdate=subscription.update(params);
robust pagoda
#

There is no such thing as a 3DS subscription. 3DS is related to the payment method that is being used to fulfill a payment intent.

hazy vessel
#

yes, you are right

#

let me share the screen shot

#

As we can see initially we created a subscription against 999

#

PaymentIntent of 999 was 3D Secure

#

after that we are trying to upgrade the subscription

#

I used the above shared code to upgrade the subscription

robust pagoda
#

And will your users be on-session when this upgrade is performed? That will determine whether you need to handle 3DS right away, or if you'll need to bring the user back on-session. I don't see you setting the off_session parameter, so it looks like you're expecting your user to be on-session.

hazy vessel
#

no, user was off session

#

Can you let me know How to upgrade?

robust pagoda
#

Sorry, but I don't think that's your question. You're already doing the upgrade, the subscription has already been updated. It's the payment that comes with that upgrade that you're trying to handle.

There are several steps you can take to help reduce the likelihood that you will need to handle 3DS, but it's up to the bank to determine whether they require it for any given charge so there is always the possibility that it will occur. Which is why we built features like the one shown here, that can be found in your dashboard:
https://dashboard.stripe.com/settings/billing/automatic

#

But the important thing here, is that no matter what you do it's always possible that the issuing bank will not honor the exemptions we're requesting and the 3DS flow may be required anyway. In this case, you will need a way to bring your user back on-session to handle this. You could do so with the feature that I mentioned above, or by building your own flow.

hazy vessel
#

you mean that paymentIntent of upgraded subscription have to be in 3DS flow

robust pagoda
#

Huh?

hazy vessel
#

off-session will work if bank required 3D Authentication?

#

I mean this code will work always?

#

SubscriptionUpdateParams params = SubscriptionUpdateParams.builder()
.setCancelAtPeriodEnd(false)
.setProrationBehavior(SubscriptionUpdateParams.ProrationBehavior.ALWAYS_INVOICE)
.addItem(SubscriptionUpdateParams.Item.builder()
.setId(subscription.getItems().getData().get(0).getId()).setPrice("price_1I9RKVFaGWhFAaijkaGxbx8x").build())
.setOffSession(true)
.putAllMetadata(metaData)
.build();
Subscription subscriptionUpdate=subscription.update(params);

robust pagoda
#

There is no way to guarantee that you will bypass the need for 3DS.

hazy vessel
#

let me know, if we are upgrading a subscription then new paymentIntent will create?

robust pagoda
#

Yes.

hazy vessel
#

then that PaymentIntenet required 3D Authentication?

robust pagoda
#

Not always, but it might.

hazy vessel
#

Do you have a document to integrate it?

robust pagoda
#

This explains some options to minimize the chance that 3DS is requried:
https://support.stripe.com/questions/saving-payment-methods-for-subscriptions-after-strong-customer-authentication-sca-regulations-take-effect

This covers how to build flows to handle 3DS authentication. They will require that the user is present, so you will need to create a mechanism to prompt your user to come back on-session to complete the flow:
https://stripe.com/docs/payments/3d-secure?platform=web

Learn about authentication to reduce fraud and meet regulatory requirements.