#DeliveryTiem

1 messages · Page 1 of 1 (latest)

south laurelBOT
loud trench
#

Hmm, don't believe there is. Checking

polar otter
#

Thanks, it's a crucial piece for us

#

Handling edge cases that can cause side effects if not checking currently pending charges

loud trench
#

To confirm, this is ACH Debit?

polar otter
#

Yep that's the one

#

US bank accounts

loud trench
#

Got it, confirming

polar otter
#

What I am seeing is the payment is instantly marked as paid (using test acc no. 000123456789) and not pending status.

#

The second I click 'pay' on our frontend I immediately refresh the payment list on the Stripe dashboard and it is marked as paid

loud trench
#

You should receive a payment_intent.processing webhook event (which is generally what we'd recommend for async/delayed payment methods rather than handling them synchronously)

#

So I guess it depends on what it is you're trying to test exactly when in a pending state

polar otter
#

So what I'm exactly testing is just checking the 'pending' property of the charge object to prevent triggering our own business logic when a charge is still in transit.

#

Unsure what you mean by handling the payment synchronously in comparison to async

ocean temple
polar otter
# ocean temple should be totally possible, is something blocking exactly? you would get webhook...

So current logic is using the charge id to retrieve the charge object, then check if 'status' property value is 'pending'. Since processing time is a few seconds I can't have enough time to debug & breakpoint the 5 lines of codes I have to get charge & check the property. From @loud trench 's comment and yourself, we need to implement support for capturing & storing the 'pending' webhook event rather than retrieving the charge itself.

ocean temple
polar otter
#

Okay cool I get the general concept, we need to do some thought to implement it this way instead. We already accept webhooks so a bit of spec work & db changes and we should be good to go