#NickSaintJohn-connect-capabiliites

1 messages ยท Page 1 of 1 (latest)

modest thistle
#

For example, is configuring a bank account going to provide transfer capabilities, payment, or both?
No, Capabilities are separate from an external bank account on a Connected acct

you just enable whichever Capability you want, like card_payments or transfers by updating an Account (or on acct creation)

hushed hemlock
#

Ok, maybe I need to explain from the other side of things... I'm looking to receive card payments on my platform, to forward on (minus commission) to my customers with express accounts. I'm using requirements of a bank account, company details... I'm then waiting to receive webhooks that enable those two capabilities, before I then enable functionality on my platform...

#

Additinally, I'm going to allow for payment from one client, to another, by way of a transfer... I'm assuming this transfer capability is something related to having a confirmed bank account?

#

I'm just a bit lost with all the terminology, and could do with a bit of translation ๐Ÿ™‚

#

Most importantly, I need to know how to trigger a webhook to convey the 'current' state of an account, preferably on a one-off basis. As I mentioned, one has been missed, and yet it is not appearing in the history, as they usually do

modest thistle
#

reading one sec

hushed hemlock
#

๐Ÿ‘

modest thistle
#

ah I see, so there's still some things you might be unclear on I believe - let's start here (to help me map out a clear understanding) as there are multiple questions here

1/ mind sharing what account you created (like a request ID from Dashboard Logs) and what you passed to it, for this :

I'm using requirements of a bank account, company details... I'm then waiting to receive webhooks that enable those two capabilities, before I then enable functionality on my platform...

2/ what Webhook Endpoint have you created? also from your Stripe Dashboard "Events" page
re:

As I mentioned, one has been missed, and yet it is not appearing in the history, as they usually do

hushed hemlock
#
  1. I'm currently monitoring all Webhooks, then selectively disabling them when I inspect them and realise I will never need the info. The specific Webhook I need is an 'account.updated' one... I have an email copy of the webhook from when it was sent, but it is simply not appearing in the history.
#

1... I'll take a look now, see what I can find... one sec

#

Not really sure what I'm looking for here... I could send you the PHP for the request, if that helps?

#

$stripe = new \Stripe\StripeClient(_STRIPE_API_KEY);
try {

if ( $provider['stripeAccountRef'] == "" ) {
  $res = $stripe->accounts->create([
    'type' => ($bodyVars['newAccountType'] == 'standard' ? 'standard' : 'express'),
    'country' => $provider['countryCode'],
    'email' => $provider['billingEmail'],
    'capabilities' => [
      'card_payments' => [ 'requested' => true ],
      'transfers' => [ 'requested' => true ],
      // 'sepa_debit_payments' => [ 'requested' => true ] // Required for posting jobs (facilitates payments to other ROs)
    ]
  ]);
  
  logThis("Created account {$res->id} for provider {$provider['id']}");
  $accountId = $res->id;

$account_links = $stripe->accountLinks->create([...
]);
modest thistle
hushed hemlock
#

It's actually a live account I've got the issue with...

I think this may be the request you need....

{
"type": "express",
"country": "GB",
"email": "support@breakdownnetwork.com",
"capabilities": {
"card_payments": {
"requested": "true"
},
"transfers": {
"requested": "true"
}
}
}

#

req_rCsHF4GAsD2YBl

modest thistle
#

thanks, looking

#

ok so that created an Express acct

you do have "Account" and "Connect" Webhook Endpoints set up

from that Express acct you created it sent this (as an example) account.updated Webhook Event: https://dashboard.stripe.com/events/evt_1KjPpiPQhfE3txBVFRvBRpdY

That was sent to your
https://redacted.com/production/v2/stripe?type=application
Webhook Endpoint.

Your code did respond with a 200 HTTP status but the request body had " "message": "account.updated was NOT handled!""

so I'm guessing your code maybe didn't handle the event but still returned a 200 HTTP status. TBC Stripe only looks at the HTTP status of the response, not the body but I'm just trying to glean what your code could have been doing. Does that help?

hushed hemlock
#

I have "account" and "application" webhooks configured

#

I have to assume those are the same two things you are suggesting

#

Ahh, soory, yes, I see now in the 'type' field... "Direct" and "Connect"

#

The Webhook event I am missing is this one... evt_1KjPpiPQhfE3txBVFRvBRpdY

#

Yes, at the time I was not handling them, but that has since changed, so I pressed 're-send', which worked well

#

However, the webhook I sent through a sec ago doesn't seem to appear, or perhaps I am just looking in the wrong place

#

Ok, I think I've found a bug which was causing me to miss the Webhook I mentioned earlier... When I go to 'Webhooks' to see the history, there are three tabs, 'All', 'Succeeded', and 'Failed'... I was under the assumption that 'All' would show everything, but it turns out that is not true... I have three Successful webhooks sent today, yet when I go to the 'All' tab, only one of them appears... weird!

#

To clarify, I do respond with a 200, as I am at very least generating logs and emails to let me know if I'm not handling things when I perhaps should be (and then disabling them if not), but the problem arose where a webhook was missing, and I needed an up-to-date Webhook to be sent. Is there a way to trigger a webhook, that simply contains the current status of a linked account, or do I need to make a specific request for that via the API?

modest thistle
#

reading here one sec

#

was catching up on older threads

#

Is there a way to trigger a webhook, that simply contains the current status of a linked account, or do I need to make a specific request for that via the API?

if you miss a Webhook Event, I would say fetch the Event via the API and handle it manualy

#

To clarify, I do respond with a 200, as I am at very least generating logs and emails to let me know if I'm not handling things when I perhaps should be

I would not respond to this with a 200, instead a 400 so that Stripe re-sends it automatically and I can handle the event later once my code recovers

hushed hemlock
#

I'd prefer not to be hit with continuous reattempts, as if I send a 400 (due to me perhaps not wanting that particular Webhook) then it will mean that it will continue to resend indefinitely... Which can obviously spiral after the same thing happens with a few hundred of them!

modest thistle
#

gotcha

hushed hemlock
#

Did the images I sent you reveal a bug? I think the three Webhooks from today should appear in the 'All' tab, but don't

modest thistle
#

stepping away, a colleague will be helping out in a sec

hushed hemlock
#

No problem... I may disappear for a short time, too ๐Ÿ™‚

crude halo
#

HI ๐Ÿ‘‹ I'm stepping in for @modest thistle Give me a few minutes to catch up

hushed hemlock
#

...or can hang about

#

Cool cool

crude halo
#

There's a lot of context here so it might take me a while, just an FYI