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
{ "id": "link_1Mr23jLkdIwHu7ix65betcoo", "object": "file_link", "created": 1680108075, "expired": false, "expires_at": null, "file": "file_1Mr23iLkdIwHu7ixQkCV3CBR", "livemode": false, "metadata": {}, "url": "https://files.stripe.com/links/MDB8YWNjdF8xTTJKVGtMa2RJd0h1N2l4fGZsX3Rlc3RfaXVoY2hrUnJPMzlBR3dPb01XMmFkSTVq00yUPLFf3h"}
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 issuing_
,regulatory_ reporting pci_
,document selfie
,sigma_
,scheduled_ query tax_
, ordocument_ user_ upload terminal_
.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.
{ "id": "link_1Mr23jLkdIwHu7ix65betcoo", "object": "file_link", "created": 1680108075, "expired": false, "expires_at": null, "file": "file_1Mr23iLkdIwHu7ixQkCV3CBR", "livemode": false, "metadata": {}, "url": "https://files.stripe.com/links/MDB8YWNjdF8xTTJKVGtMa2RJd0h1N2l4fGZsX3Rlc3RfaXVoY2hrUnJPMzlBR3dPb01XMmFkSTVq00yUPLFf3h"}
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.
{ "id": "link_1Mr23jLkdIwHu7ix65betcoo", "object": "file_link", "created": 1680108075, "expired": false, "expires_at": null, "file": "file_1Mr23iLkdIwHu7ixQkCV3CBR", "livemode": false, "metadata": { "order_id": "6735" }, "url": "https://files.stripe.com/links/MDB8YWNjdF8xTTJKVGtMa2RJd0h1N2l4fGZsX3Rlc3RfaXVoY2hrUnJPMzlBR3dPb01XMmFkSTVq00yUPLFf3h"}
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.
{ "id": "link_1Mr23jLkdIwHu7ix65betcoo", "object": "file_link", "created": 1680108075, "expired": false, "expires_at": null, "file": "file_1Mr23iLkdIwHu7ixQkCV3CBR", "livemode": false, "metadata": {}, "url": "https://files.stripe.com/links/MDB8YWNjdF8xTTJKVGtMa2RJd0h1N2l4fGZsX3Rlc3RfaXVoY2hrUnJPMzlBR3dPb01XMmFkSTVq00yUPLFf3h"}
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_
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.
{ "object": "list", "url": "/v1/file_links", "has_more": false, "data": [ { "id": "link_1Mr23jLkdIwHu7ix65betcoo", "object": "file_link", "created": 1680108075, "expired": false, "expires_at": null, "file": "file_1Mr23iLkdIwHu7ixQkCV3CBR", "livemode": false, "metadata": {}, "url": "https://files.stripe.com/links/MDB8YWNjdF8xTTJKVGtMa2RJd0h1N2l4fGZsX3Rlc3RfaXVoY2hrUnJPMzlBR3dPb01XMmFkSTVq00yUPLFf3h" } ],}