#sreekanth_code

1 messages · Page 1 of 1 (latest)

strong wharfBOT
vagrant treeBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

strong wharfBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1240940296863219795

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

faint geyser
#

hi

drowsy kelp
#

Likelihood is yes. But I can confirm if you can share an example sub_xxx

faint geyser
#

as i checked subscription is getting created when i use this code subscription = stripe.Subscription.create(
customer=customer.id,
items=[
{
'price': 'price_1Hh1ZeIabcdefghijk',
},
],
payment_behavior='default_incomplete',
)

#

just confirming do i need to confirm from frontend using client secret

drowsy kelp
#

Well as I said 'it depends'. What is the status returned on the Subscription creation?

faint geyser
#

If there is no need to confirm from the frontend with a client secret, what is the difference between the above code with off_session=true and without off_session

drowsy kelp
faint geyser
#

for subscription status: 'paid',

drowsy kelp
#

No, that'll be the invoice status. I suspect in that case that the subscription is active

#

In which case no confirmation is needed

#

(your customer.id must of had a invoice_settings.default_payment_method set that we'll use)

faint geyser
#

yes, status: 'active'

drowsy kelp
faint geyser
#

In the code provided above, by default, off_session is set to false. If I set off_session to true, will it work the same?

drowsy kelp
#

Have you tried?

faint geyser
#

yes, it is same

#

just asking what is the difference....

drowsy kelp
#

Indicates if a customer is on or off-session while an invoice payment is attempted.

#

If off_session: true and 3DS/auth is requested for the sub/invoice payment then it'll be a decline and you'll need to bring customer back on-session to re-confirm the payment

faint geyser
#

Okay, if off_session is set to false, that means the customer is in an on-session scenario. In this case, do I need to confirm the payment from the frontend using the confirmPayment method?

drowsy kelp
#

It depends – if you're passing the customer and they have a invoice_settings[default_payment_method] or you pass default_payment_method then we'll automatically attempt to charge them without the need for manual confirmation

#

Otherwise the subscription will be created with status: 'incomplete' and it needs confirmation

faint geyser
drowsy kelp
#

It won't fail, it'll be in incomplete status and you can confirm the intent:

A successful payment needs to be made within 23 hours to activate the subscription. Or the payment requires action, like customer authentication. Subscriptions can also be incomplete if there’s a pending payment and the PaymentIntent status would be processing.

faint geyser
#

okay

#

Is 3D Secure authentication required only once for each subscription, or will it ask for recurring payments within that subscription?

drowsy kelp
faint geyser
#

Yes, but the client was asking if we can avoid asking the user to authenticate for each recurring payment( if authentication required from bank side)

drowsy kelp
#

No you cannot

faint geyser
#

okay

strong wharfBOT