#knock2hell_unexpected

1 messages ยท Page 1 of 1 (latest)

blazing sableBOT
vale basaltBOT
#

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.

blazing sableBOT
#

๐Ÿ‘‹ 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/1244975998814912543

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

sudden elbow
#

What's the sub_xxx ID that fails to renew?

desert lynx
#

sub_1PLO7wSCiougwFxyIlahI8Fq

#

i use this code to create subscription


            subscription = stripe.Subscription.create(
                customer=customer_id,
                items=[{'price': price_id}],
                default_payment_method=payment_method_id,
                expand=['latest_invoice.payment_intent'],
                discounts=[{'promotion_code': coupon_code}] if coupon_code else [],
            )

#

and use simulation time to check

sudden elbow
#

Looks like authentication/3DS was requested by the bank on the most recent invoice, as per the payment_action_required event: https://dashboard.stripe.com/test/events/evt_1PLOBRSCiougwFxyqVzC2FSY

Which is expected with the 3184 test card that you used to make the initial invoice payment:

This card requires authentication on all transactions, regardless of how the card is set up.

desert lynx
#

but if user create a subscription why he need to go through 3ds every time

#

like if you purchase Netflix subscription, you dont need to go through 3ds it automatically charge and renew

sudden elbow
#

That's just how that card works. It's a test card which purpose is to force 3DS requirement for every payment

desert lynx
#

how it will work in real like

sudden elbow
#

You probably want to test with 4000002500003155 instead which behaves more inline with what you describe:

This card requires authentication for off-session payments unless you set it up for future payments. After you set it up, off-session payments no longer require authentication.

#

To be clear though, 3DS/auth can be requested for recurring/off-session payments even if the initial once succeeds. So you integration needs to handle that

desert lynx
#

do i need to change anything in this code

#

for off-session

sudden elbow
desert lynx
#

so how can i handle it

sudden elbow
#

Or you can implement something similar yourself where you listen for invoice.pament_failed events and notify the customer, bring them back online to your site and then retry the invoice payment via Stripe.js which will handle the 3DS/auth flow for the payment

desert lynx
#

ok let me try

sudden elbow
#

Your integration as it is now will work fine with the 4000002500003155 card: we'll do 3DS/auth for the first payment which will correctly setup the card for recurring payments to succeed

#

But these test cards are designed to emulate payment scenarios that can happen in your live integration. In this case a recurring payment decline/failure

desert lynx
#

i created setup intent(usage='off_session') then created payment method(verify 3ds) and attached it to a customer with default payment then i created a subscription and verify 3ds

#

the subscription is created and active

sudden elbow
#

But regardless of how you save/setup the 3184 it will always require auth/3DS for every payment as per the description

desert lynx
blazing sableBOT
desert lynx
#

so i have to verify 3ds at the beginning only

sudden elbow
sudden elbow
desert lynx
#

ok

#

let me try

#

this is still happening with card 4242

crimson garden
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

desert lynx
#

ok

crimson garden
#

Could you please summarise for me what's the latest question?

desert lynx
#

is customer need to verify 3ds or subscription renew

crimson garden
#

It's unlikely that 3DS will be required if the Payment Method was set up correctly, but it's not 100% guaranteed.

desert lynx
#

also if user updates the default payment method then he will charge with a new default payment method or old payment method that attach to subscription

crimson garden
desert lynx
#

also if user updates the default payment method then he will charge with a new default payment method or old payment method that attach to subscription

#

are you there

#

?

crimson garden
desert lynx
#

cus_QBmKiw2aMeAg25

#

check this customer

#

and sub_1PLOmGSCiougwFxy6FQChu5X

crimson garden
blazing sableBOT
desert lynx
#

if i update the update customer's default payment method does it automatically charge charge from it

#

for renewal of subscription

crimson garden
desert lynx
#

ok

#

how to get the invoice for this pi_3PL28CSCiougwFxy1vVVweuK

safe flax
#

Hi there ๐Ÿ‘‹ jumping in as my teammate needs to step away soon. If a Payment Intent was created from an Invoice, the ID of the Invoice is stored in the invoice field on the intent:
https://docs.stripe.com/api/payment_intents/object#payment_intent_object-invoice
The Payment Intent you shared was not created by an Invoice, so there is no Invoice object associated with it.

desert lynx
#

can i create invoice for an amount and pay directly with default payment method

safe flax