#xfechx

1 messages · Page 1 of 1 (latest)

restive magnetBOT
dire sluice
#

Hello! Let's keep everything in this thread:

I am having trouble getting those details even after expanding. I use php so would be great if someone with php knowledge can help me.

#

Can you share what you've tried and what you're seeing vs. what you expect/want to see?

south eagle
#

well for transfers, there is no much I can obtain apart from the account id. I get the application fee like this (after expanding the balance transaction:

      'created' => [
          'gte' => strtotime($startDate),
          'lt' => strtotime($endDate) + 86400 // Add 1 day to include payments on the end date
      ],
      'limit' => 100, 
      //'expand'=>['data.source']
      expand => [
          'data.source.customer',
          'data.source.payment_intent',
          'data.source.invoice',
      ]
    ], $connected_account
  );```
#

my specific question is for app fees, and transfers.

  1. For transfers that come from a platform to my account. They are listed as "type": "payment". The useful info I can see from the plattfom that I can retrieve to then retrieve account info is:

balance_transaction->source->source->id

  1. For application fees, I can see

balance_tranaction->source->account

#

so with the above, I have the account id from those balance transactions. But then I want to know how to obtain in the most reliable way possible:

  1. for transfers:
    platform name or person name
    address
    email

  2. for application fees:
    connected account address
    connected account email
    connected account person or business name

dire sluice
#

To clarify, for #1 you want to obtain this from the connected account's point of view? Meaning you only have the connected account's API keys, not the platform's?

south eagle
#

yes, from the connected account point of view

dire sluice
#

I don't think that's possible, but I might be misunderstanding the scenario. Are we talking about Standard connected accounts?

south eagle
#

Yes standard

dire sluice
#

But destination charges are being used? Not direct charges?

south eagle
#

transfers

#

in no. 1 scenario, they are transfers

#

look, here is an example of one:

dire sluice
#

This is not an approach we recommend. Separate charges and transfers should not be used with Standard accounts.

south eagle
#

I am not asking if is recommended or not, sorry

#

it is a scenario that is already been used. And we need to account for past transactions that are made like this

#

the account who received the transfers need to generate invoices that account for scenarios like the above, so we need to obtain the platform (in the connected account point of view) address, email and name.

#

invoices (not talking about stripe product)

#

tax invoices, to give to accountant, to comply with tax regulations

dire sluice
#

I don't think that's possible, but give me a few minutes to investigate.

south eagle
#

please do, because if it is not possible, then how can we generate this data?

dire sluice
south eagle
#

I tried before, but let me try again, I think it fails.

dire sluice
#

I'm 99% sure it's going to fail, yeah, but want to cover that other 1%.

south eagle
#

ah actually it doesn't fail. ?

#

I actually can see all the info..

#

I just curl'd

#
  "id": "acct_1IJoqWIVVhxSAz7H",
  "object": "account",
  "business_logo": null,
  "business_logo_large": null,
  "business_name": null,
  "business_primary_color": null,
  "business_url": "marlarecords.com",
  "capabilities": {
    "bancontact_payments": "active",
    "blik_payments": "active",
    "card_payments": "active",
    "cartes_bancaires_payments": "pending",
    "eps_payments": "active",
    "giropay_payments": "active",
    "ideal_payments": "active",
    "klarna_payments": "active",
    "link_payments": "active",
    "p24_payments": "active",
    "platform_payments": "active",
    "sepa_debit_payments": "active",
    "sofort_payments": "active"
  },
  "charges_enabled": true,
  "controller": {
    "type": "account"
  },
  "country": "DE",
  "default_currency": "eur",
  "details_submitted": true,
  "display_name": "Marla Records",
  "email": "marlarecords11@gmail.com",
  "future_verification": {
    "disabled_reason": null,
    "due_by": null,
    "errors": [],
    "fields_needed": [],
    "pending_verification": []
  },
  "mcc": "5735",
  "metadata": {},
  "payouts_enabled": true,
  "statement_descriptor": "MARLA RECORDS",
  "statement_descriptor_kana": null,
  "statement_descriptor_kanji": null,
  "statement_descriptor_prefix": "MARLA",
  "support_address": null,
  "support_email": null,
  "support_phone": "+4903061653181",
  "support_url": null,
  "timezone": "Europe/Berlin",
  "type": "standard",
  "verification": {
    "disabled_reason": null,
    "due_by": null,
    "errors": [],
    "fields_needed": [],
    "pending_verification": []
  }
#

but where can I obtain address for example?

dire sluice
#

You're sure you made that request with the connected account's API key, not the platform's?

#

Can you give me the request ID for that request?

south eagle
#

sure, how can I find it?

dire sluice
#

If you look in the Dashboard for it make sure you change the filters to show GET requests.

south eagle
#

I think is this one:
req_AFJjk4Sl8OWtfQ

#

actually it is not..

#

hmm

#

hmm actually. Is it because the connected account is also (in some scenarios) the platform?

#

like they are interconnected.

#

But that would actually be the case in all of this scenario.

dire sluice
#

That should not be the case. It's possible for a platform to connect to itself, but that's very much not recommended, and for the two accounts here that does not seem to be the case.

#

You said you made this request with curl, correct?

south eagle
#

yes

#

with the connected account sk_live

dire sluice
#

Can you make it again, but add the -v flag? That should show the headers, and you can get the request ID from those headers.

south eagle
#

please show me an example with -v flag

#

ah i got it

#

cant see req id

#

ah here

#

sorry

#

req_MeOo74gzQCTuND

#

I don't mind if they are interconnected, if I can still access the platform details because I need to retrieve the info I mentioned

#

but not sure why "business_name": null,

#

in the result

dire sluice
#

Wait, so that's a Connect request made from a platform on a connected account.

south eagle
#

yes, so as I said

dire sluice
#

I thought the idea here was to make the request FROM the connected account, not from a platform?

#

Like you used a platform's API key here, not a connected account's API key.

south eagle
#

and the transfer was made as a platform? (i.e connected account -> platform?) I think so. Maybe I got confused

#

but my goal is to obtain those details:
email, address, name

#

from these scenarios (which are account transfers).
and from application_fees. I will send you example in a bit.

dire sluice
#

Hang on, so there are two accounts here, acct_1IJoqWIVVhxSAz7H and acct_1ClDIPHlZBj3A1TO, but I thought one of them was the platform and the other was the connected account, but what I'm seeing is that they're both platforms and they're both connected to each other. Is that expected?

south eagle
#

yes

#

that's expected

#

as I said, in some scenarios they act as one and sometimes as the other.

#

it is expected

#

in any way, what is the best (more reliable) way to obtain the details I asked? I see the json quite empty... I can also fill this details on the connected/platform account but need to know which ones I should

dire sluice
#

Well, as you saw you can retrieve the account as a connected account using the approach you used in curl, and that will give you the most information about the account you have access to. Additional details are not available.

#

This is one of the many reasons we do not recommend using Transfers with Standard accounts like this.

south eagle
#

ok, but right now I have to account for 2021

dire sluice
#

A platform has only limited access to the information about Standard connected accounts.

south eagle
#

I see

#

so where can I fill this data (in dashboard I mean)

#
  "id": "acct_1IJoqWIVVhxSAz7H",
  "object": "account",
  "business_logo": null,
  "business_logo_large": null,
  "business_name": null,
  "business_primary_color": null,
  "business_url": "marlarecords.com",
  "capabilities": {
    "bancontact_payments": "active",
    "blik_payments": "active",
    "card_payments": "active",
    "cartes_bancaires_payments": "pending",
    "eps_payments": "active",
    "giropay_payments": "active",
    "ideal_payments": "active",
    "klarna_payments": "active",
    "link_payments": "active",
    "p24_payments": "active",
    "platform_payments": "active",
    "sepa_debit_payments": "active",
    "sofort_payments": "active"
  },
  "charges_enabled": true,
  "controller": {
    "type": "account"
  },
  "country": "DE",
  "default_currency": "eur",
  "details_submitted": true,
  "display_name": "Marla Records",
  "email": "marlarecords11@gmail.com",
  "future_verification": {
    "disabled_reason": null,
    "due_by": null,
    "errors": [],
    "fields_needed": [],
    "pending_verification": []
  },
  "mcc": "5735",
  "metadata": {},
  "payouts_enabled": true,
  "statement_descriptor": "MARLA RECORDS",
  "statement_descriptor_kana": null,
  "statement_descriptor_kanji": null,
  "statement_descriptor_prefix": "MARLA",
  "support_address": null,
  "support_email": null,
  "support_phone": "+4903061653181",
  "support_url": null,
  "timezone": "Europe/Berlin",
  "type": "standard",
  "verification": {
    "disabled_reason": null,
    "due_by": null,
    "errors": [],
    "fields_needed": [],
    "pending_verification": []
  }```
