Requirements - API v2
This page is only valid for version 2 of our APIs.
Last updated
This page is only valid for version 2 of our APIs.
Last updated
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.
Documentation below describes:
api url values
required headers
authentication header
environment | value |
---|---|
NOTE Parametrize api url value.
name | value | description |
---|---|---|
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:
Example of authorization header:
Digest generation
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:
Monri's API adheres to following principles:
status
field is always in response and has values:
If response code is 2**
: Request is accepted and processed, response is returned
If response code is 401
: Authorization failed, there's probably an issue with Authorization
header
If response code is 400
: Request processing failure, eg. attempted to create resource with invalid amount
Example of valid response:
Example of invalid-request
response:
Example of error
response:
name | value | description |
---|---|---|
name | value | description |
---|---|---|
status | status code | description |
---|---|---|
test
https://ipgtest.monri.com
prod
https://ipg.monri.com
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
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
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
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