#christopher_code

1 messages ยท Page 1 of 1 (latest)

livid hatchBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1379528549425348699

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

lapis current
#

hello! the server is a little busy at the moment but i will try to look at this asap

languid thorn
#

No rush, thank you ๐Ÿ™‚

livid hatchBOT
bronze gyro
#

Hi taking over here as solanum had to step away

languid thorn
#

No worries, thank you ๐Ÿ™‚

bronze gyro
#

We don't really know much about tax or fees in here unfortunately. Where does VAT show up usually for you? Is there a report that you do see it in?

languid thorn
#

The issue is that our users can't download a report

#

Do we need to use a different embedded component?

#

Or do we need to modify the embedded component?

#

Right now, it is only possible for them to download a CSV file, and it only shows the paid out amount, nothing else

#

With Stripe Billing, generating a receipt is easy, but for our connected accounts we're unsure how the users can download a PDF to attach to their accounting reports

bronze gyro
#

The payouts component only shows payouts. Again, we're not really familiar with how VAT or fees get levied. Where are these being charged and where do you normally see them?

languid thorn
#

The cash flow is as follows (we use direct charges):
Consumer buys a ticket to an event from Store through LikeMinded (our platform). With direct charges, the Store has a connected account and therefore an account balance that will increase by the ticket price minus the application fees. Every Friday morning, the ticket sales minus the application fees are paid out to the Store's Danish bank account

#

The ticket is sold including VAT, and we charge an application fee which includes the VAT component of our application fee (so is application fee + VAT), and this is directly deducted from the ticket sales amount

#

So from a cashflow perspective everything is correctly presented in the payouts module. The issue is:
We need to give the connected accounts the opportunity to download a PDF report that includes the payouts for a given period, and shows the application fee and VAT associated with that (and VAT associated with the consumer transactions)

#

This should be possible with Stripe directly, as without it, all Stripe Connect customers are violating Danish law

#

The Stripe AI assistant in Docs gave me this answer:

#

Unfortunately, the Stripe Connect embedded components don't directly provide functionality for users to download PDF reports showing payouts and VAT on application fees for a specific period. However, you can implement this feature using a combination of the embedded components and Stripe's API. Here's an approach you could take:

Use the Payouts embedded component:

This component allows users to view their payout history.
See payouts component for implementation details.
Add a custom "Download Report" button:

Place this button near the Payouts component in your UI.
When the user clicks "Download Report":

Make an API call to your backend server.
Your server should then use Stripe's API to fetch the necessary data.
Use Stripe's API to gather data:

Fetch payouts for the specified time period using the List payouts API.
Retrieve application fees associated with these payouts using the List application fees API.
Generate a PDF:

Use a PDF generation library on your server to create a report with the fetched data.
Include payout details and VAT on application fees in this report.
Serve the PDF:

Send the generated PDF back to the user's browser for download.

#

Here's a basic example of how you might fetch the payout data on your server:

example.rb
require 'stripe'
Stripe.api_key = 'sk_test_...'

account_id = 'acct_...' # The connected account ID
start_date = '1654041600' # Unix timestamp for start date
end_date = '1656633599' # Unix timestamp for end date

payouts = Stripe::Payout.list({
limit: 100,
created: {
gte: start_date,
lte: end_date
},
stripe_account: account_id
})

Process payouts and fetch associated application fees

payouts.each do |payout|

Fetch application fees for this payout

fees = Stripe::ApplicationFee.list({
created: {
gte: payout.created,
lte: payout.arrival_date
},
stripe_account: account_id
})

Process fees, calculate VAT, etc.

...

end

Generate and serve PDF

...

Remember to handle pagination for both payouts and application fees if there are more than 100 results.

This approach allows you to provide detailed reports while still leveraging the simplicity of the embedded components for general payout management.

bronze gyro
#

Ok so you bundle the VAT with the application fee and just need a way to show this application fee directly to the customer?

bronze gyro
languid thorn
#

I need a way for the shops (our connected accounts) to download a PDF that simply says:
Between May 1-31 1000 DKK was processed in sales your connected account, of which 200 DKK are sales VAT
We have deducted an application fee of 700 DKK including VAT of 140 DKK from the processed sales, and paid out to your account today on June 3

languid thorn
bronze gyro
#

Yeah

#

That component just surfaces payouts

#

The application fee is attached to the original payment

#

So you'd have to kind of work backwards with the api here

languid thorn
#

There is also a documents embedded component, however it always says no documents are available

bronze gyro
#

Yeah to my knowledge this isn't something you can get from one of the components

#

This is something you'd have to get via the api

languid thorn
#

Okay thanks, that's helpful - do you want to doublecheck? Would be stupid for us to engineer something you already have that works well

#

Maybe the Stripe Tax product (which I understand works well with Connect) supports it?

languid thorn
bronze gyro
#

Yeah I saw the assistant answer and it's not ideal

#

I'm looking for a specific report you can run right now

#

I believe there is one

languid thorn
#

Thank you so much

#

I spoke with the Danish tax authorities and they flagged this to us

#

I'm sure we're not the first ones with this challenge :))

bronze gyro
bronze gyro
#

We don't deal with legal challenges in here

#

We just help with api questions

languid thorn
#

Of course, that makes sense :))

bronze gyro
#

Also we don't know a whole lot about reporting either... so doing the best I can

#

Might have to redirect you to support

languid thorn
#

Ok checking now

#

Thanks

bronze gyro
#

Not entirely sure if application fee is deducted in there

languid thorn
#

I have tried this one: connected_account_payout_reconciliation.itemized.1

#

That you sent

#

And it still gives you a CSV

bronze gyro
#

I sent connected_account_payout_reconciliation.by_id.summary.1

#

But yeah all our reports do

#

There should be fee, gross, and net fields returned

#

Again idk offhand if application fee is factored in but just suggesting you try

#

Otherwise, I can tell you how to get each application fee from your payout balance transactions via the api but it's kind of a pain

languid thorn
#

So no way to get a PDF version with the API?

bronze gyro
#

Correct

languid thorn
#

The reports all show net, fee and gross, so that's fine - the issue is just that we need a PDF, and that the VAT needs to be specified

bronze gyro
#

I recommend reaching out to support in case something was built specifically for this legal thing

languid thorn
#

If gross is 100, fee is 7 and net is 95 USD for example, we just need to specify (of which 1.4 is VAT) for the application fee

bronze gyro
#

There's not a way to get a pdf for this via the api that i'm aware of

#

At least not publicly documented

languid thorn
#

Okay got it - would be great if you can forward the question to support as I'm unsure who to reach out to

#

Had a meeting with Evan who's a product manager for the Connect product, could also be that he's able to help

bronze gyro
#

You'd have to open a support ticket via https://support.stripe.com/contact

languid thorn
#

I will try that, thanks for your help!