Table of Contents
The Direct Post method is the simplest integration method for both web-based and non-web-based payment applications, however, merchants using this integration method should have passed a PCI vulnerability scan before use. We suggest looking at the documentation in our integration portal which can be found here.
This method of integration uses the username and password from the merchant account as the credentials. You will also use a URL to post the data back to us. This is the generic POST URL:
Since the Direct Post API uses a username and password, it is recommended that a separate user is created under the merchant account. Using the primary username credentials is not recommend. When creating a separate user, you are able to restrict that user's permission so they only have API access. This can be done while logged into the merchant gateway by going to "Options>Settings>User Accounts".
The examples below show you how a typical transaction can be done. There are also examples of adding to the customer vault and how to set up recurring.
https://secure.nmi.com/api/transact.php?type=sale&security_key=[ADD SECURITY KEY HERE]&ccnumber=4111111111111111&ccexp=1025&amount=15.00
https://secure.nmi.com/api/transact.php?type=void&security_key=[ADD SECURITY KEY HERE]]&amount=5.00&transactionid=4077681766
https://secure.nmi.com/api/transact.php?type=refund&security_key=[ADD SECURITY KEY HERE]&amount=50.00&transactionid=3981038834
https://secure.nmi.com/api/transact.php?security_key=[ADD SECURITY KEY HERE]&ccnumber=4111111111111111&ccexp=1025&recurring=add_subscription&plan_payments=0&plan_amount=5.00&day_frequency=30&start_date&20180209
https://secure.nmi.com/api/transact.php?security_key=[ADD SECURITY KEY HERE]&ccnumber=4111111111111111&ccexp=1025&customer_vault=add_customer