Files

Create/Upload a new file to your account.

Upload a file to Ryft via our API. Useful if you need to:

  • upload evidence when challenging disputes
  • upload KYB/KYC documents for sub accounts
post/files

Request

  • Base URL
    https://sandbox-api.ryftpay.com/v1
  • URL
    https://sandbox-api.ryftpay.com/v1/files
  • Auth
    API key in header Authorization

Headers

Accountstring
Example:ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327

The linked accountId (use this when uploading VerificationDocument files for sub accounts)

Request body multipart/form-data

filestring

Local path to the file being uploaded

category'Evidence' | 'VerificationDocument'

The category for the file

metadatastring[] nullable

Any supplementary/custom metadata you want to attach to the file. You can have a maximum of 5 pieces of metadata.

Example request

{
  "file": "./local/files/evidence.pdg",
  "category": "Evidence"
}

Response

The file was created & uploaded successfully

idstring

The ID of the file

namestring

Name of the file

type'Csv' | 'Jpg' | 'Png' | 'Pdf'

The type of the file

category'Report' | 'Evidence' | 'VerificationDocument'

The category of the file

metadataobject nullable

Any additional key-value data you have attached to the file. These will be sent with any associated file events on your webhooks. You can have a maximum of 5 pieces of metadata.

createdTimestampinteger

The epoch timestamp (seconds) when the file was created

lastUpdatedTimestampinteger

The epoch timestamp (seconds) when the file was last updated

sizeInBytesinteger nullable

The size in bytes of the associated file

Example response

{
  "id": "fl_01G0EYVFR02KBBVE2YWQ8AKMGJ",
  "name": "receipt_2024.png",
  "type": "Pdf",
  "category": "Evidence",
  "metadata": {
    "customerId": "1",
    "registered": "123"
  },
  "createdTimestamp": 1470989538,
  "lastUpdatedTimestamp": 1470989538,
  "sizeInBytes": 2048
}

Changes

No recorded changes to this operation across all 10 revisions of this API.