MX Advantage
Post a Payment with Surcharge
Step 1:
Request Method: POST
Request URL: https://api.mxmerchant.com/checkout/v3/payment/enrich/mxadvantage
the options for mxAdvantageFeeLabel are as follows:
-surcharge
-service fee
-convenience fee
-non-cash adjustment
-cash discount
{
"merchantId":1000000000,
"tenderType":"Card",
"paymentType":"Sale",
"cardPresentType":"CardNotPresent",
"cardPresent":false,
"cardAccount":
{
"expiryMonth":"12",
"expiryYear":"33",
"entryMode":"Keyed",
"last4":null,
"magstripe":null,
"expiryDate":"12/33",
"avsStreet":"1231",
"number":"4242424242424242",
"avsZip":"12312"
,"cvv":"123"
},
"authOnly":false,
"isAuth":true,
"isSettleFunds":true,
"isTicket":false,
"taxExempt":false,
"shouldVaultCard":true,
"mxAdvantageEnabled":true,
"mxAdvantageFeeLabel":"surcharge",
"mxAdvantageFeeType":"percentage",
"mxAdvantageFeeAmount":"0.03",
"sourceZip":"30009",
"achIndicator":null,
"terminals":
[{
"id":"4FF0E948-XXXX-XXXX-XXXX-9093FF38B83C",
"iid":11111111,
"name":"25novnomad",
"description":"25novnomad",
"deviceType":"Mobile",
"deviceTypeName":"Terminal",
"merchantId":1000000000,
"uniqueIdentifier":"11111111",
"enabled":true,
"isVirtual":false,
"deleted":null,
"onSuccessUrl":null,
"onFailureUrl":null,
"properties":"{\"terminalId\":11111111}",
"dBA":"abfnovember",
"providerKey":
"anywherecommerce",
"externalSource":null,
"externalId":null,
"minPaymentAmount":null,
"maxPaymentAmount":null,
"recordCount":1
}],
"amount":1212.12,
"bankAccount":null}
Response:
{
"shouldVaultCard":true,
"merchantId":1000003628,
"tenderType":"Card",
"amount":"1248.48",
"cardAccount":{
"entryMode":"Keyed",
"number":"4242424242424242",
"expiryMonth":"12",
"expiryYear":"33",
"cvv":"123",
"avsStreet":"1231",
"avsZip":"12312",
"hasContract":false
},
"authOnly":false,
"settledAmount":"0",
"cardPresent":false,
"surchargeAmount":"36.36",
"surchargeRate":"0.02999702999702999702999703",
"surchargeLabel":"surcharge",
"taxExempt":false
}
Step 2:
In the next POST you will be using surchargeAmount, surchargeRate, and surchargeLabel form the previous response in the body.
Request Method: POST
Request URL: https://api.mxmerchant.com/checkout/v3/payment?includeCustomerMatches=false&echo=true
{
"merchantId":1000000000,
"tenderType":"Card",
"paymentType":"Sale",
"cardPresentType":"CardNotPresent"
,"cardPresent":false,
"cardAccount":
{
"expiryMonth":"12",
"expiryYear":"33",
"entryMode":"Keyed",
"last4":null,
"magstripe":null,
"expiryDate":"12/33",
"avsStreet":"1231",
"number":"4242424242424242",
"avsZip":"12312",
"cvv":"123"
},
"authOnly":false,
"isAuth":true,
"isSettleFunds":true,
"isTicket":false,
"taxExempt":false,
"shouldVaultCard":true,
"mxAdvantageEnabled":true,
"mxAdvantageFeeLabel":"surcharge",
"mxAdvantageFeeType":"percentage",
"mxAdvantageFeeAmount":"0.03",
"sourceZip":"30009",
"achIndicator":null,
"terminals":
[{
"id":"4FF0E948-XXXX-XXXX-XXXX-9093FF38B83C",
"iid":10231127,
"name":"25novnomad",
"description":"25novnomad",
"deviceType":"Mobile",
"deviceTypeName":"Terminal",
"merchantId":1000000000,
"uniqueIdentifier":"11111111",
"enabled":true,
"isVirtual":false,
"deleted":null,
"onSuccessUrl":null,
"onFailureUrl":null,
"properties":"{\"terminalId\":11111111}",
"dBA":"abf-november",
"providerKey":"anywherecommerce",
"externalSource":null,
"externalId":null,
"minPaymentAmount":null,
"maxPaymentAmount":null,
"recordCount":1
}],
"amount":"1248.48",
"bankAccount":null,
"surchargeAmount":"36.36",
"surchargeLabel":"surcharge",
"surchargeRate":"0.02999702999702999702999703",
"source":"QuickPay"
}
Response:
{
"created":"2020-12-04T16:04:23.127Z",
"paymentToken":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXbzaQ",
"id":10000001505878,
"creatorName":"Andrew Ferrer",
"isDuplicate":false,
"shouldVaultCard":true,
"merchantId":1000000000,
"batch":"0003",
"batchId":10000000224661,
"tenderType":"Card",
"currency":"USD",
"amount":"1248.48",
"cardAccount":
{"cardType":"Visa",
"entryMode":"Keyed",
"last4":"4242",
"cardId":"XXXXXXXXXXXXXXXXXXXXXXXQMsf",
"token":"XXXXXXXXXXXXXXXXXXXXXXXbzaQ",
"expiryMonth":"12",
"expiryYear":"33",
"hasContract":false,
"cardPresent":false,
"isDebit":false,
"isCorp":false
},
"posData":{"panCaptureMethod":"Manual"},
"authOnly":false,
"authCode":"PPSa78",
"status":"Approved",
"risk":
{"cvvResponseCode":"M",
"cvvResponse":"Match",
"cvvMatch":true,
"avsResponse":"No Response from AVS",
"avsAddressMatch":false,
"avsZipMatch":false
},
"requireSignature":false,
"settledAmount":"0",
"settledCurrency":"USD",
"cardPresent":false,
"authMessage":"Approved or completed successfully. ",
"availableAuthAmount":"0",
"reference":"033916000059",
"surchargeAmount":"36.36",
"surchargeRate":"0.03",
"surchargeLabel":"surcharge",
"type":"Sale",
"taxExempt":false,
"reviewIndicator":1,
"source":"QuickPay"
}
Updated over 2 years ago