MiPaymentChoice API: Transaction Processing
General
The MiPaymentChoice ReST API provides the ability to process transactions.
Routes
Route | Description |
---|---|
POST /transactions | Submit a payment transaction request. |
Request Headers
Header | Value |
---|---|
Authentication | Bearer [authentication (JWT) token] |
Content-Type | application/json |
Request Body
{
"TransactionType": "Sale",
"CardData": {
"CardNumber": "string",
"ExpirationDate": "string",
"Cvv": 0,
"NameOnCard": "string",
"Pin": "string",
"KeySerialNumber": "string",
"Token": "string",
"EmvData": "string",
"TrackData": "string",
"EntryMode": "Manual",
"CvPresence": "None",
"Street": "string",
"ZipCode": "string"
},
"CheckData": {
"NameOnCheck": "string",
"RoutingNumber": "string",
"AccountNumber": "string",
"CheckNumber": "string",
"MICR": "string",
"DriversLicense": "string",
"State": "string",
"SSN": "string",
"DateOfBirth": "string",
"CheckType": "string",
"AccountType": "string",
"RawMICR": "string",
"BranchCity": "string",
"EmailAddress": "string",
"TelephoneNumber": "string",
"Token": "string",
"Address": {
"StreetAddress1": "string",
"StreetAddress2": "string",
"StreetAddress3": "string",
"City": "string",
"StateOrProvinceCode": "AK",
"PostalCode": "string",
"CountryCode": "USA"
}
},
"Fsa": {
"partialAuthSupport": true,
"qhpAmount": 0,
"rxAmount": 0,
"visionAmount": 0,
"dentalAmount": 0,
"clinicalAmount": 0,
"copayAmount": 0,
"transitAmount": 0
},
"SoftDescriptor": {
"AltMerchantName": "string",
"AltMerchantAddress": "string",
"AltMerchantCity": "string",
"AltMerchantState": "string",
"AltMerchantZip": "string"
},
"ForceDuplicate": true,
"Register": "string",
"InvoiceData": {
"customerId": "string",
"totalAmount": 0,
"tipAmount": 0,
"taxAmount": 0,
"shippingAmount": 0,
"convenienceAmount": 0,
"surchargeAmount": 0,
"cashbackAmount": 0
},
"OriginalTransaction": {
"pnRef": 0,
"authCode": "string"
},
"CustomFields": [
{
"Name": "string",
"Value": "string"
}
],
"SignatureData": {
"signatureType": "string",
"data": "string"
},
"PurchaseCardData": {
"PurchaseOrderNumber": "string",
"MerchantPostalCode": "string",
"IsTaxExempt": true,
"InvoiceNumber": "string",
"ShipFromPostalCode": "string",
"DestinationPostalCode": "string",
"DestinationState": "string",
"DestinationCountryCode": 0,
"OrderNumber": "string",
"TotalFreightAmount": 0,
"TotalSalesTaxAmount": 0,
"TotalDutyAmount": 0,
"TotalDiscountAmount": 0,
"MerchantTaxId": "string",
"TransactionDate": "2019-02-15T19:59:12.116Z",
"PurchaseCardLineItemData": [
{
"UniversalProductCode": "string",
"CommodityCode": "string",
"ProductDescription": "string",
"ItemCode": "string",
"ItemDescription": "string",
"InvoiceNumber": "string",
"Quantity": 0,
"QuantityExponent": 0,
"UnitOfMeasure": "string",
"UnitPrice": 0,
"UnitPriceExponent": 0,
"DiscountAmount": 0,
"TotalAmount": 0,
"TaxAmount": 0,
"TaxAmountExponent": 0,
"TaxRate": 0,
"TaxIndicator": "Local",
"TaxType": "US",
"ExtendedAmount": "string",
"FreightAmount": 0,
"DutyAmount": 0,
"IsTaxIncluded": true,
"DebitCreditIndicator": "C",
"IsTaxExempt": true
}
]
},
"AuthCode": "string",
"UseInterchangeDefaults": true,
"CaptureType": "Credit"
}
Parameter Details - Card Processing
Below are described the primary request parameters.
Property | Required | Data | Additional Information |
---|---|---|---|
TransactionType | Yes | Enumeration | Authorization, Sale, Return, Void, Force, Capture, RepeatSale, CaptureAll, Adjustment, Activate, Deactivate, Redeem, Inquire, Reload |
CardData.CardNumber | Yes 1 | String | |
CardData.ExpirationDate | Yes 1 | String | "MM/YY" format is required. |
CardData.Token | Yes 1 | String | |
InvoiceData.TotalAmount | Yes | Numeric | |
CustomFields | Property | Allows custom field data to be included in the transaction record. | |
PurchaseCardData | Property | Allows additional data to be provided for Level 2 and Level 3 transaction processing. | |
OriginalTransaction 2 | Numeric | Allows a PnRef number, the gateway's internal transaction identifier, to be included on the transaction. 2 |
1 If a payment data token is not provided, card number and expiration date are required.
2 A PnRef from an earlier transaction can be used for return transactions as well as payment data on a new transaction. In the case of a new transaction the payment data from the referenced transaction will be used to process the new transaction request. This can be done in lieu of a payment data token or card data.
Parameter Details - Check Processing
Property | Required | Data | Additional Information |
---|---|---|---|
TransactionType | Yes | Enumeration | Sale, Return, Void, Force, Capture, RepeatSale, CaptureAll, Adjustment |
CheckData.AccountNumber | Yes 1 | String | |
CheckData.RoutingNumber | Yes 1 | String | |
CheckData.NameOnCard | Yes 1 | String | |
CheckData.Token | Yes 1 | String | |
InvoiceData.TotalAmount | Yes | Numeric | |
CustomFields | Property | Allows custom field data to be included in the transaction record. | |
PurchaseCardData | Property | Allows additional data to be provided for Level 2 and Level 3 transaction processing. | |
OriginalTransaction 2 | Numeric | Allows a PnRef number, the gateway's internal transaction identifier, to be included on the transaction. 2 |
1 If a payment data token is not provided, checking account number, checking routing number, and name on check are required.
2 A PnRef from an earlier transaction can be used for return transactions as well as payment data on a new transaction. In the case of a new transaction the payment data from the referenced transaction will be used to process the new transaction request. This can be done in lieu of a payment data token or check data.
Response Body
{
"amountData": {
"AuthorizedAmount": 0,
"TotalAmount": 0,
"RemainingBalance": 0
},
"hostCode": "string",
"authCode": "string",
"merchantKey": 0,
"resultCode": "-100:Transaction NOT Processed; Generic Host Error",
"resultText": "string",
"pnRef": 0,
"message": "string",
"message1": "string",
"message2": "string",
"binData": {
"Bin": 0,
"CardBrand": "string",
"IssuingOrg": "string",
"CardType": "string",
"CardCategory": "string",
"IssuingCountry": "string",
"IssuingPhone": "string",
"IssuingWebsite": "string",
"IsCommercial": true
},
"validationData": {
"avsResponse": "string",
"cvResponse": "string",
"avsResponseText": "string",
"cvResultText": "string",
"streetMatchText": "string",
"zipMatchText": "string"
},
"customFields": [
{
"Name": "string",
"Value": "string"
}
],
"token": "string"
}
Notes
PnRef Number
A PnRef is the gateway's internal identifier for the transaction.
Response Code Values
Value | Description | HTTP Response Code |
-100 | Transaction NOT Processed; Generic Host Error | 500 |
0 | Approved | 201 |
1 | User Authentication Failed | 401 |
2 | Invalid Transaction | 400 |
3 | Invalid Transaction Type | 400 |
4 | Invalid Amount | 400 |
5 | Invalid Merchant Information | 400 |
7 | Field Format Error | 400 |
8 | Not a Transaction Server | 400 |
9 | Invalid Parameter Stream | 400 |
10 | Too Many Line Items | 400 |
11 | Client Timeout Waiting for Response | 504 |
12 | Decline | 201 |
13 | Referral | 200 |
14 | Transaction Type Not Supported in This Version | 400 |
19 | Original Transaction ID Not Found | 400 |
20 | Customer Reference Number Not Found | 400 |
22 | Invalid ABA Number | 400 |
23 | Invalid Account Number | 400 |
24 | Invalid Expiration Date | 400 |
25 | Transaction Type Not Supported by Host | 400 |
26 | Invalid Reference Number | 400 |
27 | Invalid Receipt Information | 400 |
28 | Invalid Check Holder Name | 400 |
29 | Invalid Check Number | 400 |
30 | Check DL Verification Requires DL State | 400 |
40 | Transaction did not connect (to NCN because SecureNCIS is not running on the web server) | 500 |
50 | Insufficient Funds Available | 400 |
99 | General Error | 500 |
100 | Invalid Transaction Returned from Host | 500 |
101 | Timeout Value too Small or Invalid Time Out Value | 500 |
102 | Processor Not Available | 500 |
103 | Error Reading Response from Host | 500 |
104 | Timeout waiting for Processor Response | 504 |
105 | Credit Error | 500 |
106 | Host Not Available | 500 |
107 | Duplicate Suppression Timeout | 504 |
108 | Void Error | 500 |
109 | Timeout Waiting for Host Response | 504 |
110 | Duplicate Transaction | 400 |
111 | Capture Error | 500 |
112 | Failed AVS Check | 500 |
113 | Cannot Exceed Sales Cap | 400 |
1000 | Generic Host Error | 500 |
1001 | Invalid Login | 401 |
1002 | Insufficient Privilege or Invalid Amount | 401 |
1003 | Invalid Login Blocked | 401 |
1004 | Invalid Login Deactivated | 401 |
1005 | Transaction Type Not Allowed | 400 |
1006 | Unsupported Processor | 400 |
1007 | Invalid Request Message | 400 |
1008 | Invalid Version | 400 |
1010 | Payment Type Not Supported | 400 |
1011 | Error Starting Transaction | 500 |
1012 | Error Finishing Transaction | 500 |
1013 | Error Checking Duplicate | 500 |
1014 | No Records to Settle (in the current batch) | 200 |
1015 | No Records to Process (in the current batch) | 200 |