v1

latestOpenAPI 3.1.02026-07-241660500.9 KB

Make a Payment

post/v3/payment

Query parameters

echoboolean
includeCustomerMatchesboolean

Return customers that have this card vaulted in their account

Request body

merchantIdstring required

Id of the merchant

amountnumber float required

The payment amount. Must not be 0.

paymentTypestring required

Type of transaction Values: Sale, Return, CashAdvance, Prepaid, Adjustment, Void, Reversal, Authorization, SaleCompletion, PaymentTransaction, Withdrawal, Balance

tenderTypestring

Values: Card, Check, Cash, Multiple, Loyalty, ACH

entryClassstring

Gets or sets the ACH entry class Values: CCD, PPD, TEL, WEB

authOnlyboolean

Indicates that this payment should NOT be added to current batch. AuthOnly payment won't be settled.

isAuthboolean

Should this card be authorized?

isSettleFundsboolean

Should this transaction be settled?

customerNamestring

Customer Name (256 char) (Does NOT associate payment to customer)

customerCodestring

Client provided customer reference number (Associates with Customer Number). Cannot be combined with invoiceId and clientReference if B2B is on

metastring

Memo field (Can include a stringified JSON object)

replayIdinteger

A merchant-supplied identifier to uniquely identify a payment request to facilitate retries due to I/O related issues. This identifier must be unique. If supplied, we will check for a payment that matches this identifier. If found will return an identical response of the original request. Represents a bigInt value.

sourcestring

Values: API, QuickPay, Recurring, Link2Pay, Terminal

clientReferencestring

Client provided payment reference number; can be associated with multiple payments (17 char max)

invoicestring

Client provided invoice number (Generated by server if not provided,16 char max)

invoiceIdsstring[]

If there are multiple invoices, you can send in an array of existing invoice ids (Note: they must already exist in MX Merchant)

orderIdsstring[]

If there are multiple orders, you can send in an array of existing order ids (Note: they must already exist in MX Merchant)

taxnumber float

Tax Amount (included in amount)

taxExemptboolean

If true, tax amount must be 0

devicestring

Gets/Sets the device identifier, this is the terminal id.

shipAmountnumber float

Gets/Sets the ship amount, used by level 3 data during settlement

shipToCountrystring

Gets/Sets the 3-digit alphanumeric ship-to country code, i.e. USA, used by level 3 data during settlement

shipToZipstring

Gets/Sets the ship-to zip code, used by level 3 data during settlement

ShouldGetCreditCardLevelboolean

Checks if the card is a business card. Only used when B2B is enabled.

shouldVaultCardboolean

Use this param to vault a new card to a new or existing customer. Send in customer.id to vault to an existing customer, and at a minimum, customer.firstName or customer.lastName to vault the card to a new customer.

tipnumber float

Gets/Sets the amount of the gratuity (included in amount).

vatAmountnumber float

Gets/Sets the vat amount, used by level 3 data during settlement

vatRatenumber float

Gets/Sets the VAT rate, used by level 3 data during settlement

tagsstring[]

Associate a tag with the payment (You must set up the tag first in MX Merchant)

Response

201

createdstring
paymentTokenstring
idinteger
creatorNamestring
merchantIdinteger
batchstring
batchIdinteger
tenderTypestring
currencystring
amountstring
posDataobject
authOnlyboolean
authCodestring
statusstring
metastring
requireSignatureboolean
settledAmountstring
settledCurrencystring
authMessagestring
availableAuthAmountstring
referencestring
taxstring
invoicestring
clientReferencestring
replayIdstring
typestring
reviewIndicatorinteger
sourcestring

Example response

{
  "created": "2018-03-21T21:34:15.24Z",
  "paymentToken": "Pfcyy68HAtwxb0hM2mpYHLEzc5nSESc3",
  "id": 22028828,
  "creatorName": "John Doe",
  "merchantId": 418324776,
  "batch": "Z08X0",
  "batchId": 2092732,
  "tenderType": "Card",
  "currency": "USD",
  "amount": "0.01",
  "cardAccount": {
    "cardType": "Visa",
    "entryMode": "Keyed",
    "last4": "1111",
    "cardId": "y15QvOteHZGBm7LH3GNIlTWbA1If",
    "token": "Pfcyy68HAtwxb0hM2mpYHLEzc5nSESc3",
    "expiryMonth": "01",
    "expiryYear": "19"
  },
  "authCode": "PPSVI7",
  "status": "Approved",
  "meta": "Memo Field",
  "risk": {
    "cvvResponseCode": "M",
    "cvvResponse": "Match",
    "cvvMatch": true,
    "avsResponseCode": "Y",
    "avsAddressMatch": true,
    "avsZipMatch": true
  },
  "customer": {
    "id": 10696183,
    "created": "2017-09-25T15:18:08.89Z",
    "name": "Jane Doe",
    "firstName": "Jane",
    "lastName": "Doe",
    "sales": "0",
    "loyaltyStatus": "Enrolled",
    "loyaltyEnrolled": "2017-09-25T15:18:08.89Z",
    "displayColor": "A1BC3A"
  },
  "settledAmount": "0",
  "settledCurrency": "USD",
  "authMessage": "AUTH/TKT PPSVI7",
  "availableAuthAmount": "0",
  "reference": "053DO00MMCL7",
  "tax": "0",
  "invoice": "P000EBX6",
  "clientReference": "053DO00MMCL7",
  "replayId": "P000EBX6",
  "type": "Sale",
  "source": "API"
}