MiPaymentChoice Gateway - API Documentation
Introduction
The payment gateway API allows merchants to develop their own customer payment processes in order to optimize the merchant's business model.
Test/Developer Accounts
All calls to the MiPaymentChoice API require merchant authentication. In order to test processing API's, you can use our main test account:
Gateway Website
https://gateway.mipaymentchoice.com
User Credentials
Individual Merchant: 123456789012 (MiCamp North Test)
Website / GUI User:
- Username: micamptest
- Password: 555dde9a6a
API User (no GUI access):
- Username: mcnorthapi1
- Password: MCGws6sP2
NOTE: From time to time the credentials for the test gateway may change - if you find yourself getting an authentication error, please refer back to this page for additional information.
Hosted Payment Page Sample:
https://gateway.mipaymentchoice.com/ws/hosted2.aspx?Username=tbL1aBWl94Mda7QiOKhwig%3d%3d&Password=It3RSwruVX9xkfPEkxynuJbQWsGPLTrXvX3V7XU8KmpkjDvrNf%2fhSJU66YAAWgfL&MerchantKey=42&Amount=1.00
Additional Information
If you require more detailed testing, you can send a request for your individual test account to be set up by sending an email to support@micamp.com.
Endpoints
All requests to the MiPaymentChoice API are sent via standard HTTP POST and GET methods to a valid API endpoint URL.
Please see the following links for details regarding specific endpoints.
- Authentication
- Tokenization
- v1 Transaction Processing
- V2 Transaction Processing (preferable)
- Reporting
- Custom Fields
- Recurring Billing Contracts
- Customers
- Registers
Swagger Documentation and Testing Page
There is a Swagger testing page that can be found at:
https://api.mipaymentchoice.com
NOTE: Acceptable and required field information for each of the endpoints can be found below in the API pages.
Content Type
Requests must include a Content-Type header that describes the type of data in the request:
Content Type | Header | Value |
JSON | Content-Type | application/json |
XML | Content-Type | text/xml |
Authentication
Clients authenticate with the username and password of an API User and use the returned bearer token on subsequent requests.
Failed authentication attempts will return 401 Unauthorized and an Error Response in the response. The Message in the ResponseStatus of the ErrorResponse will indicate the cause of failure. For example, an attempt with an invalid username will be: "Invalid UserName or Password".
NOTE: If you are using the Swagger page to perform your testing, you will need to click on the Authorize button on the top right of the Swagger page after you have obtained your Bearer Token – you can test the Bearer Token the same way.
JWT Bearer Token
Method: GET
Endpoint: https://gateway.mipaymentchoice.com/api/authenticate
Sample Request:
{
"Username": "username",
"Password": "password"
}
Sample Response:
{
"SessionId": "String",
"UserName": "String",
"DisplayName": "String",
"BearerToken": "String",
"ResponseStatus": {}
}
Request Types and Typical Responses
The available request types for the API endpoints and their intended purpose are as follows:
HTTP Action | Purpose | Typical Response |
POST | Creates new resources | 201 |
PUT | Replaces existing resources with an updated version | 200 |
PATCH | Updates specific properties of existing resources | 200 |
GET | Queries resources | 200 |
DELETE | Deletes existing resources | 204 |
The API uses standard HTTP response codes to indicate the success or failure of a request. In general:
- 2xx range codes indicate success
- 4xx range codes indicate an error because of the information provided, or not provided, by the client (for example, a missing required value, or a value outside the range of allowed values)
- 5xx range codes indicate an error on the server
The following is a list of the common status codes in use.
Status Code | Description | Indicates |
200 | OK | A GET was successful and the requested resource is included in the response
A PUT was successful and the updated resource is included in the response |
201 | No Content | A POST was successful and the new resource is included in the response |
204 | No Content | A DELETE was successful and nothing is returned in the response. |
400 | Bad Request | The request failed because it could not be completed with the data provided by the client |
401 | Unauthorized | An authentication request failed and an Error Response is included in the response |
404 | Not Found | A GET was unsuccessful |
409 | Conflict | The request failed because a resource with the same identifier already exists |