Create a File

Before uploading a file, you need to create a File resource.

Once created, you can upload your file to the new File resource.

Request
Request Body schema: application/vnd.api+json
display_name
string

The name of the File you'll create.

linked_to
string

The resource ID that you want linked to the File (e.g. Merchant ID).

tags
object or null

Include up to 50 key: value pairs to annotate requests with custom metadata.

  • Maximum character length for individual keys is 40.
  • Maximum character length for individual values is 500.

(e.g., order number: 25, item_type: produce, department: sales, etc.)

type
string

The type of document. | Available values include:
Identity Verification

  • DRIVERS_LICENSE_FRONT
  • DRIVERS_LICENSE_BACK
  • IDENTIFICATION_CARD_FRONT
  • IDENTIFICATION_CARD_BACK
Bank account validation
  • BANK_STATEMENT
Business Verification
  • TAX_DOCUMENT
  • BUSINESS_REGISTRATION
  • BUSINESS_ADDRESS_VERIFICATION
Additional
  • OTHER
  • PCI_DOCUMENT
  • PASSPORT

Enum: "DRIVERS_LICENSE_FRONT" "DRIVERS_LICENSE_BACK" "IDENTIFICATION_CARD_FRONT" "IDENTIFICATION_CARD_BACK" "BANK_STATEMENT" … 6 more
Responses
200

Single File object

401

Authentication information is missing or invalid

403

Forbidden

404

Object does not exist

406

Not Acceptable

post/files
Request samples
curl https://finix.sandbox-payments-api.com/files \
  -H "Content-Type: application/vnd.api+json" \
  -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \
  -X POST \
  -d '
  {
    "display_name": "My Drivers License",
    "linked_to": "MU2n7BSovtwYsWYZF6rBnnzk",
    "tags": {
      "key_1": "value_1"
    },
    "type": "DRIVERS_LICENSE_FRONT"
  }'
Response samples
application/vnd.api+json
{
  • "id": "FILE_abki8bFEjq51eZ5w2pYFik",
  • "created_at": "2022-08-16T18:50:25.770825Z",
  • "updated_at": "2022-08-16T18:50:25.807321Z",
  • "application_id": "APgPDQrLD52TYvqazjHJJchM",
  • "display_name": "license_file",
  • "extension": null,
  • "identity_id": null,
  • "linked_to": "MU2n7BSovtwYsWYZF6rBnnzk",
  • "linked_type": "MERCHANT",
  • "platform_id": "PLm5E6FbtCZ5vjpCaKhq5PwN",
  • "status": "REQUIRES_UPLOAD",
  • "tags": {
    • "test_key_100": "test_val_100"
    },
  • "type": "DRIVERS_LICENSE_FRONT"
}

List All Files

List all the File resources you've created.

Request
query Parameters
sort
string

Specify key to be used for sorting the collection.

after_cursor
string

Return every resource created after the cursor value.

limit
integer

The numbers of items to return.

Example: limit=10
id
string

Filter by id.

created_at.gte
string

Filter where created_at is after the given date.

Example: created_at.gte=2022-09-27T11:21:23
created_at.lte
string

Filter where created_at is before the given date.

Example: created_at.lte=2022-09-27T11:21:23
updated_at.gte
string

Filter where updated_at is after the given date.

updated_at.lte
string

Filter where updated_at is before the given date.

before_cursor
string

Return every resource created before the cursor value.

Responses
200

List of File objects

401

Authentication information is missing or invalid

403

Forbidden

404

Object does not exist

406

Not Acceptable

get/files
Request samples
curl https://finix.sandbox-payments-api.com/files \
  -H "Content-Type: application/vnd.api+json" \
  -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e
Response samples
application/vnd.api+json
{
  • "_embedded": {
    • "files": [
      ]
    },
  • "page": {
    • "limit": 10,
    • "next_cursor": "FILE_abki8bFEjq51eZ5w2pYFik"
    }
}

Fetch a File

Retrieve the details of a File resource.

Request
path Parameters
file_id
required
string

Your File ID.

Responses
200

Single File object

401

Authentication information is missing or invalid

403

Forbidden

404

Object does not exist

406

Not Acceptable

get/files/{file_id}
Request samples
curl https://finix.sandbox-payments-api.com/files/FILE_abki8bFEjq51eZ5w2pYFik \
  -H "Content-Type: application/vnd.api+json" \
  -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e
Response samples
application/vnd.api+json
{
  • "id": "FILE_abki8bFEjq51eZ5w2pYFik",
  • "created_at": "2022-08-16T18:50:25.770825Z",
  • "updated_at": "2022-08-16T18:50:25.807321Z",
  • "application_id": "APgPDQrLD52TYvqazjHJJchM",
  • "display_name": "license_file",
  • "extension": null,
  • "identity_id": null,
  • "linked_to": "MU2n7BSovtwYsWYZF6rBnnzk",
  • "linked_type": "MERCHANT",
  • "platform_id": "PLm5E6FbtCZ5vjpCaKhq5PwN",
  • "status": "REQUIRES_UPLOAD",
  • "tags": {
    • "test_key_100": "test_val_100"
    },
  • "type": "DRIVERS_LICENSE_FRONT"
}

Upload files Directly

Upload files directly with a multipart/form-data request.

Request
path Parameters
file_id
required
string

The ID of the File that was created to upload the file.

Request Body schema: multipart/form-data
file
string <binary>

Path to the file you want to upload
(e.g. /Users/Desktop/finix_file.png).

Responses
200

Single File object

401

Authentication information is missing or invalid

403

Forbidden

404

Object does not exist

406

Not Acceptable

post/files/{file_id}/upload
Request samples
curl https://finix.sandbox-payments-api.com/files/FILE_bJecqoRPasStEPVpvKHtgA/upload \
  -H "Content-Type: multipart/form-data" \
  -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \
  -X POST \
  -F file=string
Response samples
application/vnd.api+json
{
  • "id": "FILE_abki8bFEjq51eZ5w2pYFik",
  • "created_at": "2022-08-16T18:50:25.770825Z",
  • "updated_at": "2022-08-16T18:50:25.807321Z",
  • "application_id": "APgPDQrLD52TYvqazjHJJchM",
  • "display_name": "license_file",
  • "extension": null,
  • "identity_id": null,
  • "linked_to": "MU2n7BSovtwYsWYZF6rBnnzk",
  • "linked_type": "MERCHANT",
  • "platform_id": "PLm5E6FbtCZ5vjpCaKhq5PwN",
  • "status": "REQUIRES_UPLOAD",
  • "tags": {
    • "test_key_100": "test_val_100"
    },
  • "type": "DRIVERS_LICENSE_FRONT"
}

Download a file

Download a file that was uploaded to a File resource.

Request
path Parameters
file_id
required
string

The ID of the File that was created to upload the file.

Responses
200

Example response

401

Authentication information is missing or invalid

403

Forbidden

404

Object does not exist

406

Not Acceptable

get/files/{file_id}/download
Request samples
curl https://finix.sandbox-payments-api.com/files/FILE_bJecqoRPasStGPVpvKHtgA/download \
  -H "Content-Type: application/vnd.api+json" \
  -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e
Response samples
application/hal+json
{
  • "total": 0,
  • "_embedded": {
    • "errors": [
      ]
    }
}