#lou-from-evergiving_unexpected
1 messages ¡ Page 1 of 1 (latest)
đ 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/1466155718641188935
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
Could you be a little more explicit about the double charge? What are those PaymentIntent ids?
Hi there, thanks for getting back to me! Let me provide more details
For this customer, I have a first payment processed : pi_3SubwKBcQAyRw7rx069LMnUO
Followed by a second payment when setting up the subscription : pi_3SubwOBcQAyRw7rx0Vsq7vQU
I would only want the second one, not the first
The outcome I'm looking for would be identical to cus_TsMdQM7ldTOnCW with payment ID pi_3SubuRBcQAyRw7rx15LgThed
Your code explicitly called the PaymentIntents API in this call: https://dashboard.stripe.com/acct_1EuGO9BcQAyRw7rx/test/logs/req_CzzXsLN03u9S9W
Additionally, this is two separate customers in Stripe.
pi_3SubwOBcQAyRw7rx0Vsq7vQU = cus_TsMfPf6DU9QAnY
cus_TsMhpgMfHhAog7 = sub_1SubyMBcQAyRw7rx1zYxasRn / pi_3SubyNBcQAyRw7rx0TvyvdiK
But my point is you control this - when you call the PaymentIntents API, you create a one-time payment.
When you call the Subscriptions API (and the subscription is charging up front) you create a payment now indirectly, which results in a PaymentIntent and then Stripe will create further payments according to the way the Subscription is configured
For cus_TsMfPf6DU9QAnY, in the Stripe dashboard, I have those two payment IDs
And I'm doing the exact same call for cus_TsMdQM7ldTOnCW, which only generates the payment linked to the subscription
This is using another test card
4000002500003155
So, why would one only generate one payment ID (and one charge) correctly, and the other generate two payments?
I understand we control this, but I need to understand wht we need to change in the code to prevent multiple charges on some cards
hey there, stepping in for my colleagues
let's take a step back: what is your actual end goal? A subscription created on a customer with one payment for the first invoice?
Hey there, thanks
Yes, the end goal is to create a subscription with one payment on the first invoice
I achieve this with our current code for some test cards, but 4242 is behaving differently
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Broadly speaking, it doesnt really make sense to me that the test card you use would change the behaviour as youve described
me neither
I'm not saying its impossible, but i find i quite surprising
me too
I suspect there is some other factor here
there may be, but I have some very unhappy clients
Do you want an example of the expected outcome we are looking for?
Thats cus_TsMdQM7ldTOnCW as a model? right?
I see the following steps here:
1/ create the customer
2/ attach a PM
3/ setting this customers invoice default PM
4/ creating a setup intent & confirming for that PM
5/ creating a subscription, allowing it to use the default PM you've set up
I'm not a developer, but that sounds right
This seems fine, if a bit verbose/suboptimal (you can create the subscription and get a setup or payment intent automatically to confirm with a new payment method, but lets put that aside)
And what is the example payment that is not what you expect?
The cus is cus_TsMfPf6DU9QAnY
I have the subscription, the second one in the image above
But I seem to have a payment intent prior to the subscription
and I end up with two charges / two payments
Payment pi_3SubwKBcQAyRw7rx069LMnUO happens first with this standalone payment intent request: https://dashboard.stripe.com/acct_1EuGO9BcQAyRw7rx/test/logs/req_CzzXsLN03u9S9W
Payment pi_3SubwOBcQAyRw7rx0Vsq7vQU happens second during this subscription creation: https://dashboard.stripe.com/acct_1EuGO9BcQAyRw7rx/test/logs/req_YDQncqRLzOfgXf
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
That standalone payment intent request seems to be the piece you dont expect, since you say you're dealing with subscriptions only
So, for this card we add a request for a standalone payment intent request?
Yes, it is. And I don't get :
- why we're requesting a payment intent
- why it only happens with this test card
I can assure you I used the same code for all my tests, and the change in behaviour doesn't make sense to me
It may be the same code, but it must be a different path
I can't really tell you why, you (or your developer) will need to review your integration to determine why that happens
But this request to create that separate payment intent is an explicit separate request from your servers
And on your side can you see if we sent the same payment intent request for cus_TsMdQM7ldTOnCW?
I understand that I'm a pain, but knowing the above would be helpful to me
No, i don't see that same pattern on cus_TsMdQM7ldTOnCW -- i see no standalone payment intents there
Thanks. Do you know if test card 4242 requires a microtransaction to trigger 3DS?
What do you mean?
Let me rephrase, if I was to post a request only for a subscription using that test card, would 3DS get triggered?
No likely no, the 4242 card does not require 3ds and payments can be completed without authentication
If you want to require authentication for a first payment, thats what the 3155 card is for
Yeah, I think my code is taking an incorrect path because 3DS isn't triggered when it expects it to be
Final question, does Stripe offer a code review service? As in, if I was to share our code, could Stripe developers review it and tell us what we're doing wrong ?
Not exactly, no, in terms of high level review aligning with your product requirements. BOth here and via support we can help you identify how/why something is happening and how to change it, but in terms of flows in your app logic you will need to review that.
We do have a directory of partners who can help you build your integration: https://stripe.partners/
TBF, we're already paying 10 developers, I would hope they can nail it at some point. But this is our fourth iteration of this specific flow and we keep hitting errors.
Thanks for your help, I appreciate it.
NP -- happy to get your focus pointed in the right direction