#Tonhom

1 messages · Page 1 of 1 (latest)

fast ibexBOT
unreal iron
#

so I don't think it's expected or required that you get the charge.succeeded before a payout.created, that's not really a property of how our API works

bright magnet
#

Does it always behave like this since the old ACH API? Before I upgraded an ACH API to the new version, I always saw “payout.created” came after “charge.succeeded”.

#

My problem is, the status of the transaction cannot be changed because the order of event is changed. So I’m trying to clarify the root cause.

#

And I see that "payout.created" always come with the status "in_transit"

rough rock
#

Hey! Taking over for my colleague. Let me catch up.

bright magnet
#

Okay!

#

Let me explain more. My platform was implemented to change the status of transaction by Stripe event in this order.

  1. charge.pending -> Processing
  2. charge.succeeded -> Paid
  3. payout.created -> Depositing
  4. payout.paid -> Deposited
#

And current problem is "payout.created" come before "charge.succeeded" so that transaction status cannot be updated.

#

It was working for a year by this flow

#

and then, after I upgrade the API from old ACH to the new ACH, the problem was occurred

#

So, I want to know what should I do to fix this and to follow the standard of your API

rough rock
#

Thank you for those details

current problem is "payout.created" come before "charge.succeeded"
How are you creating the payout? is it manual or automatic?

bright magnet
#

automatic

#

The event timeline of this transaction is

  1. charge.pending - 9/27/22, 11:03:38 PM
  2. transfer.created - 9/28/22, 1:17:47 PM
  3. payout.created - 10/3/22, 1:47:38 AM
  4. charge.succeeded - 10/4/22, 5:12:28 AM
rough rock
bright magnet
#

sure

#
  1. charge.pending - evt_3LmsQeBoT4BLkOhv1Kfzqbv6
  2. transfer.created - evt_3LmsQeBoT4BLkOhv1FaBYzTa
  3. payout.created - evt_1LodksBN9w1WbzhvQCiQH2gu
  4. charge.succeeded - evt_3LmsQeBoT4BLkOhv1DmV8RyS
rough rock
#

Thanks for sharing let me check

rough rock
#

Here the PaymentMethod used is us_bank_account. 4. The charge is made succeeded after the funds are available. The transfer was created after creating the charge which is normal. But the transfer were available in the connected account once the charge fund was available. This is mentioned here in the Documentation:
https://stripe.com/docs/connect/charges-transfers#transfer-availability:~:text=the transfer itself only occurs once the charge’s funds become available
So 1. and 2. are expected to come in that order before 4.
The payout was created for two transfers related charges: tr_3LmsQeBoT4BLkOhv1vsnjuCX(which is related to the event you are sharing) and py_1Ln6ikBN9w1Wbzhv2zBMh9OC

#

Now why payout.created comes before charge.succeeded with one day in advance, didn't find an explanation so far

#

Give me couple of minutes while I search further

bright magnet
#

got it

gray jacinth
#

Hey, what indication is there that payment (py_3LmsQeBoT4BLkOhv10ibPQ6C) is even a part of that payout (po_1LodMaBN9w1WbzhvvyQn8zCf)?

#

Ah, ok. I missed the transfer part

#

What do you mean by 'transaction status cannot be updated'?

bright magnet
#

It just, I use state machine to handle status transition by your event. So, if the event order is changed, the transition order will be blocked by the state machine.

gray jacinth
#

I'm not really following. Is this some of your own logic?

bright magnet
#

So I want to confirm that why the order of the event is changed. Because It was working for a year and I designed the system following the behavior of your event at that time

#

Yes, "My" transaction data

#

I receive your event via the webhook to update the data on our side

#

because i'm using ACH Direct Debit

gray jacinth
#

I explained by my colleague previous, we do often create a payout before transactions/funds in the payout may have settled. It's not an indication that the payout has actually been sent

#

I'd recommend adapting your integration to reflect that

bright magnet
#

I'm okay to adapt but I want to know first that why it was changed or when it changed.

#

Okay, so, another question is, does setting delay_days help to delay a creating of the payout?

gray jacinth
#

I'm not sure it ever has

gray jacinth
# bright magnet Okay, so, another question is, does setting `delay_days` help to delay a creatin...

Docs explains it well:

The delay_days property reflects how long it takes for destination charges (or direct charges performed on the connected account) to become available for payout.

This field is useful for dictating automatic payouts. For example, if you want your connected accounts to receive their funds 2 weeks after the charge is made, set interval to daily and delay_days to 14. When setting or updating this field, you may pass the string minimum to choose the lowest permitted value.
https://stripe.com/docs/connect/manage-payout-schedule

Manage the automatic payout schedule to your connected accounts.

bright magnet
#

"charge is made" means after "charge.processing" doesn't it?

gray jacinth
#

I'm not sure, but that's not really relevant in this case as you're using source_transaction when creating the transfer. That inherently won't allow for the transfer to happen until the associated payment funds are available

bright magnet
#

Okay, so the conclusion is I should adjust my integration that “payout.created” doesn’t mean it is in transit and may come before “charge.succeeded” generally. Am I understanding correct?

gray jacinth
#

Yes, that is our recommendation

bright magnet
#

Although I’m using a Standard Settlement timing right?

#

My confusion is the standard settlement won’t initiate a payout before the charge as the source transaction is success

#

That is my understanding

gray jacinth
#

You've confused me

#

There are instances where a payout.created event may trigger and include a payment/balance transaction that has yet to settle. But that does not always mean the payout is in transit

#

We bundle payments/balance transactions into the payout that are forecast to settle at the time of the payout schedule

#

That's the case here

bright magnet
#

Okay, I think I got it now.

#

Thanks, this is all of my questions for now