#xfechx
1 messages · Page 1 of 1 (latest)
Hello xfechx, we'll be with you shortly! 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.
• xfechx, 19 hours ago, 8 messages
• xfechx, 21 hours ago, 5 messages
Hi @slate plover yes
I cannot see the event in the webhook (i set it up to listen to connected accounts)
what's the webhook endpoint ID?
one moment
we_1O5PeAH19Ab5LLaZgZ5ujOzU
please check this payment:
pi_3O5PfQH19Ab5LLaZ1SQmpDzd
I want to be able to process charge.succeded from that payment
taking a look
thank you
just fyi, it's better to listen to payment_intent.* events rather than the charge.*
except for refunds because those happen on the charge
Ok, thanks for the tip. I will change it later, but my app already listens and makes stuff with charge.succeded
that is why I would like to listen to that
you can make the same things with payment_intent.succeededright?
I hope so. But right now my question is something else..
yes I agree and I'm looking into it, it's just that whenever there's some improvement that we can suggest, I always try to take the opportunity to address it
you're using Checkout Sessions?
then instead of using either charge.succeeded or payment_intent.succeeded the one you should be using is checkout.session.completed
ok I see now you're underlying issue
so basically the event was sent to https://app.somamystica.org/stripe/listener/?account=somamystica_test instead of https://app.somamystica.org/stripe/listener/?account=somamystica2023_test
I'm not sure whether this makes a difference or not in your code
but in all cases your webhook endpoint responded
yes
but I have added the correct URL in test mode?
sorry I was a bit confused with everything since the URLs are really similar
why was it been sent to the non-connected webhook?
and why is it not sending anything to the connected webhook?
no worries. I have modified them so that they are both the same
And why is it not taking the event (as you can see the event printed in debug is the same event, but it is not been recognized in the platform webhook)
I thought that the problem was that it is an event sent to connected account, and there is where I can process the event, correct?
this is a destination charge
so technically the charge is created on the Platform Account
not the connected account
ok
so you shouldn't be getting the event through the Connect webhook
So what I want to do is:
but rather on your own account
that's even better
which is what happened here
but then when I try to retrieve the event, I am getting that error...
<h4>We are sorry</h4><p><strong>There was a problem with your transaction<br>No such notification: 'evt_3O5PfQH19Ab5LLaZ1UZOmwzY'
I don't think so
how can we trace that?
my webhook listener, just takes the pk and sk from platform (when it is a non-connected event) and processes the event
in this case charge.succeded
I don't have access to your code
what is generating this error?
would you mind sharing your code?
I have now managed to process it. I was confused if to use connected or platform webhook in this specific scenario
perfect
yes sure
Is there a way of doing a transfer (just how it is in this case) and do another transfer instantaneously to another account?
I'm not sure I understand
So , in this scenario. There is a destination charge, part of that destination charge splits the funds between the platform and the connected account.
When the platform receives the application fees, we then would like to also create another transfer, to another connected account. Can this be done instantly?
all part of the same charge
yes but if you have multiparty
it's better to use the separate charges and transfers
what do you mean multiparty?
So, the original charge, I cannot modify
So we will have to workaround that
I am already trying a separate transfer, but I get this error:
The source_transaction ch_3O5PfQH19Ab5LLaZ1mwYEJTf can only be transferred to the account that the destination field was set to when it was created (acct_1O2zNyHJuHLhpL7r).
Hey! Taking over for my colleague. Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
hey please read first
I don't have a failing API request, thanks
it is about creating a transfer after a transfer has been made from a destination charge
I would like to know how to do it, if It cannot be all done at once on the same charge
Could you please share the requestId of this error message ?
sure, how can I share it. I am looking at dashboard > developers > webhooks
evt_3O5PfQH19Ab5LLaZ1UZOmwzY
This event doesn't indicate the error message you were sharing with us.
of course it is
evt_3O5PfQH19Ab5LLaZ1UZOmwzY
I copied it from that page I just told you
This was copied from your webhook endpoint response and not Stripe Response.
No worries, let's focus on the the payment intent pi_3O5PfQH19Ab5LLaZ1SQmpDzd. You've set transfer account to acct_1O2zNyHJuHLhpL7r
To which account you are trying to do the other transfer?
acct_17QCgDChCzTFj30F
No you can't achieve separate Charge and transfer from a destination charge
at all?
remove payment_intent_data.transfer_data.account when creating the Checkout Session
and after payment is completed
I cant
create two transfers
one for acct_17QCgDChCzTFj30F and another for evt_3O5PfQH19Ab5LLaZ1UZOmwzY
Why ?
because we are using a third party to integrate to our app
and they have developed the app to do the original split payment (application fee) with the express account and those parameters already
So we have to work around that
we have to work with the charge.succeded exactly how it is already formulated
so we need to find a way to then transfer to another account, after the funds have arrived in the platform
No that's not possible
You need to ask that third party to update their integration or use your own.
AFAIK, A platform can at any time transfer funds to a connected account. Yes?
that doesn't sound reasonable to me right now. This is a developer channel
if a platform can create a transfer at any given time (without a charge associated), then it should be possible to transfer those funds later?
No, it depends how they have created the Charge firstly
So a platform cannot transfer at any time to a connected account?
independently of a charge?
You can if your Platform balance is able to cover the transfer amount
OK, so it needs to be done after balance.available
because the application fee does not get reflected right away on the platform, correct?
Not only fees, but you need to make sure that you have enough balance at your platform account
You can do some tests using this cards:
https://stripe.com/docs/testing#available-balance
You'll have immediate available balance
I just used one of the cards here, but cannot see the event balance.available on test mode?
no, I just listen to balance.available event
but there is no balance.available
event
I cannot see it in the dashboard logs or events
and I used both test cards that add to balance immediately
That's may be expected because this is a particular test card (the fact you don't get an event)
Then use normal card and you probably need to wait untill you have available balance
Can you share the request body of the transfer you are calling ?
can you go back into our conversation a little bit?
I am asking you how can I test for balance.available
you gave me two cards
they don't provide balance.available
I need to test that event
so that the transfer is made when balance is available
I do not want to wait for X amount of days on test mode to test this
How are you creating the transfer to your second Connect Account ?
echo "--- EVENT: BALANCE.AVAILABLE ---";
try{
$balance = \Stripe\Balance::retrieve();
stripe_transfer();
} catch(\Stripe\Error\InvalidRequest $e){
error_messages($e);
} catch (\Stripe\Error\Card $e){
error_messages($e);
} catch (Exception $e){
error_messages($e);
}
}```
I am saving the collected fees on the database and then when balance.available event, it transfers
but my question right now is, why I cannot see balance.available event in test mode?
why is it not triggering, after using those cards
which card can I use , so that it triggers balance.available in test mode
try using stripe trigger balance.available
where ?
in your terminal
I haven't used stripe terminal before
I really would prefer right now if you can tell me how can we trigger balance.available with a test card. If i remember correctly, I was in the past able to do this
OK, takes 2 minutes
for balance.available
My next question is
when balance.available AND automatic payouts
can transfers still be made as soon as balance.available?
or do we need to switch to manual (API) payouts, in order to first send transfers and then payout to platform bank the remaining amounts?
no you can't do separate transfers if automatic payouts are enabled