#xfechx

1 messages · Page 1 of 1 (latest)

main compassBOT
summer cave
#

Hello, what problem are you running in to?

grim oracle
#

hi

#

can you please translate this, to connected account version:

#

$stripe->accounts->retrieve(
'acct_103xXp2lgzywWyEx',
[]
);

#
  'acct_103xXp2lgzywWyEx',
  []
);```
#

what I would like to do is to add the following to my checkout sesssions (which are for connect scenarios):

#
            [
            'invoice_creation' => ['enabled' => true],
            'invoice_data' => [
              'description' => 'Invoice for Product X',
              'metadata' => ['order' => 'order-xyz'],
              'account_tax_ids' => ['DE123456789'],
              'custom_fields' => [['name' => 'Purchase Order', 'value' => 'PO-XYZ']],
              'rendering_options' => ['amount_tax_display' => 'include_inclusive_tax'],
              'footer' => 'B2B Inc.',
            ],```
#

in the footer part, I would like to add details about the account details of the connected account

#

like business name, etc.

summer cave
#

That retrieve call should work, do you have some account where you filled out this info but it isn't showing up when being retrieved?

grim oracle
#

huh?

#

I am not asking about the second one. I am asking about the first snippet

#

how do I add the connected account parameter to the retrieval? or I don't need it

#

In some countries, having the tax number is required on the invoices

#

I wish to add this for all invoices created

#

through checkout

#

I want to do it automatically, not fixed like in the example above (which is the example by stripe website)

summer cave
#

I'm confused what you mean then

grim oracle
#

ok, so to clarify

summer cave
#

That first call with retrieve that connected account as long as it is connected to your platform

grim oracle
#

my app creates checkout sessions

#

for connected accounts

#

i want to add the new invoice creation enabled to true

#

but I want invoices to have relevant tax information from the connected account

#

by default, stripe invoices do not include this.

#

however most countries require this, legally

#

I need to add tax info to the invoices generated through checkout sessions. Please let me know how can I achieve this, programatically, with dynamic data, not static as in the stripe website example

summer cave
#

Are you charging these accounts through these Checkout Sessions? Or is this more a case of your platform's tax info still showing up on the invoice despite this being a destination charge?

grim oracle
#

no i am taking about connected accounts, not platform invoices.

#

so: CONNECTED ACCOUNT INVOICES

#

through CHECKOUT

summer cave
#

I was asking what was wrong with the invoices from those Checkout sessions

#

Do you have a specific invoice ID from an invoice that came out differently than you want while creating it like this?

grim oracle
#

why are you asking that, if I am not asking that?

#

I already asked you what is that I need, not sure what is unclear about my request

#

so:

#
  • On checkout sessions
  • With invoice parameter
  • Connected account
  • Add tax info on the invoice generated
summer cave
#

I am unclear what you are currently doing and how that differs from what you want

#

As well as what tax info you want to appear where on the invoice

#

Is it this line?
'account_tax_ids' => ['DE123456789'],
Is that showing up properly on the invoice but you are looking for how to retrieve it via the API?

grim oracle
#

ok

#

1st question:

Do I need to pass the stripe_account_id array anywhere here, if I am using this for connected account:

#
  'acct_103xXp2lgzywWyEx',
  []
);```
#

2nd question:
Because the invoices created through checkout are for connected accounts, not platform; How can I dynamically add the 'account_tax_ids' on the invoice parameters of the checkout session, so in the following example, it is included 'DE123456789' but I need this info to be retrieved from the stripe connected user account, not passed in statically like in the example below:

#

'account_tax_ids' => ['DE123456789'],

#

is that more clear?

summer cave
#

Let's tackle those in order. For question #1, what are you trying to retreive from the account? That call should return basically all of the info you can see on that connected account. Platforms are restricted from seeing some info on accounts unless they are Custom to keep user info private. We call this out in our API reference by saying "CUSTOM ONLY" next to the relevant fields https://stripe.com/docs/api/accounts/object