Purpose
This command is used by the partner to initiate a sale transaction on the terminal. After successfully received request for MPRPurchase call the merchant must check for transaction on the myPOS device (press button O). Please refer to Process flow examples for more details.
Method properties
Property |
Typical value |
Type |
Presence |
Description |
---|---|---|---|---|
version | 3.0 | String | M | The version of the protocol used for transition. |
login | name@website.com | String | M | Identifier of the partner. |
key_index | 1 | Int | M | Identifier of the partner. |
tid | 90000015 | AN(8) | M | Terminal ID |
ruid | 201203319999999 | String | M | Unique identifier of the submitted request. Up to 255 characters. |
amount | 23.45 | N(6,2) | M | The amount of the requested payment. |
reference_number | Inv12345 | String | O | Up to 50 symbols of text (Latin characters only) - can include letters, numbers, spaces and special characters. |
reference_number_type | 0-4 | Int | O | 1 - Reference number, 2 - Invoice number, 3 - Product ID, 4 - Reservation number |
signature | Byte[] | BASE64 | M | SHA-256 HASH for all properties in the command signed with the private key. The signature parameter is not used to calculate the hash. |
Response properties
Property |
Typical value |
Type |
Presence |
Description |
---|---|---|---|---|
version | 3.0 | String | ME | Echo from MPRPurchase. |
login | name@website.com | String | ME | Echo from MPRPurchase. |
key_index | 1 | Int | ME | Echo from MPRPurchase. |
tid | 90000015 | AN(8) | ME | Echo from MPRPurchase. |
ruid | 201203319999999 | String | ME | Echo from MPRPurchase. |
amount | 23.45 | N(6,2) | ME | Echo from MPRPurchase. |
reference_number | Inv12345 | String | МE | Echo from MPRPurchase. |
reference_number_type | 0-4 | Int | МE | Echo from MPRPurchase. |
status | 0 | N(2) | M | Status of the request. For more information check Status Messages. |
status_msg | OK | String | O | Additional details about the received status. |
signature | Byte[] | BASE64 | M | SHA-256 HASH for all properties in the command signed with the private key. The signature parameter is not used to calculate the hash. |
Example of the request:
<urn:MPRPurchase xmlns:urn="urnIPayService">
<urn:version>3.0</urn:version>
<urn:login>name@website.com</urn:login>
<urn:key_index>1</urn:key_index>
<urn:tid>90000015</urn:tid>
<urn:ruid>201203319999999</urn:ruid>
<urn:amount>23.45</urn:amount>
<urn:reference_number>Inv12345</urn:reference_number>
<urn:reference_number_type>1</urn:reference_number_type>
<urn:signature>bUViE5SzWy9iYpWzxlEVO/8Yb6bvtJVn1P6/rat5NBdgJaBU7OxeRm8rxi/fW1xuekqDM06F4MbzUPnTIA/sZ1ZwlMjSTExY5+7DqkdejN7mDgnB8zogrOfF6/P1snxuNgPRtHuJ0ZeTdTWNm9kKPGE7IadvIGtOpF+7yspfWd4=</urn:signature>
</urn:MPRPurchase>
Example of the response when the request is valid:
<MPRPurchaseResponse xmlns:urn="urnIPayService">
<MPRPurchaseResult xmlns:a="http://schemas.datacontract.org/2004/07/iPay.Core" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:version>3.0</a:version>
<a:login>name@website.com</a:login>
<a:key_index>1</a:key_index>
<a:tid>90000015</a:tid>
<a:ruid>201203319999999</a:ruid>
<a:amount>23.45</a:amount>
<a:reference_number>Inv12345</a:reference_number>
<a:reference_number_type>1</a:reference_number_type>
<a:status>0</a:status>
<a:status_msg>OK</a:status_msg>
<a:signature>bUViE5SzWy9iYpWzxlEVO/8Yb6bvtJVn1P6/rat5NBdgJaBU7OxeRm8rxi/fW1xuekqDM06F4MbzUPnTIA/sZ1ZwlMjSTExY5+7DqkdejN7mDgnB8zogrOfF6/P1snxuNgPRtHuJ0ZeTdTWNm9kKPGE7IadvIGtOpF+7yspfWd4=</a:signature>
</MPRPurchaseResult>
</MPRPurchaseResponse>
Example of the response when the request is not valid:
<MPRPurchaseResponse xmlns:urn="urnIPayService">
<MPRPurchaseResult xmlns:a="http://schemas.datacontract.org/2004/07/iPay.Core" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:version>3.0</a:version>
<a:login>name@website.com</a:login>
<a:key_index>1</a:key_index>
<a:tid>90000015</a:tid>
<a:ruid>201203319999999</a:ruid>
<a:status>1</a:status>
<a:status_msg>E_MISSING_REQ_PARAMS</a:status_msg>
<a:signature>bUViE5SzWy9iYpWzxlEVO/8Yb6bvtJVn1P6/rat5NBdgJaBU7OxeRm8rxi/fW1xuekqDM06F4MbzUPnTIA/sZ1ZwlMjSTExY5+7DqkdejN7mDgnB8zogrOfF6/P1snxuNgPRtHuJ0ZeTdTWNm9kKPGE7IadvIGtOpF+7yspfWd4=</a:signature>
</MPRPurchaseResult>
</MPRPurchaseResponse>