MerchantE API Docs

Capture a pre-authorization

Captures/settles a prior authorization (transaction_type=S).

Request Parameters

Content type: application/x-www-form-urlencoded

Required4 fields
profile_idstring
ID issued by MerchantE
pattern=^\d{20}$ ยท maxLength=20
profile_keystring
API password assigned by MerchantE
maxLength=32
transaction_typestringenum
Capture transaction (S)
transaction_idstring
Transaction ID from pre-authorization
maxLength=32
Recommended2 fields
transaction_amountstring
Amount to capture
pattern=^\d+\.\d{2}$
invoice_numberstring
Merchant-defined invoice number
maxLength=20

Example request

Starter values are pre-filled; replace with your own credentials and test data.

profile_id: YOUR_PROFILE_ID_HERE
profile_key: YOUR_PROFILE_KEY_HERE
transaction_type: S
transaction_id: 8fc94e10b12130f4ab8a8ceeac40fc69
transaction_amount: "100.00"
invoice_number: INV-2024-002

Responses

200
Successful transaction response

Successful transaction response

Common3 fields
transaction_idstring
Unique identifier for the transaction
error_codestring
Error/Response code:
- 000 = Approval
- 005 = Do Not Honor
- See full error code table in documentation
auth_response_textstring
Authorization response message
When Provided5 fields
auth_codestring
Authorization code (6 characters)
avs_resultstring
Address Verification Service result
  • 0โ€”AVS Error - Retry
  • Aโ€”Address Match Only
  • Bโ€”Address Match, Postal Code not verified
  • Cโ€”No Match
  • Dโ€”Address and Postal Code Match
  • Eโ€”AVS Error - Ineligible
  • Fโ€”Address and Postal Code Match (UK only)
  • Gโ€”Non-US Issuer does not participate
  • Iโ€”Address not verified, Postal Code not verified
  • Mโ€”Address and Postal Code Match
  • Nโ€”No Match
  • Pโ€”Postal Code Match, Address not verified
  • Rโ€”Issuer System Unavailable
  • Sโ€”Service not Supported
  • Uโ€”Address unavailable
  • Wโ€”9-digit Postal Code Match, Address no match
  • Xโ€”Exact match, 9-digit Postal Code
  • Yโ€”Address and 5-digit Postal Code Match
  • Zโ€”5-digit Postal Code Match, Address no match
cvv2_resultstring
CVV2 verification result
  • Mโ€”CVV2 Match
  • Nโ€”CVV2 No Match
  • Pโ€”Not Processed
  • Sโ€”CVV2 should be on card but merchant indicates not present
  • Uโ€”Issuer not certified
card_idstring
Permanent token (stored card) identifier returned when store_card=Y is used
maxLength=32
batch_numberstring
Batch number returned for Batch Close responses
maxLength=20
Other Fields12 fields
account_balancestring
Account balance (for prepaid cards)
batch_idstring
Batch ID
batch_statusstring
Batch status
card_exp_datestring
Card expiration date (MMYY)
card_last_fourstring
Last 4 digits of card number
card_typestring
Card type (Visa, Mastercard, Discover, Amex, etc.)
commercial_cardstring
Commercial card type
  • Bโ€”Business Card
  • Rโ€”Corporate Card
  • Sโ€”Purchasing Card
  • 0โ€”Non-commercial card
extended_avs_resultstring
Extended AVS result details
partial_auth_indicatorstring
Partial authorization indicator
payment_account_referencestring
Payment Account Reference returned by processor
product_levelstring
Product level code
transaction_feestring
Transaction fee amount

Example response

transaction_id: 5fc24a2abe160c232a6dccd72ed8c5ba
error_code: "000"
auth_response_text: Approval T02786
avs_result: "0"
cvv2_result: M
auth_code: T02786
400
Bad request - invalid parameters

Bad request - invalid parameters

401
Unauthorized - invalid credentials

Unauthorized - invalid credentials

500
Server error

Server error

Error and result codes

The gateway response includes fields such as error_code,avs_result, andcvv2_result. Use the tables to interpret them.

