Skip to main content
POST
/
v1
/
file
/
invoice
Upload Invoice
const form = new FormData();
form.append('file', '<string>');

const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};

options.body = form;

fetch('https://sandboxapi.me-cash.com/v1/file/invoice', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "status": "success",
  "message": "Operation completed successfully.",
  "data": {
    "id": "059c23af-eb87-4dc1-8518-8e335c98af30",
    "name": "Bar Deco.jpeg"
  }
}

File Upload

The File Upload API allows you to upload documents such as invoices or receipts that may be required for certain types of payouts or compliance purposes.

Use Case

When creating a payout, some corridors or transaction types might require supporting documentation (e.g., a business invoice). You can use this endpoint to upload the invoice first, and then reference the returned id as the optional invoice field in your payout request.

Request Example

curl --location 'https://{{baseURL}}/v1/file/invoice' \
--header 'x-api-key: API_KEY_HERE' \
--form 'file=@"/path/to/your/invoice.jpeg"'
The endpoint expects a multipart/form-data request with the file attached to the file field.

Response

A successful upload returns an id which is used as the optional invoice field in subsequent payout requests.
{
    "message": "File uploaded successfully",
    "status": "success",
    "data": {
        "id": "059c23af-eb87-4dc1-8518-8e335c98af30",
        "name": "Bar Deco.jpeg"
    }
}

Authorizations

x-api-key
string
header
required

Body

multipart/form-data
file
file
required

The invoice file to be uploaded.

Response

File uploaded successfully.

status
string
required
Example:

"success"

message
string
required
Example:

"Operation completed successfully."

data
object

The payload of the successful response.