#arnie06
1 messages · Page 1 of 1 (latest)
I am passing a type file and I verified that the file i am passing is a jpg
Can you share the request ID (req_xxx) which you faced this error? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_zLiDOIBmCzMcln
First of all, secret key should never be used at frontend/client. Secret key should be saved and used in your backend/server.
Based on https://dashboard.stripe.com/test/logs/req_zLiDOIBmCzMcln, the request was made with publishable key (for frontend). When a server is used, it should be secret key. To upload a file to Stripe, it should be multipart/form-data format: https://stripe.com/docs/file-upload
However, File API can't be used for product image as it's not listed as one of the purposes: https://stripe.com/docs/api/files/create#create_file-purpose
Product images can only be URLs: https://stripe.com/docs/api/products/object#product_object-images