2017-07-29 03:29:13

Bank cards in iFrame

When creating invoices for bank card payments in the usual mode the mode_type parameter should have the value provided by the technical specialists during the integration.

Invoicing for bank cards in the background is performed with the help of the iFrame built-in block. In this case users are not redirected to other web-sites. This mode is available only for the following mode_type parameter values: 

  • 624 (back cards) 

For such procedures one more mandatory parameter is added to the usual list.

Parameter Description Format Mandatory
mode_type Background payment mode ID 624 Yes

Response method ID

1 Yes

After processing the data provided by the Project the System sends a response in UTF-8 encoded XML format. 

If the invoice is created successfully, all the returned node values are considered to be inside information and are used to create URL-address for iFrame.

The URL returned by the iframeUrl parameter is used for the invoice.

Parameters of the response

Parameter Description Format


Payment status code

0 -request is successful
-1 - request failed


Status comment and the list of all errors



Link for embedding into iFrame



Transaction ID on the System side



Requested amount in rubles



Payment currency in the Payment System


ISO 4217alfa-3

After invoicing the user is redirected to the Payment System site inside the built-in block.

Response example (success)

<?xml version="1.0" encoding="UTF-8"?> 

Response example (failure)

<?xml version="1.0" encoding="UTF-8"?>
	<comment><![CDATA[Payment amount is invalid]]></comment>

iFrame example for bank card invoicing with mode_type 624 (PHP)

$vars = array( 
'project' => 189, 
'nickname' => '23497434', 
'order_id' => '123456', 
'amount' => 100, 
'mode_type' => 624, 
'xml' => 1, 
'paymentCurrency' => 'RUB'
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, ''); 
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_POSTFIELDS, $vars); 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); 
curl_setopt($ch, CURLOPT_TIMEOUT, 30); 
$res = curl_exec($ch); 
$xml = simplexml_load_string($res, 'SimpleXMLElement', LIBXML_NOCDATA); 
if(intval($xml->status) == 0){ 
$url = trim($xml->iframeUrl); 
<iframe name="onmoney" src="<?php echo $url; ?>" width="530" height="925" frameborder="0" scrolling="no" marginwidth="0" marginheight="0"></iframe> 
else{ echo $xml->comment;