/transactions/uploadFile Upload
Upload a document and receive a File ID for use in payment requests (e.g. SupportingDocument in cross-border payments).
Query parameters: • customField defines where the file will be used (Payment_Invoice, etc.) • fileName file name including extension • customFieldKind context for the custom field (transaction, etc.)
Query parameters
| Field | Type | Required | Possible values | Description |
|---|---|---|---|---|
customField | string | Required | Payment_Invoice | Document_File | Target field that will reference this file. |
fileName | string | Required | — | File name including extension (e.g. invoice.pdf). |
customFieldKind | string | Required | transaction | Context for the custom field. |
Headers
| Field | Type | Required | Possible values | Description |
|---|---|---|---|---|
session-token | string | Required | — | SessionToken obtained from the Create GMA Session endpoint. All secured endpoints require this header. |
Request body
| Field | Type | Required | Possible values | Description |
|---|---|---|---|---|
file | file | Required | File (PDF, PNG, JPG) | Binary file content. Send as raw request body with Content-Type: application/pdf (or image type). |
Response
| Field | Type | Possible values | Description |
|---|---|---|---|
ResponseCode | integer | 200 | 201 | 204 | 301 | 400 | 401 | 403 | 404 | 410 | 422 | 500 | 503 | API result code in the response envelope. Indicates success or the error category (e.g. 200 success, 400 bad request, 401 unauthorized). |
ResponseMessage | string | Success | Created | NoContent | BadRequest | Unauthorized | Forbidden | NotFound | Gone | UnprocessableContent | ServerError | ResourceMoved | ServiceUnAvailable | UnProcessableEntity | Human-readable label paired with ResponseCode (e.g. Success, BadRequest, Unauthorized). Use with ResponseCode to interpret the outcome. |
ResponseData | object | Please refer to below example for response body | Uploaded file ID. Pass this value in SupportingDocument or other file fields. |
Example response
{
"ResponseCode": 200,
"ResponseMessage": "Success",
"ResponseData": "-3797768902979178604"
}The returned File ID should be used in SupportingDocument when creating cross-border payments.
Requires `session-token: {SessionToken}` from Create GMA Session. Use the same client IP as authentication.