Quick Start Development
For Quick Start development, we have supplied .zip files with code for PHP as a starting point. The content of each .zip file was generated by Swagger Codegen to provide server stubs and documentation.
To accomplish your integration into our production environment, you may need tools, such as POSTMAN. It is up to you to select the tools that will be most helpful with your development.
We explain below how to use the PHP Quick Start development .zip as an example.
The links below provide access to the .zip file for each language:
PHP
A downloadable PHP code sample is provided in the link below. The sample includes wrapper classes that make it easier to interact with the API from PHP applications. The PHP code also provides examples that you can incorporate into real-world integrations.
Follow these steps to use the Quick Start PHP example:
- Download the PHP code sample file using the link below:
MerchantDashboard-PHP-20180516.zip - Unpack the downloaded file.
- In the unpacked folder contents, find and open the sample.php file. This file provides an example that calls the API to retrieve Credit and ACH transaction information for the hardcoded date range.
- Run sample.php on the command line. Running the example retrieves Credit and ACH transaction information for the hardcoded date range, then outputs the retrieved information to the console or the Web browser. Shown below is a sample of the returned information for a single Credit transaction:
{ "MID": "6314189999999999", "MaskedPAN": "527515******9241", "TransactionNumber": 1, "ARN": "85306518033900015603413", "TransactionDate": "2018-02-01T00:00:00", "EntryMode": "Key Entry", "TransactionType": "Sale", "CardType": "MasterCard", "AuthCode": "133446", "Amount": 0.99, "TID": "78262697", "BatchCloseDate": "2018-02-02T00:00:00", "BatchID": 27626789, "CVVResponse": null, "AuthResponseCode": null, "AVSResponseCode": null, "TransactionCurrencyCode": "USD", "CardholderCurrencyCode": "USD", "CardholderConversionRate": null, "CardholderAmount": 0.99, "CardCategory": "BANKCARD", "CardCategory2": "MasterCard", "OrderID": null, "UniqueRef": null, "ClerkID": null, "Gateway_Terminal": null }
Swagger/Open API Specification
We also provide a Swagger/Open API specification for the Merchant Dashboard API in a YAML based machine-readable file. The specification file describes all the API’s capabilities.
You will need knowledge of the Swagger/Open API and YAML to use this information.
To download the specification file, use the link below:
The downloaded file is named Swagger.yaml.
Working with our Sandbox Environment
The Merchant Dashboard API has a Developer Portal with a Sandbox Testing environment. The Sandbox provides a quick way to test and become familiar with the API and the information it returns.
The Sandbox is not intended to be an example of how you would use the API in production. Use the data to present information in a way that is meaningful to your users.
To use the Sandbox, you must first obtain Testing Credentials. Use your credentials in the Sandbox to run tests that return example information.
A sample test run is shown below.
Sandbox Credentials
To obtain unique credentials for access to the Sandbox Testing environment and information, register with an Integration Analyst or Implementation Manager. If you wish to get started without registering, use the generic test credentials provided below.
- In the Developer Innovation Center, go to the Sandbox Tools section. Press Merchant Dashboard API.
- You can also use this direct link.
- You will see a list of Merchant Dashboard reporting API functions available for testing.
- Use the Generic Test credentials provided below for Merchant Dashboard testing:
- Username: apiuser
- Password: !@Mopicyn
- Use the suggested date range values (Format: YYYY-MM-DD) provided below for Merchant Dashboard testing.
-
- startDate: 2017-08-01
- endDate: 2017-09-26
-
Using your Testing Credentials
You will receive an email with your Testing Credentials. You can then use the Sandbox to extract ACH, Credit, Authorization, Dispute, Funding and Batch Transaction sample data.
Each unique GET operation determines the type of transaction data that is extracted by the Merchant Dashboard API.
See Available Operations in the Merchant Dashboard API for the Sandbox Resource URL for each type of transaction.
Use your Test Credentials to Extract ACH Transaction Data
This is a step by step example of using the Sandbox Environment to pull ACH Transaction data:
- Go to the Sandbox environment using the link below:
- https://developer.nuvei.com/merchant-dashboard-api/apis/get/api/Transactions/GetACHTransactions
- An Apigee based Sandbox web page is provided for each Operation.
- To access a list of all the other Merchant Dashboard Operations and their corresponding Sandbox testing pages, use the link below:
- https://developer.nuvei.com/merchant-dashboard-api/apis/get/api/Transactions/GetACHTransactions
- After pressing the link for the ACH Transactions the screen below will appear. Press HTTP Basic in the lower left corner.
- A pop-up window below will appear. Enter your unique Testing Credentials, or use the Generic Test Credentials, then press Save.
- The pop-up window closes putting you back on the screen shown in Step 2. Your Testing Credentials are now saved for this session only.
- On the screen shown in Step 2 enter:
- startDate: 2017-08-01 (YYYY-MM-DD)
- endDate: 2017-09-26 (YYYY-MM-DD)
- Press Send this request. The Merchant Dashboard API will process the request, and generate a JSON file with the sample results.
- When the processing is complete, go to the Request tab to view the actual request information, as shown below:
- Go to the Response tab to see the set of data records returned. One record of JSON output is shown below:
- Go to the cURL tab to see the information on how to use cURL. Sample output is shown below: