Skip to main content

mVisa

General information

mVisa is a mobile payment method that allows your customers to make payments using their mobile phones by scanning a QR code at your point of sale. The QR code, embedded with the merchant's account details, can be presented in two formats:

  • Static: this unchanging code requires customers to manually enter the payment amount.
  • Dynamic: generated for each transaction, this code automatically includes the specific amount to be paid, streamlining the payment process.

Integration

To generate a QR code, you must send a POST request with the following query parameter:

ParameterTypeRequiredDescription
typeStringmVisa QR code type

This query parameter can contain one of the following values:

  • raw - alpha-numeric string
  • png - PNG 294х294 px

Request parameters:

ParameterTypeRequiredDescription
pos_idUUIDMerchant's identifier (POS_ID)
amountNumberAmount of the future transaction.
If not passed, the QR code will be static (it requires customers to enter the amount). Must be a positive number. The number of decimal digits must be less than or equal to 2 (e.g., 100.00, 250, 50.50)
currencyCURRENCYTransaction currency (ISO_4217)
mccMCCMCC of the future transaction
merchant_panStringPAN number
merchant_nameStringMerchant name
merchant_cityStringMerchant city
country_codeStringCountry code (ISO 3166-1 (alpha-2))

You only need to provide these parameters if they have not been previously set up through Tranzzo:

  • mcc
  • merchant_pan
  • merchant_name
  • merchant_city
  • country_code
caution

The parameters passed in the request take precedence over those pre-configured through Tranzzo.

Request example:

$ curl -i "https://cpay.tranzzo.com/api/v1/mvisa?type=${QR_TYPE}" \
-H "Content-Type: application/json" \
-H "X-API-AUTH: CPAY ${API_KEY}:${API_SECRET}" \
-H "X-API-KEY: ${ENDPOINTS_KEY}" \
-X POST -d '{
"pos_id": "'${POS_ID}'",
"amount": 100,
"currency": "UAH",
"merchant_pan": "4111111111111111",
"mcc": "1234",
"country_code": "UA",
"merchant_name": "TRANZZO",
"merchant_city": "Kyiv"
}'

Response parameters for the raw format include:

ParameterTypeDescription
rawStringRaw QR code as alpha-numeric string

Response example for the raw format:

{
"raw": "000201021642424242424242425204123453039805406100.005802UA5907TRANZZO6004Kyiv63044A84"
}

Response parameters for the PNG format include:

  • The QR code measures 294 x 294 px
  • Content-type: application/octet-stream

mVisa payments processing

Payment data must be transmitted to the Tranzzo API using parameters specific for direct integration payments made with card data.

The mvisa value should be included in the payway parameter.

Additionally, another parameter is required:

ParameterTypeRequiredDescription
properties.mvisa_qrStringRaw QR code as alpha-numeric string

Request example:

$ curl "https://cpay.tranzzo.com/api/v1/payment" \
-H "Content-Type: application/json" \
-H "X-API-AUTH: CPAY ${API_KEY}:${API_SECRET}" \
-H "X-API-KEY: ${ENDPOINTS_KEY}" \
-X POST -d '{
"pos_id": "${POS_ID}",
"mode": "direct",
"method": "purchase",
"amount": 1,
"currency": "UAH",
"description": "Order description",
“payway”: “mvisa_qr”
"order_id": "123",
"properties": { "mvisa_qr": "000201021642424242424242425204123453039805406100.005802UA5907TRANZZO6004Kyiv63044A84" }
"order_3ds_bypass": "always",
"cc_number": "4242424242424242",
"exp_month": 2,
"exp_year": 24,
"card_cvv": "111",
"server_url": "https://callback.blackhole.com/callback",
"result_url": "https://example.com/result",
"payload": "sale=true",
"customer_referrer": "https://example.com",
"browser_fingerprint": {
"browserColorDepth": "24",
"browserScreenHeight": "860",
"browserScreenWidth": "1600",
"browserJavaEnabled": "false",
"browserLanguage": "uk-UA",
"browserTimeZone": "Europe/Kiev",
"browserTimeZoneOffset": "-120",
"browserAcceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"browserIpAddress": "127.0.0.1",
"browserUserAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36"
}
}'
caution

The amount and currency specified in the request body must match those set when generating the QR code.