#

so that my program can retrieve it, because I can see it quite NULL

dire sluice
#

Which specific piece of information do you want?

south eagle
#

I need an address, a name, and email

#

email is easy

#

name.. which one should be filled in ALL stripe accounts?

dire sluice
south eagle
#

?

#

I am talking programatically

#

not seeing it

#

with eyes

dire sluice
#

I thought you wanted to know where you could see this in the Dashboard? You said this:

so where can I fill this data (in dashboard I mean)

south eagle
#

fill is different than see

#

so in case that it is empty, I can go ahead and fill it in the dashboard, so that my program can see it.

dire sluice
#

In any case, the answer is that you can't. The data you're seeing in the API response you pasted above is the data you're allowed to access for that account from the API. That's it.

south eagle
#

so all the NULLS

#

where can I fill those details on dashboard.

dire sluice
#

You can't.

south eagle
#

for example
"business_name": null,

#

why not?

#

I have access as a platform too.

dire sluice
#

Because it's a Standard connected account and you do not have access to that information.

south eagle
#

not only as connected account. I can actually open the dashboard of the other account

#

don't worry about connected accounts (for now)

dire sluice
#

That information would be available if it was a Custom account, for example.

south eagle
#

ok, i will re-word it.

#

in my own account that I own, where can I fill :

