Card on File Payment

Versions

Version 21.09.2020

Requirements

Before you continue with this guide ensure:

Saving Card for Future Payments via SDKs

If you do not have saved (tokenized) cards for future payments please refer to our guides:

Payment With Saved Card

Before you continue familiarize yourself with Transaction API.

To execute payment with saved card:

Authorization request example

{
   "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:

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.