# Uploading Files Learn how to upload files to Finix. ## Uploading Files with the Dashboard To upload files from Finix's dashboard: 1. Inside your dashboard, navigate to your Seller's **Identity page** 2. On their Identity page, navigate to their **Files tab** 3. Use the **Upload File** button to upload their file You will see a green banner after the file uploads successfully. ## Uploading Files with the API To upload files with Finix's File API: 1. Create a `File` resource 2. Upload your file to the `File` resource  ### Step 1: Create a `File` resource Create a File resource with the document's type, display name, and Merchant the file belongs to. ```shell Request curl "https://finix.sandbox-payments-api.com/files" \ -H 'Content-Type: application/json' \ -H 'Finix-Version: 2022-02-01' \ -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \ -X POST \ -d '{ "display_name": "Bank Statement (January 2024)", "linked_to": "MU2n7BSovtwYsWYZF6rBnnzk", "type": "DRIVERS_LICENSE_FRONT" }' ``` ```json Response { "id": "FILE_fk2YvD9cpr6Xgq5WaCd1Aq", "status": "REQUIRES_UPLOAD", "created_at": "2024-12-25T01:56:27.601941Z", "updated_at": "2024-12-25T01:56:27.619529Z", "linked_type": "MERCHANT", "linked_to": "MU2n7BSovtwYsWYZF6rBnnzk", "extension": null, "display_name": "Bank Statement (January 2024)", "type": "DRIVERS_LICENSE_FRONT", "platform_id": "PLm5E6FbtCZ5vjpCaKhq5PwN", "application_id": "APgPDQrLD52TYvqazjHJJchM", "tags": {}, "identity_id": "ID82tmeBrw6ithr8DjDnAdVb" } ``` ### Step 2: Upload your file to the `File` resource To upload your file to the `File` resource, you can either: 1. Upload the file directly (for example, if the file is stored on your own servers). 2. Use an `external_link` to let your seller upload the file directly from their browser. #### Option 1: Upload the file directly Use the `/upload` endpoint to upload the file directly to the `File` resource: ```shell Request curl "https://finix.sandbox-payments-api.com/files/FILE_3iNDtFwPaAE2iTTBzUiJK8/upload" \ -H 'Content-Type: multipart/form-data' \ -H 'Finix-Version: 2022-02-01' \ -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \ -F "file=@{{file_path}}" ``` This request is asynchronous. Finix will respond with a `File` object with `status: PENDING`, and afterward the `status` to `UPLOADED` after the file finishes uploading (typically, this takes about 60 seconds). Uploading ```json File Resource { "id": "FILE_3iNDtFwPaAE2iTTBzUiJK8", "status": "PENDING", "created_at": "2024-08-27T22:02:38.170135Z", "updated_at": "2024-08-27T22:02:38.181962Z", "linked_type": "MERCHANT", "linked_to": "MU2n7BSovtwYsWYZF6rBnnzk", "extension": "png", "display_name": "Bank Statement (January 2024)", "type": "DRIVERS_LICENSE_FRONT", "platform_id": "PLm5E6FbtCZ5vjpCaKhq5PwN", "application_id": "APgPDQrLD52TYvqazjHJJchM", "tags": {}, "identity_id": "ID82tmeBrw6ithr8DjDnAdVb" } ``` Uploaded ```json File Resource { "id": "FILE_3iNDtFwPaAE2iTTBzUiJK8", "status": "UPLOADED", "created_at": "2024-08-27T22:02:38.170135Z", "updated_at": "2024-08-27T22:03:30.109473Z", "linked_type": "MERCHANT", "linked_to": "MU2n7BSovtwYsWYZF6rBnnzk", "extension": "png", "display_name": "Bank Statement (January 2024)", "type": "DRIVERS_LICENSE_FRONT", "platform_id": "PLm5E6FbtCZ5vjpCaKhq5PwN", "application_id": "APgPDQrLD52TYvqazjHJJchM", "tags": {}, "identity_id": "ID82tmeBrw6ithr8DjDnAdVb" } ``` #### Option 2: Upload the file with an `external_link` Alternatively, you can create an `external_link` that your user can use to upload the file directly from their browser. This lets your users upload documents without the files ever touching your own servers. To do this, start by creating an `external_link` with `type: UPLOAD`. ```shell External Link Request curl "https://finix.sandbox-payments-api.com/files/FILE_jyLRzpcLcvUh8yCuTdRJE8/external_links" \ -H 'Content-Type: application/json' \ -H 'Finix-Version: 2022-02-01' \ -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \ -d '{ "duration": 15, "type": "UPLOAD" }' ``` ```json External Link Response { "id": "EL_3zJ3B4UYMWrLPyYSdL65hX", "created_at": "2024-08-27T22:09:51.396334Z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dfM1r%2FH6E7ASY4CSvbw3eMEw9j1EB0eLxej8xquTRpW6%2F5adT0bcfM0ZGEt3EjD7YFKtGvs4wuzmhG4imJS7c%2BoAnFXIww1pm5tgY6mgFXwaweuRLsT4LlKvxRBw1Kj0%2BeyMjTwgWnINHAVGzrmt4XHfHrZxEyY0CCF%2Fw%2B1yjxxRFwMT83zzgI4YzLF%2FX6nK989O9Lv%2F6QrIO%2Fx5am9ksDCybEkth5u1hkSuaUV4pZP4fZjSqTzM1j%2B3JMVSPsVdnCVPW8UFTKuuFk1y62ImovKuAcET1Pq4JRUc2AZkjNPRUkC6HewLSk&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20240827T220951Z&X-Amz-SignedHeaders=host&X-Amz-Expires=899&X-Amz-Credential=ASIAVO5M75WLGULA5QPJ%2F20240827%2Fus-east-2%2Fs3%2Faws4_request&X-Amz-Signature=5e973b4aa7a7f6ac4026b88bf1470efa334bde06adb51837e559b74c7df06ae6", "type": "UPLOAD", "expires_at": "2024-08-27T22:24:51.380464Z", "user_id": "USsRhsHYZGBPnQw8CByJyEQW", "file_id": "FILE_vhbDpyGKGUAUtBZnBv67AQ", "duration": null, "tags": {}, "expired": false } ``` See below for an example of how to embed the `external_link` into an HTML form, including making a `PUT` request to the `url` to upload the file. ```html Embedded External Link Snippet