"business_name": null,

#

in the dashboard

dire sluice
#

Just to clarify, when you say "dashboard" you're not talking about the Stripe Dashboard, right?

south eagle
#

yes, Stripe Dashboard

dire sluice
#

What do you mean by "fill"? Where are you filling it?

south eagle
#

hmm as in put text in it

#

fill in the business name

dire sluice
#

Right, but where specifically in the Stripe Dashboard are you doing this?

south eagle
#

I am asking you

#

where can I fill in the Stripe Dashboard, text that will then be retrieved when a platform retrieves the account details, so that business_name is not null.

dire sluice
#

Wait, I think I understand what you're saying. You seem to be under the impression that the connected account hasn't filled in their business name, which is why you're seeing business_name as null in the API, right?

south eagle
#

sure

#

is that the case?

dire sluice
#

That is not correct. business_name is null because you do not have access to that information.

south eagle
#

but you are saying the request is not made as a connected account, but as a platform. Is that info not available either?

dire sluice
#

If you make a request to retrieve your own account you can see this information. Give this a try: curl https://api.stripe.com/v1/account -u sk_live_•••:

#

That should return your own account object with all of that information available.

#

Does that work the way you expect?

south eagle
#

EXACT SAME INFO

#

if I make the request as the account to itself (not connect)

#

so that means that the info hasn't been filled in the dashboard. Which I would like to fill it.

#
  "id": "acct_1IJoqWIVVhxSAz7H",
  "object": "account",
  "business_profile": {
    "mcc": "5735",
    "name": null,
    "support_address": null,
    "support_email": null,
    "support_phone": "+4903061653181",
    "support_url": null,
    "url": "marlarecords.com"
  },
  "capabilities": {
    "bancontact_payments": "active",
    "blik_payments": "active",
    "card_payments": "active",
    "cartes_bancaires_payments": "pending",
    "eps_payments": "active",
    "giropay_payments": "active",
    "ideal_payments": "active",
    "klarna_payments": "active",
    "link_payments": "active",
    "p24_payments": "active",
    "sepa_debit_payments": "active",
    "sofort_payments": "active",
    "transfers": "active"
  },
  "charges_enabled": true,
  "controller": {
    "type": "account"
  },
  "country": "DE",
  "default_currency": "eur",
  "details_submitted": true,
  "email": "marlarecords11@gmail.com",
  "payouts_enabled": true,
  "settings": {
    "bacs_debit_payments": {},
    "branding": {
      "icon": null,
      "logo": null,
      "primary_color": null,
      "secondary_color": null
    },
    "card_issuing": {
      "tos_acceptance": {
        "date": null,
        "ip": null
      }
    },
    "card_payments": {
      "statement_descriptor_prefix": "MARLA",
      "statement_descriptor_prefix_kana": null,
      "statement_descriptor_prefix_kanji": null
    },
    "dashboard": {
      "display_name": "Marla Records",
      "timezone": "Europe/Berlin"
    },
    "payments": {
      "statement_descriptor": "MARLA RECORDS",
      "statement_descriptor_kana": null,
      "statement_descriptor_kanji": null
    },
    "payouts": {
      "debit_negative_balances": true,
      "schedule": {
        "delay_days": 3,
        "interval": "daily"
      },
      "statement_descriptor": null
    },
    "sepa_debit_payments": {}
  },
  "type": "standard"
}%   ```
#

ok, i think with this should be enough:

    "city": "Berlin",
    "country": "DE",
    "line1": "Nostitzstr. 11",
    "line2": null,
    "postal_code": "10961",
    "state": null
  },```
