[УКР](https://hackmd.io/-jgdOWRiRwaabSv5_YjAKQ) | ENG

:arrow_left: [Guide](https://hackmd.io/QA2NYRliRLGviJl5P4-ZCw)
# [101031] Card-IBAN for Legal Entity
*What is "Server-Server card payment" and how the sender is authenticated, see in the section "[Server-Server Card Payment](https://hackmd.io/83UDlVHPRf2CxEBCi6ECBg)".*
## Request
*See the description of the "Partner", "KeyAES" and "Sign" attributes in the section "[General API Integration Information](https://hackmd.io/ijxPm0xtTpycgTjuU_NHQQ)".*
### Data Structure
The Data structure for this operation is formed from the following parameters:
:::info
<details>
<summary>Data structure formation (examples are below)</summary>
<br>
~~~
{
"Sum": ,
"Currency": "",
"Exchange": "",
"Phone": "",
"Email": "",
"Purpose": "",
"SenderCard": {
"PAN": "",
"ExpMon": "",
"ExpYear": "",
"CVV": ""
},
"Recipient": "",
"SenderPerson: {
"FirstName": "",
"LastName": "",
"MiddleName": ""
},
"RecipientOrganization": {
"Name": "",
"EDRPOU": ""
},
"CallbackURL": "",
"Transaction": {
"TransactionID": "",
"TerminalID": "",
"DateTime": ""
},
"BrowserData": {
"device": {
"channel": ""
},
"browserIP": "",
"browserTZ": ,
"browserLanguage": "",
"browserUserAgent": "",
"browserColorDepth": ,
"browserJavaEnabled": ,
"browserScreenWidth": ,
"browserScreenHeight": ,
"fraudhuntFingerprint": ""
}
}
~~~
</details>
:::
|Parameter|Required|Type|Description|Example|
|:----:|:----:|:----:|----|:----:|
| `Sum` | Yes | Integer| Operation sum in kopecks. |1UAH=>`100`|
| `Currency` | Yes - paying in a currency different from UAH. | String | Currency debit code is an abbreviated currency designation described in the standard [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Non_ISO_4217_currencies) (“GBP”, “USD”, etc.). |`USD`|
| `Exchange` | Yes - paying in a currency different from UAH. | String | Currency *credit* code is an abbreviated currency designation described in the standard [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Non_ISO_4217_currencies) (“GBP”, “USD”, etc.). |`GBP`|
| `Phone` | No | String | Sender phone number in format: "380xxxxxxxxxxxx". |`380679335544`|
| `Email` | No | String | Sender email. |`index@gmail.com`|
|`Purpose`|No|String|Payment purpose.|`Payment Order No.333`|
|`SenderCard`^1^|Yes|Structure|Structure transmits sender's bank card data.|See example below.|
|`Recipient`|Yes|String|Recipient IBAN (International Bank Account Number). | `UA173052990000 026207893720887`|
|`SenderPerson`^2^|Yes - paying in a currency different from UAH.|Structure|Structure transmits sender's personal data.|See example below.|
|`RecipientOrganization`^3^|Yes - paying in a currency different from UAH.|Structure|Structure transmits recipient's organization data.|See example below.|
| `CallbackURL` | No | String | URL, where client is redirected after completing the payment. See section ["Server-Server Card Payment"](https://hackmd.io/83UDlVHPRf2CxEBCi6ECBg). |`https://partner.host/resul_page`|
|`BrowserData`|No|Structure|Structure transmits browser data for *3DSecure 2.0*. See section ["BrowserData structure"](https://hackmd.io/83UDlVHPRf2CxEBCi6ECBg#%E2%80%9CBrowserData%E2%80%9D-structure).|See example in section ["BrowserData structure"](https://hackmd.io/83UDlVHPRf2CxEBCi6ECBg#%E2%80%9CBrowserData%E2%80%9D-structure).|
|`Transaction`|Yes|Structure|Structure transmits transaction data. See section "[Transaction Structure](https://hackmd.io/ijxPm0xtTpycgTjuU_NHQQ?view#2-Data)".|See example below.|
^1^ **"SenderCard"** Structure Parameters:
|Parameter|Required|Type|Description|Example|
|:----:|:----:|:----:|----|:----:|
| `PAN` | Yes | String[16] | Sender card PAN (bank card number). | `8888888888888888` |
|`ExpMon`|Yes|String[2]|Month of card validity. Parameter is aligned to 2 digits by the symbol "0".|`02`|
|`ExpYear`|Yes|String[2]|Last 2 digits of the card's expiration year. Parameter is aligned to 2 digits by the symbol "0".|`22`|
|`CVV`|Yes|String[3]|CVV card code.|`356`|
^2^ **"SenderPerson"** Structure Parameters:
|Parameter|Required|Type|Description|Example|
|:----:|:----:|:----:|----|:----:|
| `FirstName` | No | String | Sender name. |`Oleg`|
| `MiddleName` | No | String | Sender middle name. |`Mykhaylovich`|
| `LastName` | No | String | Sender last name. |`Podilskyi`|
^3^ **"RecipientOrganization"** Structure Parameters:
|Parameter|Required|Type|Description|Example|
|:----:|:----:|:----:|----|:----:|
| `Name` | No | String | Name of the organization. |`TOV "Resurs"`|
| `EDRPOU`| No | String | Organization ["EDRPOU"](https://uk.wikipedia.org/wiki/%D0%84%D0%B4%D0%B8%D0%BD%D0%B8%D0%B9_%D0%B4%D0%B5%D1%80%D0%B6%D0%B0%D0%B2%D0%BD%D0%B8%D0%B9_%D1%80%D0%B5%D1%94%D1%81%D1%82%D1%80_%D0%BF%D1%96%D0%B4%D0%BF%D1%80%D0%B8%D1%94%D0%BC%D1%81%D1%82%D0%B2_%D1%82%D0%B0_%D0%BE%D1%80%D0%B3%D0%B0%D0%BD%D1%96%D0%B7%D0%B0%D1%86%D1%96%D0%B9_%D0%A3%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D0%B8) code (Eng. Unified State Register of Enterprises and Organizations of Ukraine). |`43700200` |
:::success
<details>
<summary>Example of "Data" structure</summary>
<br>
~~~md
{
"Sum": 600000,
"Purpose": "for studying VK Course 1, semester 2",
"Phone": "",
"Email": "",
"SenderCard": {
"PAN": "426048******6566",
"ExpMon": "",
"ExpYear": "**",
"CVV": "***"
},
"Recipient": "UA758201720313241002201001167",
"SenderPerson": {
"FirstName": "Yaroslav",
"LastName": "Grandfather",
"MiddleName": "Yuriovich"
},
"RecipientOrganization": {
"Name": "NU_OMA",
"EDRPOU": "01127799"
},
"Currency": "UAH",
"Exchange": "UAH",
"Transaction": {
"TransactionID": "632aac04-a967-4bf0-b59d-a05d2a0879b8",
"TerminalID": "1"
},
"BrowserData": {
"browserIP": "91.216.133.214",
"browserJavaEnabled": false,
"browserLanguage": "ru",
"browserColorDepth": 24,
"browserScreenHeight": 864,
"browserScreenWidth": 1536,
"browserTZ": 180,
"browserUserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Safari/537.36 Edg/103.0.1264.37",
"device": {
"channel": "BRW"
},
"fraudhuntFingerprint": ""
}
}
~~~
</details>
:::
:::success
<details>
<summary>Example of request [101031]</summary>
<br>
~~~md
{
"Partner": {
"PartnerToken": "72a8ddb8-9145-4a41-af1a-8c48ecaa4be1",
"OperationType": 101031,
"Locale": "uk"
},
"Data": "{\"Sum\":600000,\"Purpose\":\"for studying VK Course 1, semester 2\",\"Phone\":\"\",\"Email\": \"\",\"SenderCard\":{\"PAN\":\"426048******6566\",\"ExpMon\":\"\",\"ExpYear\":\" **\",\"CVV\":\"***\"},\"Recipient\":\"UA758201720313241002201001167\",\"SenderPerson\":{\"FirstName\":\"Yaroslav\" ,\"LastName\":\"Didyk\",\"MiddleName\":\"Yuriyovych\"},\"RecipientOrganization\":{\"Name\":\"NU_OMA\", \"EDRPOU\":\"01127799\"},\"Currency\":\"UAH\",\"Exchange\":\"UAH\",\"Transaction\":{\"TransactionID\": \"632aac04-a967-4bf0-b59d-a05d2a0879b8\",\"TerminalID\":\"1\"},\"BrowserData\":{\"browserIP\":\"91.216.133.214\",\" browserJavaEnabled\":false,\"browserLanguage\":\"ru\",\"browserColorDepth\":24,\"browserScreenHeight\":864,\"browserScreenWidth\":1536,\"browserTZ\":180, \"browserUserAgent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/103.0.5060.53 Safari\\/537.36 Edg\\/103.0 .1264.37\",\"device\":{\"channel\":\"BRW\"},\"fraudhuntFingerprint\":\"\"}}",
"KeyAES": "",
"Sign": ""
}
~~~
</details>
:::
## Response
*See the general information on the response structure formation in the section "[General API Integration Information](https://hackmd.io/ijxPm0xtTpycgTjuU_NHQQ?view#Response-Structure)"*.
### Response Examples
:::success
<details>
<summary>Request successfully accepted and needs "3DS" verification</summary>
<br>
~~~md
{
"Code": 102,
"Message": "need3ds",
"Data": {
"OperationID": 111,
"3dsHtml": "<html page in base64 encoding>",
"OperationStatus": 2
},
"KeyAES": "",
"Sign": ""
}
~~~
</details>
:::
:::success
<details>
<summary>Request successfully accepted and needs "OTP" verification</summary>
<br>
~~~md
{
"Code": 102,
"Message": "needOTP",
"Data": {
"OperationID": 111,
"otpJson": "<JSON structure as string>",
"OperationStatus": 3
},
"KeyAES": "",
"Sign": ""
}
~~~
</details>
:::
:::success
<details>
<summary>Operation Successfully Completed</summary>
<br>
~~~md
{
"Code": 200,
"Message": "done",
"Data": {
"OperationID": 555,
"OperationStatus": 10
},
"KeyAES": "",
"Sign": ""
}
~~~
</details>
:::
:::success
<details>
<summary>Operation Failed</summary>
<br>
~~~md
{
"Code": 200,
"Message": "done",
"Data": {
"OperationID": 111,
"OperationStatus": 21,
"Reason": 3
},
"KeyAES": "",
"Sign": ""
}
~~~
</details>
:::
## Related Requests
[[10101] Card-Card](https://hackmd.io/VYlXRMiWRkimK0sxlTZ2BA)
[[10102/101023/101025] Card-Wallet](https://hackmd.io/MUZzd3mTRQeQfBsE-emVVQ)
[[10103] Card-IBAN of Individual](https://hackmd.io/9c9kaHeMTH-LiGf_mVWwpg)
[[10150/10051] Card-Phone-Card](https://hackmd.io/ES9hW5BlS6CozQAmULgnRw)
**Token Payment**
[[104021] Card Payment by Token](https://hackmd.io/I4FJ0d0eStuvfqG2YmS8IQ)
[[1040217] Bulk Card Payment by Token](https://hackmd.io/6h9zyYaBTwOLzzP8XJDrfg)
[[104121] Auto Debit by Token. MO/TO Operations](https://hackmd.io/X4ImobdtSJ-Hy1qM-p7PWA)
**Get Card Data**
[[20400/20410] Get Card Data by Phone Number](https://hackmd.io/Xd9OZWXARcSZRTCsu-1jrw)
[[20404] Get Card Data by Token](https://hackmd.io/PSdh1ldNSmmJMR4OIhM_-Q)
**Get Transaction Data**
[[20003] Get Operation Status](https://hackmd.io/_eAjmoG-QPWoWWmsLOGf1g)
[[20009] Get Limit for Operation [10101]](https://hackmd.io/rQ7epWnbQmG9kM0rFjUfhA)
[[20110] Get Card Data](https://hackmd.io/WruG7PGDRsuF0gL0Wl21bA)
## Reference Materials
General parameters of the XPAY system are given in the section ["Reference Materials"](https://hackmd.io/16yLv895Qo-FWTvrWWQwbg): operation types, payment types, response codes, operation status, reasons of operation rejection, etc.

:arrow_left: [Guide](https://hackmd.io/QA2NYRliRLGviJl5P4-ZCw)
:arrow_left: [General API Integration Information](https://hackmd.io/ijxPm0xtTpycgTjuU_NHQQ)
<details>
<summary>XPAY Support</summary>
</br>
Phone: +38 093 891 92 00
Email: info@xpay.com.ua
Telegram: @xpaysupportbot
</details>