The File object 

Core Resources
Files
The File object

Attributes

  • idstring

    Unique identifier for the object.

  • purposeenum

    The purpose of the uploaded file.

    Possible enum values
    account_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.

    finance_report_run

    User-accessible copies of query results from the Reporting dataset.

    financial_account_statement

    Financial account statements.

    identity_document

    A document to verify the identity of an account owner during account provisioning.

    identity_document_downloadable

    Image of a document collected by Stripe Identity.

    Show 7 more
  • typenullable string

    The returned file type (for example, csv, pdf, jpg, or png).

More attributes

  • objectstring

    String representing the object’s type. Objects of the same type share the same value.

  • createdtimestamp

    Time at which the object was created. Measured in seconds since the Unix epoch.

  • expires_atnullable timestamp

    The file expires and isn’t available at this time in epoch seconds.

  • filenamenullable string

    The suitable name for saving the file to a filesystem.

  • linksnullable object

    A list of file links that point at this file.

    • links.objectstring

      String representing the object’s type. Objects of the same type share the same value. Always has the value list.

    • links.dataarray of objects

      Details about each object.

      • links.data.idstring

        Unique identifier for the object.

      • links.data.objectstring

        String representing the object’s type. Objects of the same type share the same value.

      • links.data.createdtimestamp

        Time at which the object was created. Measured in seconds since the Unix epoch.

      • links.data.expiredboolean

        Returns if the link is already expired.

      • links.data.expires_atnullable timestamp

        Time that the link expires.

      • links.data.filestringExpandable

        The file object this link points to.

      • links.data.livemodeboolean

        Has the value true if the object exists in live mode or the value false if the object exists in test mode.

      • links.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.

      • links.data.urlnullable string

        The publicly accessible URL to download the file.

    • links.has_moreboolean

      True if this list has another page of items after this one that can be fetched.

    • links.urlstring

      The URL where this list can be accessed.

  • sizeinteger

    The size of the file object in bytes.

  • titlenullable string

    A suitable title for the document.

  • urlnullable string

    Use your live secret API key to download the file from this URL.

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"
}