#jamon

1 messages · Page 1 of 1 (latest)

arctic oarBOT
jaunty parrot
#

Interesting, the test clocks shouldn't affect that in theory. What error are you getting here?

main swan
#

Your card was declined. This transaction requires authentication.

#

this is under the payment methods section

#

i want to test a 3DS failure

jaunty parrot
#

Are you adding the card through the dashboard?

main swan
#

yes

#

4000002760003184 is the test card

#

just trying to add it as a payment method

jaunty parrot
#

Gotcha, adding that card isn't possible through the dashboard currently. You might need to add this card as your user would. Either through your page for collecting card info custom page to add this card, or you can use the Customer Portal and add it

#

That being said I have on other idea that I think would be easier. Checking in to our docs on that now

main swan
#

okay i appreciate you checking

#

adding through test clock customer portal worked but if i create a payment i cannot do it with that card

jaunty parrot
#

How is the payment failing?

main swan
#

actions -> create payment -> use card 3184 -> Your card was declined. This transaction requires authentication.

jaunty parrot
#

That should make a payment in a requires_authorization state

main swan
#

ok and i make sure i use the test clock customer id?

jaunty parrot
#

Yes, use that and the existing payment method's ID

main swan
#

ok i'll give it a shot

#

Like this?

#

stripe.PaymentIntent.create(
amount=2000,
currency="usd",
payment_method_types=["card"],
customer_id='cus_Mkt1zm1ffV3GHC',
payment_method='pm_1M1WxaIeTJrsS1reRcqfqZWi',
confirm=True
)

azure meadow
#

Hello 👋
Taking over as Pompey needs to step away

main swan
#

Because after making that api payment intent, i fast forward time and it says still incomplete

#

unless it is because i didn't change the setting let me see here

azure meadow
#

No problem, take your time 🙂

main swan
#

Manage payments that require confirmation

#

This should run right?

#

if i just use that api call above and fast forward?

azure meadow
#

I don't know if those settings should affect one-time payment using a PaymentIntent though
These are billing settings and would affect a subscription invoice payment

main swan
#

ooh wow really? hmmm

#

You sure because it has subscription status and invoice status where invoice status is 1 time payments?

azure meadow
#

It would affect one-time payment invoices but you're creating a PaymentIntent

main swan
#

ooh

#

how do i make a 1 time payment invoice then with test clocks?

azure meadow
#

hold on, let's take a step back
your goal is to test 3DS with test clocks right?

main swan
#

yes

#

In my case, someone uses checkout and fails a 3DS payment then if it is a sub they have an open invoice. Then if they use a new checkout again and they successfully pay it, now they have the product bought plus an outstanding invoice. I would imagine the customer being unhappy about this.

#

Then i have donations so if it is a 1 time payment and they fail 3DS they get a payment intent created

azure meadow
#

Gotcha. Umm, thinking...

main swan
#

No problem it is a lot to think about

#

I think though if you mark it as uncollectible then I forget what happens if the open invoice stays or goes away?

#

Same thing with subscription unpaid. I forget what happens.

azure meadow
main swan
#

i'll have to test it then just to see

azure meadow
#

One option is you can mark the unpaid invoice as void and cancel the subscription

main swan
#

right that i want to get from a webhook

azure meadow
main swan
#

Am i on the right track with this? I feel like parts of this are wrong logic

#

I also think I need if invoice_expanded.subscription != None: to be able to run the subscription_id and subscription_status lines

azure meadow
#

Sorry not sure, I'd recommend testing it out to be honest

Also, taking another step back
You could utilize payment_behavior parameter while creating a subscription
https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_behavior

I.e. setting it to default_incomplete allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, SCA regulation, or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to status=incomplete_expired, which is a terminal state.

#

It cancels the subscription automatically.

main swan
#

how do i set that via stripe checkout?

azure meadow
main swan
#

ok