#devil_apps-dispute

1 messages ¡ Page 1 of 1 (latest)

mossy quarryBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1256366202004050055

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

iron nexus
#

sry if the question is not totally stripe coding related

pearl birch
#

@iron nexus both approaches work. If you can make the JS work then uploading client-side to Stripe's API is likely easier

iron nexus
#

i have that implemented, but the part that's bugging me is

#

that I have to create 10 file links in backend

#

only for the file to be downloadable

#

can I download it's contents only from the
stripe.files.create api?

#

i dont wanna create up to 22 requests only for something to get submitted

pearl birch
#

devil_apps-dispute

iron nexus
#

in order to submit a file to the dispute

#

I need it to be a PDF

#

since the api doesnt allow multiple files upload

#

on a single property, say "refund_policy"

#

so i need to merge them into one

#

before sending them

#

Yeah I couldn't make it work with my api key, gave up after 30 min xd

#

the flow:
upload files to stripe using stripe.files.create,
upload those files with stripe.fileLinks,create ( in order for them to be downloadable without auth )
get the base64 of them,
use pdf-lib to manipulate and merge them
get the pdf base64
in the end create file with pdf and file link with pdf,
send to stripe evidence

pearl birch
#

Ahhhh yeah in that case upload all to your server, combine there, and then only upload one file

iron nexus
#

to my server?

#

is there a example of how can I download the files from Files API, without the need to create file links

#

cuz i'm making 22 requests this way xd

pearl birch
#

My understanding of your ask if that your customer will give you 10 separate files, you want to combine those files into one so that you can upload it to our API.
You absolutely shouldn't be uploading the 10 separate files to Stripe, then on your server download all 10 files again to combine them and reupload a combined version

iron nexus
#

but what's the workaround, upload them to my cdn? or send 10 as base64

pearl birch
#

yes that's what you really should do

iron nexus
#

wrong

#

chat

pearl birch
#

ugh sorry

iron nexus
#

nw

pearl birch
#

Any other question before I run for the day?