#xfechx

1 messages · Page 1 of 1 (latest)

compact oasisBOT
#

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

slate plover
#

👋 happy to help

#

are we talking about webhooks with connect?

crimson summit
#

Hi @slate plover yes

#

I cannot see the event in the webhook (i set it up to listen to connected accounts)

slate plover
#

what's the webhook endpoint ID?

crimson summit
#

one moment

#

we_1O5PeAH19Ab5LLaZgZ5ujOzU

#

please check this payment:

#

pi_3O5PfQH19Ab5LLaZ1SQmpDzd

#

I want to be able to process charge.succeded from that payment

slate plover
#

taking a look

crimson summit
#

thank you

slate plover
#

just fyi, it's better to listen to payment_intent.* events rather than the charge.*

#

except for refunds because those happen on the charge

crimson summit
#

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

slate plover
crimson summit
#

I hope so. But right now my question is something else..

slate plover
#

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

#

I'm not sure whether this makes a difference or not in your code

#

but in all cases your webhook endpoint responded

crimson summit
crimson summit
slate plover
#

sorry I was a bit confused with everything since the URLs are really similar

crimson summit
#

why was it been sent to the non-connected webhook?

#

and why is it not sending anything to the connected webhook?

crimson summit
#

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?

slate plover
#

this is a destination charge

#

so technically the charge is created on the Platform Account

#

not the connected account

crimson summit
#

ok

slate plover
#

so you shouldn't be getting the event through the Connect webhook

crimson summit
#

So what I want to do is:

slate plover
#

but rather on your own account

crimson summit
slate plover
#

which is what happened here

crimson summit
#

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'

slate plover
#

maybe you're using a StripeAccount Header

#

with the connected account

crimson summit
#

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

slate plover
#

I don't have access to your code

#

what is generating this error?

#

would you mind sharing your code?

crimson summit
#

I have now managed to process it. I was confused if to use connected or platform webhook in this specific scenario

slate plover
#

perfect

crimson summit
#

but

#

I want to ask you for further help, is that ok?

slate plover
#

yes sure

crimson summit
#

Is there a way of doing a transfer (just how it is in this case) and do another transfer instantaneously to another account?

slate plover
#

I'm not sure I understand

crimson summit
#

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

compact oasisBOT
slate plover
#

yes but if you have multiparty

#

it's better to use the separate charges and transfers

crimson summit
#

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).

hard saffron
crimson summit
#

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

hard saffron
crimson summit
#

sure, how can I share it. I am looking at dashboard > developers > webhooks

#

evt_3O5PfQH19Ab5LLaZ1UZOmwzY

hard saffron
#

This event doesn't indicate the error message you were sharing with us.

crimson summit
#

of course it is

#

evt_3O5PfQH19Ab5LLaZ1UZOmwzY

#

I copied it from that page I just told you

hard saffron
#

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?

crimson summit
#

acct_17QCgDChCzTFj30F

hard saffron
#

No you can't achieve separate Charge and transfer from a destination charge

crimson summit
#

at all?

hard saffron
#

remove payment_intent_data.transfer_data.account when creating the Checkout Session

#

and after payment is completed

crimson summit
#

I cant

hard saffron
#

create two transfers

#

one for acct_17QCgDChCzTFj30F and another for evt_3O5PfQH19Ab5LLaZ1UZOmwzY

hard saffron
crimson summit
#

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

hard saffron
#

You need to ask that third party to update their integration or use your own.

crimson summit
#

AFAIK, A platform can at any time transfer funds to a connected account. Yes?

crimson summit
#

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?

hard saffron
crimson summit
#

So a platform cannot transfer at any time to a connected account?

#

independently of a charge?

hard saffron
#

You can if your Platform balance is able to cover the transfer amount

crimson summit
#

OK, so it needs to be done after balance.available

#

because the application fee does not get reflected right away on the platform, correct?

hard saffron
#

Not only fees, but you need to make sure that you have enough balance at your platform account

crimson summit
#

I just used one of the cards here, but cannot see the event balance.available on test mode?

hard saffron
#

Did you tried to retrieve your balance via api ?

crimson summit
#

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

hard saffron
#

That's may be expected because this is a particular test card (the fact you don't get an event)

crimson summit
#

??

#

I need to test for that event specifically

hard saffron
#

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 ?

crimson summit
#

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

hard saffron
#

How are you creating the transfer to your second Connect Account ?

crimson summit
#
    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

crimson summit
#

where ?

hard saffron
#

in your terminal

crimson summit
#

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?

hard saffron