---
# System prepended metadata

title: '[10001/10002] Confirm/Сancel Pre-Authorization for Operations [10102/101023/101025]'

---

[УКР](https://hackmd.io/KRcEsWMkRtiV0T1_ISoUMA) | ENG
![](https://i.imgur.com/ULmPUgP.jpg)
:arrow_left: [Guide](https://hackmd.io/QA2NYRliRLGviJl5P4-ZCw)


# [10001/10002] Confirm/Сancel Pre-Authorization for Operations [10102/101023/101025]


**Pre-authorization** (**Holding**) is a temporarily blocking (reserving) procedure of bank card account funds in favor of payment for goods or services, for example, until the order is completed or the validity of the card is verified.

## Usage

|OperationType |Usage |
|:----:|----|
|`10001`|Confirm Pre-Authorization for Operations [[10102/101023/101025]](https://hackmd.io/MUZzd3mTRQeQfBsE-emVVQ).|
|`10002`|Сancel Pre-Authorization for Operations [[10102/101023/101025]](https://hackmd.io/MUZzd3mTRQeQfBsE-emVVQ).|



### 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>

~~~
{
  "PreauthorizationID": "",
  "ticket": [],
  "cashiersignature": "",
  "Transaction": {
    "TransactionID": "",
    "TerminalID": "",
    "DateTime": ""
  }
}
~~~
</details>
:::


|Parameter|Required|Type|Description|Example|
|:----:|:----:|:----:|----|:----:|
|`PreauthorizationID`|Yes|String|Unique operation identifier in the Operator system that must be confirmed/cancelled. It is `txn_id` parameter, transmitted in the "[pay](https://hackmd.io/r0If47QcT-qyFuNvGEN2Wg)" request.|`633661`|
|`Transaction`|Yes|Structure|Structure transmits the transaction data. See section "[Transaction Structure](https://hackmd.io/ijxPm0xtTpycgTjuU_NHQQ?view#2-Data)".|See example below.|


*Parameters `ticket` and `cashiersignature` are transmitted if the operation is required to be fiscalized, see details in request [[10005]](https://hackmd.io/qSkRHz6gRKmxNrWRwwrjqg?both#%E2%80%9CTicket%E2%80%9D-Array).*


:::success
<details>
<summary>Example of the "Data" structure</summary>
<br>

~~~md
{
  "PreauthorizationID": 633661,
  "Transaction": {
    "TransactionID": "321643_1643975265",
    "TerminalID": "0",
    "DateTime": "20220406 08:07:09"
  }
}
~~~
</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": "operation ok",
  "Data": {
    "OperationID": 4576,
    "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

[[102070221/102070222/102070251/102070252] Confirm/Сancel Pre-Authorization](https://hackmd.io/CM0Mt9FATVS3cWkihWG_bA) 
[[30201/302013/302015] Cancel/Refund Payment for Operations [10102/101023/101025]](https://hackmd.io/VUh6hQpySFOsJV9yOzzgow)
[[30202] Cancel/Refund Post-Authorization](https://hackmd.io/kRNsz_UtQZKviJnWG238HA)
[[30203] Cancel/Refund Checkout Payment](https://hackmd.io/cQmrZWV5QY-QbWDTBiCB2g)



## 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.


![](https://i.imgur.com/17gAyWb.png)
: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>