Requirements - API v2
This page is only valid for version 2 of our APIs.
To start integrating with our service you will need the following:
test merchant account
If you don't have a test merchant account, please contact us at support@monri.com and we will open one for you. Then you can login into your account at https://ipgtest.monri.com/en/login with login and password provided.
Requests
Documentation below describes:
api url values
required headers
authentication header
Api URL
test
https://ipgtest.monri.com
prod
https://ipg.monri.com
NOTE Parametrize api url value.
Headers
Content-Type
application/json
All api endpoints require application/json
Content-Type header
Accept
application/json
All api endpoints require application/json
Accept header
Authorization
<authorization_header>
All api endpoints require Authorization
header. See below how to generate one
Authentication
Every request to the Monri's backend requires authentication. Depending on HTTP
method algorithm used to create Authorization
header differs.
To create authorization header you'll need:
merchant_key
(available on merchant’s dashboard)authenticity_token
(available on merchant’s dashboard)
Authorization header for GET|POST
request is created from:
schema
WP3-v2.1
authenticity_token
<authenticity_token>
Available on merchant's dashboard
timestamp
<timestamp>
Unix timestamp, eg PHP's time()
digest
<digest>
See docs for digest generation
Example of authorization header:
Digest generation
merchant_key
<merchant_key>
Value available on merchant's dashboard
timestamp
<timestamp>
Same timestamp value used in authorization header
authenticity_token
<authenticity_token>
Value available on merchant's dashboard
fullpath
<fullpath>
Full path of request, eg, /v2/terminal-entries/create
body
<body>
Empty string if GET
request, request body if POST
request
Digest example
If we have:
url: https://ipgtest.monri.com/v2/payment/new
method:
POST
fullpath is then:
/v2/payment/new
merchant_key:
qwert1234
timestamp:
1593457122
authenticity_token:
7db11ea5d4a1af32421b564c79b946d1ead3daf0
body:
Then we create digest as:
Response Handling
Monri's API adheres to following principles:
status
field is always in response and has values:
created
200
Resource is created
updated
200
Resource is updated
approved
200
Request successful
invalid-request
4**
There's something wrong with request
error
500
Something went wrong while processing the request
If response code is
2**
: Request is accepted and processed, response is returnedIf response code is
401
: Authorization failed, there's probably an issue withAuthorization
headerIf response code is
400
: Request processing failure, eg. attempted to create resource with invalid amount
Valid (approved) response
Example of valid response:
Invalid-request response
Example of invalid-request
response:
Error response
Example of error
response:
Last updated