MerchantE API Docs

Upload batch request file

Used to upload a batch of transactions to ME. All batch API requests are handled by an HTTPS POST to this endpoint. File data should be passed to the server using Content-Type: multipart/form-data. After uploading a file, a confirmation message is sent containing the response identification number.

The transactional data that is being uploaded should be a text file (.TXT) that has transactions formatted as outlined in the ME Payment Gateway Specification.

Request Body

Content type: multipart/form-data

Required4 fields
reqFilestring
Contains the transaction file that is being transmitted to ME.
Should be a text file (.TXT) with transactions formatted as outlined in the ME Payment Gateway Specification.
Each transaction should be on a separate line using the format:
transaction_type=P&card_number=XXXXXXXXXXXXXXXX&card_exp_date=MMYY&transaction_amount=X.XX&...
format=binary
userIdstring
ME login ID
maxLength=32
userPassstring
ME login password
format=password · maxLength=32
profileIdstring
The ME gateway profile ID the record is associated with
pattern=^[0-9]+$ · maxLength=20
Others1 field
testFlagstringenum
Indicates if the file is a test file or not.
The default value is N, but Y can be set in order to send a test file that will route to the ME simulator.
pattern=^[YN]$ · maxLength=1

Responses

200
File successfully uploaded

File successfully uploaded

Common3 fields
respFileIdstring
The File ID from the processed batch. Use this ID to download the response file.
pattern=^[0-9]+$ · maxLength=15
rspCodestring
Response code (000 indicates success)
maxLength=3
rspMessagestring
Response message
maxLength=45
When Provided1 field
profileIdstring
The ME gateway profile ID the record is associated with
pattern=^[0-9]+$ · maxLength=20

Example Response

{
  "respFileId": "123456789012345",
  "profileId": "12345678901234567890",
  "rspCode": "000",
  "rspMessage": "OK"
}
400
Bad Request - Invalid or missing parameters

Bad Request - Invalid or missing parameters

Common2 fields
rspCodestringenum
Three-digit response/error code.
**Error Codes (per PDF Page 9):**
| Code | Description | Required Action |
|------|-------------|-----------------|
| 000 | OK | Batch was successfully received |
| 001 | System Error | Contact ME for research and resolution |
| 002 | Authentication Error | Invalid access right or invalid user ID and/or user password |
| 003 | Invalid Parameter | Check format to correct the invalid parameter |
| 004 | Missing parameter | Check format for missing parameter |
| 300 | Invalid Profile ID | Verify Profile ID is correct and resend batch |
| 301 | Invalid response file ID | Verify that user ID, user password, and file ID are valid and retry |
| 302 | Invalid test flag | Valid values are Y and N, default is N, field not required |
| 303 | Batch processing not allowed | Contact ME, batch processing must be enabled for the profile ID used |
pattern=^[0-9]+$ · maxLength=3
rspMessagestring
Text that accompanies the three-digit response/error code
maxLength=45

Example Response

{
  "rspCode": "003",
  "rspMessage": "Invalid Parameter"
}
401
Unauthorized - Authentication error

Unauthorized - Authentication error

Common2 fields
rspCodestringenum
Three-digit response/error code.
**Error Codes (per PDF Page 9):**
| Code | Description | Required Action |
|------|-------------|-----------------|
| 000 | OK | Batch was successfully received |
| 001 | System Error | Contact ME for research and resolution |
| 002 | Authentication Error | Invalid access right or invalid user ID and/or user password |
| 003 | Invalid Parameter | Check format to correct the invalid parameter |
| 004 | Missing parameter | Check format for missing parameter |
| 300 | Invalid Profile ID | Verify Profile ID is correct and resend batch |
| 301 | Invalid response file ID | Verify that user ID, user password, and file ID are valid and retry |
| 302 | Invalid test flag | Valid values are Y and N, default is N, field not required |
| 303 | Batch processing not allowed | Contact ME, batch processing must be enabled for the profile ID used |
pattern=^[0-9]+$ · maxLength=3
rspMessagestring
Text that accompanies the three-digit response/error code
maxLength=45

Example Response

{
  "rspCode": "002",
  "rspMessage": "Authentication Error"
}
403
Forbidden - Batch processing not allowed

Forbidden - Batch processing not allowed

Common2 fields
rspCodestringenum
Three-digit response/error code.
**Error Codes (per PDF Page 9):**
| Code | Description | Required Action |
|------|-------------|-----------------|
| 000 | OK | Batch was successfully received |
| 001 | System Error | Contact ME for research and resolution |
| 002 | Authentication Error | Invalid access right or invalid user ID and/or user password |
| 003 | Invalid Parameter | Check format to correct the invalid parameter |
| 004 | Missing parameter | Check format for missing parameter |
| 300 | Invalid Profile ID | Verify Profile ID is correct and resend batch |
| 301 | Invalid response file ID | Verify that user ID, user password, and file ID are valid and retry |
| 302 | Invalid test flag | Valid values are Y and N, default is N, field not required |
| 303 | Batch processing not allowed | Contact ME, batch processing must be enabled for the profile ID used |
pattern=^[0-9]+$ · maxLength=3
rspMessagestring
Text that accompanies the three-digit response/error code
maxLength=45

Example Response

{
  "rspCode": "303",
  "rspMessage": "Batch processing not allowed"
}
500
Internal Server Error

Internal Server Error

Common2 fields
rspCodestringenum
Three-digit response/error code.
**Error Codes (per PDF Page 9):**
| Code | Description | Required Action |
|------|-------------|-----------------|
| 000 | OK | Batch was successfully received |
| 001 | System Error | Contact ME for research and resolution |
| 002 | Authentication Error | Invalid access right or invalid user ID and/or user password |
| 003 | Invalid Parameter | Check format to correct the invalid parameter |
| 004 | Missing parameter | Check format for missing parameter |
| 300 | Invalid Profile ID | Verify Profile ID is correct and resend batch |
| 301 | Invalid response file ID | Verify that user ID, user password, and file ID are valid and retry |
| 302 | Invalid test flag | Valid values are Y and N, default is N, field not required |
| 303 | Batch processing not allowed | Contact ME, batch processing must be enabled for the profile ID used |
pattern=^[0-9]+$ · maxLength=3
rspMessagestring
Text that accompanies the three-digit response/error code
maxLength=45

Example Response

{
  "rspCode": "001",
  "rspMessage": "System Error"
}

Code samples

Copy-paste ready code in your preferred language for multipart file upload requests.

Multipart Upload

Copy/paste friendly
curl -X POST "https://test.merchante-solutions.com/srv/api/bpUpload" \
  -H "Accept: application/json" \
  -F "userId=merchant123" \
  -F "userPass=password123" \
  -F "profileId=12345678901234567890" \
  -F "testFlag=N" \
  -F "reqFile=@(binary file content)"