---
title: "Card on File Payment"
slug: "card-on-file-payment"
updated: 2025-07-21T09:35:46Z
published: 2025-07-21T09:35:46Z
canonical: "docs.monri.com/card-on-file-payment"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monri.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Card on File Payment

### Saving Card for Future Payments via SDKs

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

- Web
  - Monri Components
  - Redirect Integration
  - Lightbox Integration
- Mobile
  - [Android SDK](https://github.com/MonriPayments/monri-android)
  - [iOS SDK](https://github.com/MonriPayments/monri-ios)

## Payment With Saved Card

Before you continue familiarize yourself with Transaction API.

To execute payment with saved card:

- you need to supply `pan_token` instead of a single use token or card number, expiration date, cvv
- set `moto` to `true`

#### 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":"test@test.com",
      "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:

- **HTTP status code:** 201 - Created
- **HTTP headers:** {:connection=>"close", :date=>"Tue, 25 Oct 2011 01:18:37 GMT", :location=>"https://ipgtest.monri.com/transactions/845", :content_type=>"application/json; charset=utf-8", :cache_control=>"no-cache", :x_ua_compatible=>"IE=Edge", :x_runtime=>"1.475305", :transfer_encoding=>"chunked"}
- **HTTP body:**

```
{
   "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.
