Skip to content

Files

Get file details and it's binary data.

GET /v1/consumer/files/{fileReference}

Supports dynamic token replacement in file retrieval URLs. Any query string parameters passed to this endpoint. will be used to replace tokens in the format [tokenName] in the file's retrieval URL. Example: calling with ?fromDate=2002-11-10&endDate=2023-11-10 will replace [fromDate] and [endDate] tokens. Tokens without matching query parameters are replaced with empty strings.

Auth: Access token (Bearer).

Parameters

NameInRequiredDescription
fileReferencepathYesA globally unique internal file reference (UUID).

Responses

StatusDescription
200The request was successful but does not return any results.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
404The request was successful but does not return any results.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
resultobjectNoA file attached to a consumer record, such as a proof of identity or supporting KYC document.
json
{
  "success": true,
  "result": {
    "fileType": "Unspecified",
    "kycResults": [],
    "reference": "00000000-0000-0000-0000-000000000000",
    "yourReference": "string",
    "description": "string",
    "fileName": "string",
    "mimeType": "string",
    "base64Data": "string",
    "createdDate": "string",
    "lastUpdatedDate": "string",
    "isActive": true
  }
}

Code samples

ts
// @vantagepay/vantagepay
const file = await client.consumers.downloadFile('99998888-7777-6666-5555-444433332211')
console.log(file?.fileName, file?.base64Data)
csharp
// VantagePay.SDK
var file = await client.Consumers.DownloadFileAsync(Guid.Parse("99998888-7777-6666-5555-444433332211"));

Send file via email using the configured email delivery URL.

POST /v1/consumer/files/{fileReference}/email

If the file has an EmailFileUrl configured, this endpoint will call that URL to trigger email delivery. If no URL is configured, the system will fall back to using the email queue service (not yet implemented). Supports dynamic token replacement similar to GetFileAsync.

Auth: Access token (Bearer).

Parameters

NameInRequiredDescription
fileReferencepathYesA globally unique internal file reference (UUID).
emailAddressqueryNoThe emails recipient's email address.

Responses

StatusDescription
200The request was successful but does not return any results.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
404The request was successful but does not return any results.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
json
{
  "success": true
}

Code samples

ts
// @vantagepay/vantagepay
await client.consumers.emailFile('99998888-7777-6666-5555-444433332211', 'customer@example.com')
csharp
// VantagePay.SDK
await client.Consumers.EmailFileAsync(Guid.Parse("99998888-7777-6666-5555-444433332211"), "customer@example.com");

Send file via SMS using the configured SMS delivery URL.

POST /v1/consumer/files/{fileReference}/sms

If the file has an SmsFileUrl configured, this endpoint will call that URL to trigger SMS delivery. If no URL is configured, the system will fall back to using the SMS queue service (not yet implemented). Supports dynamic token replacement similar to GetFileAsync.

Auth: Access token (Bearer).

Parameters

NameInRequiredDescription
fileReferencepathYesA globally unique internal file reference (UUID).
msisdnqueryNoThe SMS recipient's mobile number.

Responses

StatusDescription
200The request was successful but does not return any results.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
404The request was successful but does not return any results.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
json
{
  "success": true
}

Code samples

ts
// @vantagepay/vantagepay
await client.consumers.smsFile('99998888-7777-6666-5555-444433332211', '233555666112')
csharp
// VantagePay.SDK
await client.Consumers.SmsFileAsync(Guid.Parse("99998888-7777-6666-5555-444433332211"), "233555666112");

Payments for Africa