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

:arrow_left: [Guide](https://hackmd.io/QA2NYRliRLGviJl5P4-ZCw)
# [90000] Operation Execution
## Usage
Operation procedure **via terminal** is formed from two requests:
|OperationType |Usage |
|----|----|
|`90001/90002/90003/90004/90005`|[Preparation of the operation](https://hackmd.io/4oNILIFlQD-bIpuN9PVhZQ).|
|`90000`|Execution of the operation.|
After receiving a successful response to the operation preparation request, the operation execution request is sent.
## Requests for Operation Execution
*See the description of the "Partner", "KeyAES" and "Sign" attributes in the section "[General API Integration Information](https://hackmd.io/ijxPm0xtTpycgTjuU_NHQQ)".*
### Data Structure
Data structure for this operation is formed from the following parameters:
:::info
<details>
<summary>Data structure formation (examples are below)</summary>
<br>
~~~
{
"OperationID": ,
"Sum": ,
"TerminalAddress": "",
"Transaction": {
"TransactionID": "",
"TerminalID": "",
"DateTime": ""
}
}
~~~
</details>
:::
|Parameter|Required|Type|Description|Example|
|:----:|:----:|:----:|----|:----:|
|`OperationID`|Yes|Integer|Unique operation identifier received in response to [Operation Preparation](https://hackmd.io/4oNILIFlQD-bIpuN9PVhZQ) request. Parameter is displayed in the client's check and is used to analyze disputed situations.|`76928773`|
| `Sum` | Yes |Integer | Operation sum in kopecks. |1UAH=>`100`|
| `TerminalAddress` |No|String|Terminal address, where the payment is made. |`Kyiv Region, Bila_Tserkva, Levanevsky_St.,53a`|
|`Transaction`|Yes|Structure|Structure transmits the transaction data. See section "[Transaction Structure](https://hackmd.io/ijxPm0xtTpycgTjuU_NHQQ?view#2-Data)".|See example below.|
:::success
<details>
<summary>Example of the request [90000]</summary>
<br>
~~~md
{
"Partner": {
"PartnerToken": "72a8ddb8-9145-4a41-af1a-8c48ecaa4be1",
"OperationType": 90000,
"Locale": "uk"
},
"Data": "{\"OperationID\": 76928773, \"Sum\": 9600, \"TerminalAddress\": \"Kyiv Region, Bila Tserkva, St. Levanevsky, 53a\", \"Transaction\": {\"TransactionID\": \"ed69f66b-1517-43dc-a98b-767e141d36f9\", \"TerminalID\": \"7180\", \"DateTime\": \"20220905 06:49:45\"}}",
"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)"*.
### Response Examples
:::success
<details>
<summary>Operation Successfully Completed</summary>
<br>
~~~md
{
"Code": 200,
"Message": "Done",
"Data": {
"OperationDate": "2018-12-25T14:48:10.977847+02:00",
"OperationID": 167818,
"OperationStatus": 10
},
"KeyAES": "",
"Sign": ""
}
~~~
</details>
:::
:::success
<details>
<summary>Operation Failed</summary>
<br>
~~~md
{
"Code": 400,
"Message": "Fail",
"Data": {
"OperationDate": "2018-12-25T14:48:10.977847+02:00",
"OperationID": 0,
"OperationStatus": 21
},
"KeyAES": "",
"Sign": ""
}
~~~
</details>
:::
## Related Requests
[[90001/90002/90003/90004/90005] Operation Preparation](https://hackmd.io/4oNILIFlQD-bIpuN9PVhZQ)
## 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>