#canopus_paymentintent-charges
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/1278803079784824953
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- canopus_paymentintent-charges, 15 hours ago, 34 messages
here is the request for my attempt to reproduce in Test Mode where I used account number 90012345:
https://dashboard.stripe.com/test/logs/req_62B1G7Z2TueyqO
Hi, we document how Payment Intents work here: https://docs.stripe.com/payments/paymentintents/lifecycle. In this case, https://dashboard.stripe.com/acct_1Nj6GXLnJjenxupO/logs/req_nkTxYz3LUeymTK the status is in 'status: "processing" so this is expcected that you do not get the charge id on bank debits.
But looking at that specific test method
how do I test a scenario like the one that happened in production, where the charge was created 4 days later:
https://dashboard.stripe.com/acct_1Nj6GXLnJjenxupO/logs/req_nkTxYz3LUeymTK
from my last support thread, I understand this is because of the notification period, as the BACS payment method was added shortly before the payment attempt
All of our available test data is here: https://docs.stripe.com/payments/bacs-debit/accept-a-payment?payment-ui=stripe-hosted#testing
I am unsure what you mean there, can you clarify?
my understanding of what happend in this case in production:
https://dashboard.stripe.com/connect/accounts/acct_1Nj6GXLnJjenxupO/payments/pi_3PjdCCLnJjenxupO0Xc5Q5lA
https://dashboard.stripe.com/acct_1Nj6GXLnJjenxupO/logs/req_nkTxYz3LUeymTK
- customer added BACS payment method
- immediately attempted to make a payment (application crashed because no charge was created along with the payment intent as our code expected, charge was created 4 days later)
before we went live with our support for BACS payment methods, we tested payment flows in Test Mode and experienced no issues
I should say that our code relies on the presence of a charge object in the PaymentIntent.create() api call response, with BACS, this appears to not be a guarantee anymore
I would like to know how we can test this scenario in Test Mode to validate my hotfix
Further looking at this...
here you can see that the payment intent is processing, but no charge was created / returned in the response (production case req_nkTxYz3LUeymTK)
here you can see the payment intent creation at the bottom and charge creation 4 days later (selected, 4th item from the bottom)
my understanding after my last support conversation is that this delay is because per BACS requirement that you notify the customer x days before the payment is processed, as the payment method / mandate was just created before the payment was attempted
I'm testing this now on my end
Ok, I was able to test this and it looks like that is expected. There is no latest charge object when you create the Payment Intent as there is no payment method.
you may need to clarify what you mean by this, there is a payment method set in the request to create the payment intent (req_nkTxYz3LUeymTK)
canopus_paymentintent-charges
@uncut zealot welcome back! I'm not entirely sure how to test it. I just tried and I also see an immediate payment which is unexpected. You likely will need to report this bug directly to our support team who can investigate this further for you: https://support.stripe.com/contact
I'll look on my end and likely flag too since Test mode should absolutely mirror Live mode behaviour
Okay if you use the 90012345 number it works fine @uncut zealot
it's this one:
The payment succeeds after three minutes and the PaymentIntent transitions from processing to succeeded.
but still that first test value should do the exact same, I don't get why it doesn't so I'll flag internally
thats what was suggested to me, and I tested with, but that creates the charge immediately
test mode request: https://dashboard.stripe.com/test/logs/req_OCttmu4xCi7kSF
https://dashboard.stripe.com/test/payments/pi_3PtF9sFKCtH3VP670MxyDVHm
you can see that in the payment intent creation response, the charge is present
exactly which "test value" do you mean here
yeah but that's different. On that request you explicitly passed a saved payment method and an already signed Mandate. I did mention the other time that this has to do with Mandates and customer notifications
Can you please try as a brand new payment for a new customer? Not with an already saved PM server-side?
do you mean "00012345"
exactly which "test value" do you mean here
https://docs.stripe.com/payments/bacs-debit/accept-a-payment?payment-ui=stripe-hosted#testing
the account number you enter when you collect their bank account details
So I mean the second one in that screenshot not the first one
so, test the following case?:
- create a new customer
- attach BACS payment method (acct number 90012345) to new customer
- create payment intent?
this customer object in my example from test mode, was created hours ago, payment method was added minutes before the first charge
we always attach a payment method to a customer before processing a charge
The canonical integration path is usually more
- create a new customer
- create payment intent
- Confirm that PaymentIntent client-side with PaymentElement.
if you have _already attached the PaymentMethod and got a valid Mandate, the behaviour can be different
we are probably a bit different from the cannonical path because we support multiple payment processors, most of which don't have client side libraries to handle checkout.
we use stripe js/elements for adding payment methods / and any verification (e.g. 3DSecure)
this kinda explains why we had to use stripe Checkout as it was the only way to attach a BACS payment method for future use without immediately processing a payment
So you're collecting bank account details without a payment upfront and charging days later offline?
Or you're collecting bank account details without a payment and immediately turning around and charging their bank account details on Stripe anyways?
both happen for us, in most cases the customer already has a subscription at that point, paying with credit card
"So you're collecting bank account details without a payment upfront and charging days later offline?"
so, if the customer has already paid their latest invoice, this would be the scenario
"Or you're collecting bank account details without a payment and immediately turning around and charging their bank account details on Stripe anyways?"
if the customer has a due invoice, they will likely add their bank account and immediately pay that invoice (this is the production case, where we had the reported issue and everything worked fine in Test Mode) https://dashboard.stripe.com/connect/accounts/acct_1Nj6GXLnJjenxupO/payments/pi_3PjdCCLnJjenxupO0Xc5Q5lA
Yeah I think that's your issue here. In that second case you are attempting to charge them before the Mandate is set up and we emailed/notified them
isn't the Mandate active and set up after the customer fills in their bank details and approves the mandate?
or does the mandate have a different status until the required notification period has elapsed or until the email notification is finally sent?
My understanding is that with BACS there's a real notification that happens with their bank first and later they say active/inactive
Sorry this is a subtle edge-case I don't know much about
You might have to talk to our support team for a deeper explanation
but you understand the case where we cannot reproduce in Test Mode today, but can see in production, and you will flag this internally
Have you tried with the bank account I advised?
this one?: acct number 90012345
yes
yea, thats the one I've been testing with all along
gotcha, then yeah I'm not sure. I'd recommend reaching out to our support to dive deeper into this and your specific needs: https://support.stripe.com/contact
any suggestions to quickly get past tier 1 support?
No sorry. It will take a while to get an answer anyways, it's not something someone will know today at least.
In the meantime, I would recommend trying what I mentioned where you just try to take a payment upfront with that PaymentMethod since it will overall behave similarly
thats not a trivial change for us, as all of our many checkout / payment flows with the exception of adding a payment method are not using stripe Payment Elements
I'm working on a hotfix that has to go live tonight or tomorrow, before the first of the month when a bunch of customers may process their first payments using BACS
I'm not asking you to change the whole code. Just to do this in Test mode to reproduce the case where a PaymentIntent has latest_charge: null
you need a PaymentElement to achieve that with a BACS payment method, right?
It works the same with Checkout in payment mode
not exactly the same payment intent is created, but the charge is created a couple seconds later
but sill not 2-4 days later like the case in production
yeah but that's normal. If Test mode waited 4 days it's be unusable. We do the delay as a way to warn you that there's an async flow
true, but a few seconds isn't a lot of time, I would expect maybe 3 minutes for test mode like some of the other test case transitions
yeah I don't disagree. Sorry if I had a magic wand I'd re-design the whole Test mode behaviour for BACS ๐ฆ
maybe if I attach the payment method and within 3 seconds process the payment, I could reproduce