#devil_apps-dispute
1 messages ¡ Page 1 of 1 (latest)
đ 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.
sry if the question is not totally stripe coding related
@iron nexus both approaches work. If you can make the JS work then uploading client-side to Stripe's API is likely easier
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
File has https://docs.stripe.com/api/files/object#file_object-url that you can use to fetch the content with your API key but it's a pain.
But why do you need the file's content if you upload the File on Stripe's API?
devil_apps-dispute
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
Ahhhh yeah in that case upload all to your server, combine there, and then only upload one file
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
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
but what's the workaround, upload them to my cdn? or send 10 as base64
yes that's what you really should do
ugh sorry
nw
Any other question before I run for the day?