Gateway error codes
visa
CodeMeaning
19Re-enter Transaction
28File Temporarily Unavailable
39No Credit Account
58Transaction Not Permitted on Terminal
68Response Received Too Late
78Blocked - First Use
82Negative CAM, dCVV, iCVV, or CVV results
85No Reason to Decline
91Issuer or Switch Inoperative
92Routing Error
93Violation of Law
94Duplicate Transaction
96System Malfunction
000Approval
005Do Not Honor
012Invalid Transaction
013Invalid Amount
014Invalid Card Number
015Invalid Issuer
021Unable to Back Out Transaction
023Unacceptable Transaction Fee
025Unable to Locate Record
041Lost Card
043Stolen Card
046Closed Account
051Insufficient Funds
052No Checking Account
053No Savings Account
054Expired Card
055Incorrect PIN
056No Card Record
057Transaction Not Permitted to Cardholder
061Exceeds Withdrawal Limit
062Restricted Card
063Security Violation
065Exceeds withdrawal frequency
075PIN Try Exceeded
076Unable to Locate Previous Message
0N4Exceeds Issuer Withdrawal Limit
0N7CVV2 Failure
0N0Unable to Authorize
0P5PIN Change/Unblock Request Declined
0Q1Invalid Card Authentication Data
0R0Stop Payment Order
0R1Revocation of Authorization Order
0R3Revocation of All Authorizations Order
0TALocal Transaction; Time-Out at Issuer System Detected
0XAForward to Issuer
0XDForward to Issuer
mastercard
CodeMeaning
1922 Mer Not Qual or Re-enter Transaction
2822 Mer Not Qual or File Temporarily Unavailable
3922 Mer Not Qual or No Credit Account
58Function Not Permitted to Merchant
68Response Received Too Late
78Blocked, First Used
79Transaction Not Permitted to Acquirer/Terminal
82Transaction Not Permitted to Acquirer/Terminal
83Transaction Not Permitted to Acquirer/Terminal
85No Reason to Decline
91Issuer or Switch Inoperative
92Routing Error
94Duplicate Transaction
96System Malfunction
000Approval
00322 Mer Not Qual or Honor with Identification
004Not used at this time
00522 Mer Not Qual or Do Not Honor
01222 Mer Not Qual or Invalid Transaction
01322 Mer Not Qual or Invalid Amount
01422 Mer Not Qual or Invalid Card Number
01522 Mer Not Qual or Invalid Issuer
02122 Mer Not Qual or Unable to Back Out Transaction
02522 Mer Not Qual or Unable to Locate Record On File
041Lost Card - Pick Up (Fraud Account)
043Stolen Card - Pick Up (Fraud Account)
046Closed Account
051Insufficient Funds
052No Checking Account
053No Savings Account
054Expired Card
055Incorrect PIN
056No Card Record
057Function Not Permitted to Cardholder
061Exceeds Approval Amount Limit
062Restricted Card
063Security Violation
065Exceeds Withdrawal Frequency Limit
075Allowable number of PIN-Entry tries exceeded - Card Locked
0N0Unable to Authorize
0N3Cash Back Service Not Available
0N4Exceeds Issuer Withdrawal Limit
0N7CVV2 Failure
0P5PIN Change/Unblock Request Declined
0Q1Invalid Card Authentication Data
0R0Stop Payment Order
0R1Revocation of Authorization Order
0R3Revocation of All Authorizations Order
0XAForward to Issuer
0XDForward to Issuer
AVS result codes
CodeMeaning
0AVS Error - Retry, System unavailable or Timed out
AAddress Match Only
BAddress Match, Postal Code not verified
CNo Match
DAddress and Postal Code Match
EAVS Error - Ineligible (not a mail/phone order)
FAddress and Postal Code Match (UK only)
GNon-US Issuer does not participate
IAddress not verified, Postal Code not verified
MAddress and Postal Code Match
NNo Match
PPostal Code Match, Address not verified
RIssuer System Unavailable
SService not Supported
UAddress unavailable
W9-digit Postal Code Match, Address no match
XExact match, 9-digit Postal Code
YAddress and 5-digit Postal Code Match
Z5-digit Postal Code Match, Address no match
CVV result codes
CodeMeaning
MCVV2 Match
NCVV2 No Match
PNot Processed
SCVV2 should be on card but merchant indicates not present
UIssuer not certified

Code samples

Copy-paste ready code in your preferred language for the Test environment.

API call

Copy/paste friendly
curl -X POST "https://cert.merchante-solutions.com/mes-api/transaction" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "profile_id=YOUR_PROFILE_ID_HERE" \
  --data-urlencode "profile_key=YOUR_PROFILE_KEY_HERE" \
  --data-urlencode "transaction_type=S" \
  --data-urlencode "transaction_id=8fc94e10b12130f4ab8a8ceeac40fc69" \
  --data-urlencode "transaction_amount=100.00" \
  --data-urlencode "invoice_number=INV-2024-002"