#jamon
1 messages · Page 1 of 1 (latest)
Interesting, the test clocks shouldn't affect that in theory. What error are you getting here?
Your card was declined. This transaction requires authentication.
this is under the payment methods section
i want to test a 3DS failure
Are you adding the card through the dashboard?
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
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
How is the payment failing?
actions -> create payment -> use card 3184 -> Your card was declined. This transaction requires authentication.
This may be another thing you can't do through the Dashboard. Maybe you can try creating a payment intent that uses this payment method and pass confirm: true during your creation call? https://stripe.com/docs/api/payment_intents/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That should make a payment in a requires_authorization state
ok and i make sure i use the test clock customer id?
Yes, use that and the existing payment method's ID
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
)
Does https://dashboard.stripe.com/settings/billing/automatic settings effect test clocks?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Hello 👋
Taking over as Pompey needs to step away
Does https://dashboard.stripe.com/settings/billing/automatic settings effect test clocks?
I believe they do
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
No problem, take your time 🙂
Manage payments that require confirmation
This should run right?
if i just use that api call above and fast forward?
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
ooh wow really? hmmm
You sure because it has subscription status and invoice status where invoice status is 1 time payments?
It would affect one-time payment invoices but you're creating a PaymentIntent
hold on, let's take a step back
your goal is to test 3DS with test clocks right?
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
Gotcha. Umm, thinking...
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.
We have docs on those
https://stripe.com/docs/invoicing/overview#invoice-statuses
i'll have to test it then just to see
One option is you can mark the unpaid invoice as void and cancel the subscription
right that i want to get from a webhook
You can listen to invoice.payment_failed event
https://stripe.com/docs/api/events/types#event_types-invoice.payment_failed
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
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.
how do i set that via stripe checkout?
Ah sorry, that might not work with Checkout unfortunately.
As there are only a few things you can customize when it comes to Checkout <> Subscriptions
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok