The File Link object
Attributes
- idstring
Unique identifier for the object.
- expires_
atnullable timestamp Time that the link expires.
- filestringExpandable
The file object this link points to.
- 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.
- urlnullable string
The publicly accessible URL to download the file.
More attributes
- objectstring
- createdtimestamp
- expiredboolean
- livemodeboolean
Create a file link
Creates a new file link object.
Parameters
- filestringRequired
The ID of the file. The file’s
purpose
must be one of the following:business_icon
,business_logo
,customer_signature
,dispute_evidence
,finance_report_run
,identity_document_downloadable
,pci_document
,selfie
,sigma_scheduled_query
,tax_document_user_upload
, orterminal_reader_splashscreen
. - expires_
attimestamp The link isn’t usable after this future timestamp.
- 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 link object if successful and raises an error otherwise.
Update a file link
Updates an existing file link object. Expired links can no longer be updated.
Parameters
- expires_
atstring | timestamp A future timestamp after which the link will no longer be usable, or
now
to expire the link immediately. - 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 link object if successful, and raises an error otherwise.
Retrieve a file link
Retrieves the file link with the given ID.
Parameters
No parameters.
Returns
If the identifier you provide is valid, a file link object returns. If not, Stripe raises an error.
List all file links
Returns a list of file links.
Parameters
No parameters.
More parameters
- createdobject
- ending_
beforestring - expiredboolean
- filestring
- limitinteger
- starting_
afterstring
Returns
A dictionary with a data
property that contains an array of up to limit
file links, starting after the starting_after
file link. Each entry in the array is a separate file link object. If there aren’t additional available file links, the resulting array is empty.