#

I already filled it in public details.

#

now for #2. application_fee

dire sluice
south eagle
#

for balance_transaction->type->application_fee

#

it will ALWAYS be from a platform query to a connected account. So it can pull the details. I think this you can obtain more personal details, like the business holder, right?

#

business holder name, business holder address, etc.

#

sorry.. rewind a little bit.

#

my request (for transfers) in php, is this. But I am not retrieving any data:

$stripe_account = $stripe->accounts->retrieve($payment->source->source->id, [], $connected_account);

#

I suppose I can get rid of the $connected_account (array) because it will never work as a connected account.

dire sluice
#

Not sure I'm following. What is $payment there? The py_ object on the connected account?

south eagle
#

txn_ (balance transaction)

#

actually I do retrieve data

#

I will figure that out later

#

can we move onto #2. application fees?

dire sluice
#

Sure, what do you want to know about that?

south eagle
#

so, if I pull the account details, would I be able to obtain more data?

#

or the same data

dire sluice
#

You mean retreiving the account via the API like before?

south eagle
#

yes

dire sluice
#

It's the same data you saw before.

#

Sorry, I'm a bit lost. Can you ask a more specific question or give me more details about exactly what's preventing you from making forward progress?

south eagle
#

I would like to grab more in-depth details about the connected account (as a platform)

#

the reason for me to write this, is because I also have to generate tax invoices for all the application fees taken from a platform to it's connected accounts.

dire sluice
#

And you want to do this via the API, correct?

south eagle
#

and a tax invoice is composed of many things, including a person's name, address, email

#

yes.

#

API

#

I am doing this using balance transactions. For transfers we already seen that info can be limited, but can I get more juicy info from making a request as a platform to a connected account?

dire sluice
#

No, not for Standard accounts.

#

The most you can get is retrieving the connected account object from the API as you did before.

south eagle
#

I don't know why in my tests a few days ago I was able to get more info

#

maybe I am not remembering correctly

#

where you can even see, person details

#

"individual" was the object

dire sluice
#

My guess is you were looking at a Custom connected account, not a Standard account.

south eagle
#

nope

#

I don't do custom

#

all of my connected accounts are standard

#

but I am 100% sure I was able to loop through json which included "individual" data

#

here

#

I would like to obtain individual details, like the above json

#

ahh, I see what you mean..

#

that is only a request I can see if it is a custom connected account.

#

maybe I only looked at this in the dashboard, but over-sighted that it said custom.

#

sorry

dire sluice
#

Yeah, with Custom accounts the account holder doesn't have a direct relationship with Stripe and the platform manages everything, so the platform needs to be able to see everything to manage it.

#

With Standard accounts, though, the account holder has a direct relationship with Stripe and has full Stripe Dashboard access, so they provide a lot of those details directly to Stripe and the platform can't see them.

south eagle
#

ok. You helped me a lot

#

now one last one.. this one is a php specific one.

#

if I receive a Stripe object, in php. For example:

foreach ($balance_transactions->data as $payment) {

So $payment is a Stripe object.
Can I then add parameters, like:

$payment->iteration = $iteration

??

dire sluice
#

I guess you could, but I wouldn't recommend it.

#

You should keep track of things like that in separate variables.

#

And adding something to a Stripe object like that would only impact your local, in-memory copy of that object.