# NMI - API

The NMI API emulator can be located at: secure/apidirecthandlernmi.php

This will take a normal POST API call and return the status of the transaction and the transaction details.\
\
The response will be in TxProcess formatting, but the original call, can be formatted using NMI naming schemes.\
\
It currently only handles sale transactions.

## Post NMI Emulator

<mark style="color:green;">`POST`</mark> `secure/apidirecthandlernmi.php`

#### Request Body

| Name                        | Type   | Description                                                                                                         |
| --------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------- |
| type                        | String | Type of transaction. Currently only accepts sale.                                                                   |
| security\_key               | String | API Security Key assigned to a merchant account.                                                                    |
| ccnumber                    | String | Credit card number.                                                                                                 |
| ccexp                       | String | Credit card expiration date. Format: MMYY                                                                           |
| cvv                         | String | The card security code.                                                                                             |
| checkname                   | String | The name on the customer's ACH account.                                                                             |
| checkaba                    | String | The customer's bank routing number.                                                                                 |
| checkaccount                | String | The customer's bank account number.                                                                                 |
| account\_holder\_type       | String | The type of ACH account the customer has.                                                                           |
| account\_type               | String | The ACH account entity of the customer.                                                                             |
| sec\_code                   | String | The Standard Entry Class code of the ACH transaction.                                                               |
| amount                      | String | Total amount to be charged. For validate, the amount must be omitted or set to 0.00.                                |
| tax                         | String | The sales tax, included in the transaction amount, associated with the purchase.                                    |
| cash\_discount              | String | How much less a customer paid due to a cash discount.                                                               |
| surcharge                   | String | Surcharge amount.                                                                                                   |
| shipping                    | String | Total shipping amount.                                                                                              |
| currency                    | String | The transaction currency. Format: ISO 4217                                                                          |
| orderdescription            | String | Order description                                                                                                   |
| orderid                     | String | Order Id                                                                                                            |
| ipaddress                   | String | IP address of cardholder, this field is recommended.                                                                |
| ponumber                    | String | Original purchase order.                                                                                            |
| lastname                    | String | Cardholder's last name                                                                                              |
| address1                    | String | Card billing address                                                                                                |
| address2                    | String | Card billing address, line 2                                                                                        |
| city                        | String | Card billing city                                                                                                   |
| state                       | String | Card billing state.                                                                                                 |
| zip                         | String | Card billing zip code                                                                                               |
| country                     | String | Card billing country.                                                                                               |
| phone                       | String | Billing phone number                                                                                                |
| fax                         | String | Billing fax number                                                                                                  |
| email                       | String | Billing email address                                                                                               |
| social\_security\_number    | String | Customer's social security number, checked against bad check writers database if check verification is enabled.     |
| merchant\_defined\_field\_# | String | Merchant defined fields that can be used to store any information the merchant wants to track with the transaction. |
| firstname                   | String | Cardholder's first name.                                                                                            |
| version                     | String | 3DSecure version.                                                                                                   |
| cardholder\_auth            | String | Set 3D Secure condition. Value used to determine E-commerce indicator (ECI).                                        |
| xid                         | String | Cardholder authentication transaction id.                                                                           |
| cavv                        | String | Cardholder authentication verification value.                                                                       |
| shipping\_country           | String | Shipping country Country codes are as shown in ISO 3166. Format: CC                                                 |
| shipping\_zip               | String | Shipping zip code                                                                                                   |
| shipping\_state             | String | Shipping state                                                                                                      |
| shipping\_city              | String | Shipping city                                                                                                       |
| shipping\_address2          | String | Shipping address, line 2                                                                                            |
| shipping\_address1          | String | Shipping address                                                                                                    |
| shipping\_lastname          | String | Shipping last name                                                                                                  |
| shipping\_firstname         | String | Shipping first name                                                                                                 |
| drivers\_license\_dob       | String | Driver's license date of birth.                                                                                     |
| drivers\_license\_number    | String | Driver's license number.                                                                                            |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payshield.ai/transaction-processing/emulators/nmi-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
