Create a file link ​
Creates a new file link object.
Returns ​
Returns the file link object if successful and raises an error otherwise.
Parameters ​
file(string, required) The ID of the file. The file’spurposemust be one of the following:business_icon,business_logo,customer_signature,dispute_evidence,finance_report_run,financial_account_statement,identity_document_downloadable,issuing_regulatory_reporting,pci_document,selfie,sigma_scheduled_query,tax_document_user_upload,terminal_android_apk, orterminal_reader_splashscreen.expires_at(timestamp, optional) The link isn’t usable after this future timestamp.metadata(object, optional) 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 tometadata.
curl
curl https://api.stripe.com/v1/file_links \
-u "<<YOUR_SECRET_KEY>>" \
-d file={{FILE_ID}}Response ​
json
{
"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"
}