To upload a file to Stripe, you need to send a request of type multipart/form-data
. Include the file you want to upload in the request, and the parameters for creating a file.
All of Stripe’s officially supported Client libraries support sending multipart/form-data
.
Parameters
- fileobjectRequired
A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the
multipart/form-data
protocol. - purposeenumRequired
The purpose of the uploaded file.
Possible enum valuesaccount_
requirement Additional documentation requirements that can be requested for an account.
additional_
verification Additional verification for custom accounts.
business_
icon A business icon.
business_
logo A business logo.
customer_
signature Customer signature image.
dispute_
evidence Evidence to submit with a dispute response.
identity_
document A document to verify the identity of an account owner during account provisioning.
issuing_
regulatory_ reporting Additional regulatory reporting requirements for Issuing.
pci_
document A self-assessment PCI questionnaire.
tax_
document_ user_ upload A user-uploaded tax document.
Show 2 more
More parameters
- file_
link_ dataobject Optional parameters that automatically create a file link for the newly created file.
- file_link_data.
createbooleanRequired Set this to
true
to create a file link for the newly created file. Creating a link is only possible when the file’spurpose
is one of the following:business_
,icon business_
,logo customer_
,signature dispute_
,evidence issuing_
,regulatory_ reporting pci_
,document tax_
,document_ user_ upload terminal_
, orandroid_ apk terminal_
.reader_ splashscreen - file_link_data.
expires_ attimestamp The link isn’t available after this future timestamp.
- file_link_data.
metadataobject Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
metadata
.
Returns
Returns the file object.
{ "id": "file_1Mr4LDLkdIwHu7ixFCz0dZiH", "object": "file", "created": 1680116847, "expires_at": 1703444847, "filename": "file.png", "links": { "object": "list", "data": [], "has_more": false, "url": "/v1/file_links?file=file_1Mr4LDLkdIwHu7ixFCz0dZiH" }, "purpose": "dispute_evidence", "size": 8429, "title": null, "type": "png", "url": "https://files.stripe.com/v1/files/file_1Mr4LDLkdIwHu7ixFCz0dZiH/contents"}