Before you continue with this guide ensure:
If you do not have saved (tokenized) cards for future payments please refer to our guides:
Before you continue familiarize yourself with Transaction API.
To execute payment with saved card:
pan_token
instead of a single use token or card number, expiration date, cvvmoto
to true
{
"transaction":{
"transaction_type":"authorize",
"amount":100,
"ip":"10.1.10.111",
"order_info":"Monri components trx",
"ch_address":"Adresa",
"ch_city":"Grad",
"ch_country":"BIH",
"ch_email":"[email protected]",
"ch_full_name":"Test",
"ch_phone":"061 000 000",
"ch_zip":"71000",
"currency":"BAM",
"digest":"6af94189788cc073464764c69a9afaea3196bd7ca84b442a76aa141f6b48f8cf323b77aebe0cb72099816e69c08981eccd312ff30d88fa293670a830d78e2466",
"order_number":"1568236677437",
"authenticity_token":"6a13d79bde8da9320e88923cb3472fb638619ccb",
"language":"en",
"pan_token":"3cfb7f1df0ef7ef707ad213e4850219ed4b4553a96a68b6430359d002acdcafd",
"moto": true
}
}
This JSON is now posted to https://ipgtest.monri.com/v2/transaction
.
Note that pan_token
and moto
values are set.
IMPORTANT
Parametrize https://ipgtest.monri.com
URL, in production mode the subdomain will be different.
If all values pass validations at our side, transaction is send to the bank and response is returned. This response may look like this:
{
"transaction":{
"id":187091,
"acquirer":"integration_acq",
"order_number":"1568265143783",
"amount":100,
"currency":"BAM",
"outgoing_amount":100,
"outgoing_currency":"BAM",
"approval_code":"376161",
"response_code":"0000",
"response_message":"approved",
"reference_number":"000002903748",
"systan":"187090",
"eci":"06",
"xid":null,
"acsv":null,
"cc_type":"visa",
"status":"approved",
"created_at":"2019-09-12T07:12:27.019+02:00",
"transaction_type":"purchase",
"enrollment":"N",
"authentication":null,
"pan_token":"3cfb7f1df0ef7ef707ad213e4850219ed4b4553a96a68b6430359d002acdcafd",
"issuer":"xml-sim"
}
}
New transaction is generated - 201 Created HTTP status code, and it’s location is set in appropriate HTTP header.
A client then must parse a body from HTTP response and extract all values from that JSON
document.
Transaction is approved only and if only status is set to approved
.
All other fields are standard data carried over payment networks.
If issuer declines a transaction, status flag is set to declined
. In a case of an error, the flag will be set to invalid
.
IMPORTANT
Do not rely on any output variable except status to determine successful of authorization.