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 1 more
More parameters
- file_
link_ dataobject
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"}
Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to access file contents.
Parameters
No parameters.
Returns
If the identifier you provide is valid, a file object returns. If not, Stripe raises an error.
{ "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"}
Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.
Parameters
- purposestring
Filter queries by the file purpose. If you don’t provide a purpose, the queries return unfiltered files.
More parameters
- createdobject
- ending_
beforestring - limitinteger
- starting_
afterstring
Returns
A dictionary with a data
property that contains an array of up to limit
files, starting after the starting_
file. Each entry in the array is a separate file object. If there aren’t additional available files, the resulting array is empty.
{ "object": "list", "url": "/v1/files", "has_more": false, "data": [ { "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" } ]}
To share the contents of a File
object with non-Stripe users, you can create a FileLink
. FileLink
s contain a URL that you can use to retrieve the contents of the file without authentication.
The FX Quotes API provides three functions:
- View Stripe’s current exchange rate for any given currency pair.
- Extend quoted rates for a 1-hour period or a 24-hour period, minimzing uncertainty from FX fluctuations.
- Preview the FX fees Stripe will charge on your FX transaction, allowing you to anticipate specific settlement amounts before payment costs.