[УКР](https://hackmd.io/aTXOGiPaSkewvXdXUbpstg) | ENG ![](https://i.imgur.com/ULmPUgP.jpg) :arrow_left: [Guide](https://hackmd.io/QA2NYRliRLGviJl5P4-ZCw) # [102070221/102070222/102070251/102070252] Confirm/Сancel Pre-Authorization **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 | |:----:|----| |`102070221`|Confirm Pre-Authorization.| |`102070222`|Cancel Pre-Authorization.| |`102070251`|Confirm Pre-Authorization by details.| |`102070252`|Cancel Pre-Authorization by details.| ## 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> ~~~ { "PreauthorizationID": "", "Sum": , "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`| |`Sum`|No|Integer|Sum of post-authorization in kopecks. It may differ from the sum of pre-authorization, either higher or lower, by no more than 15% (percentage determined individually). |1UAH=>`100`| |`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, "Sum": 3000, "ticket": [ { "ID": "RD009732", "Good": "Sour cream 20% fat TM Prostokvashino 350g/20", "Count": 1000, "Price": 3000, "uktzed": "0403" } ], "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 [[10001/10002] Confirm/Сancel Pre-Authorization for Operations [10102/101023/101025]](https://hackmd.io/GQcXQzGIRnmpnUW113fQGw) [[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>