FileLink
Source:
src/Stripe/FileLink.ts
A Stripe File Link — a public URL for a File that does not require
Stripe authentication. file is create-only; changing it replaces the
link. expiresAt and metadata update in place. Expired links cannot
be updated. Destroy expires the link (expires_at: "now") rather than
deleting it — Stripe has no file-link delete API.
Creating a File Link
Section titled “Creating a File Link”Link a file
const link = yield* Stripe.FileLink("report", { file: "file_123",});Expiring link with metadata
const link = yield* Stripe.FileLink("report", { file: "file_123", expiresAt: 1900000000, metadata: { kind: "report" },});Updating a File Link
Section titled “Updating a File Link”const link = yield* Stripe.FileLink("report", { file: "file_123", expiresAt: 1920000000, metadata: { kind: "report", env: "prod" },});Expiring a File Link
Section titled “Expiring a File Link”const link = yield* Stripe.FileLink("report", { file: "file_123",});// stack.destroy() sets expires_at to now