#Shadab-sub-change-price
1 messages · Page 1 of 1 (latest)
Hey! This is the doc you need: https://stripe.com/docs/billing/subscriptions/upgrade-downgrade
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
?
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
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
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?
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);
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.
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
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.
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
When you're upgrading the subscription, if your user won't be on-session, then you should set the off_session parameter:
https://stripe.com/docs/api/subscriptions/update#update_subscription-off_session
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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.
you mean that paymentIntent of upgraded subscription have to be in 3DS flow
Huh?
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);
There is no way to guarantee that you will bypass the need for 3DS.
let me know, if we are upgrading a subscription then new paymentIntent will create?
Yes.
then that PaymentIntenet required 3D Authentication?
Not always, but it might.
Do you have a document to integrate it?
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
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.