# Completion Request (Finalization of Preauth)

## Completion Request

**Input Parameters:**

| **Parameter**          | **Description**                                                                                                                                          | **Data Format**                            | **Mandatory** | **Example**                                                                                                          |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | ------------- | -------------------------------------------------------------------------------------------------------------------- |
| merchantRequestId      | A unique identifier generated by the merchant's system, used to check the operation status if the request resulted in an unknown error or disconnection. | string (36)                                | Yes           | `137d9304-0368-11ed-b939-0242ac120002`                                                                               |
| merchantId             | Merchant ID generated in Ecom.                                                                                                                           | string(36)                                 | Yes           | `137d9304-0368-11ed-b939-0242ac120002`                                                                               |
| originalOperationId    | The identifier of the pre-authorization operation.                                                                                                       | string                                     | Yes           | `137d9304-0368-11ed-b939-0242ac120002`                                                                               |
| coinAmount             | The completion amount in cents (kopecks).                                                                                                                | string                                     | Yes           | `2500`                                                                                                               |
| date                   | Date and time of the payment.                                                                                                                            | string                                     | Yes           | `{{currentdateT}}.00+00:00`                                                                                          |
| notificationUrl        | The URL to which the Callback will be sent.                                                                                                              | string (1000)                              | No            | `https://merchant.notification_url`                                                                                  |
| notificationEncryption | Flag for encrypting Callback data.                                                                                                                       | string                                     | No            | `true`/`false`. If the parameter is not passed or passed as `false`, the data in the Callback will not be encrypted. |
| merchantComment        | Additional information/comment from the merchant regarding the order.                                                                                    | string(255) `a-zA-Z0-9 ,.;:@#$%'-=+1,256$` | No            | `merchant Comment id 1258728c1`                                                                                      |
| comment                | Additional description of the operation filled in by the merchant's client.                                                                              | string (1000)                              | No            | `///5555.25412`                                                                                                      |
| purpose                | Payment purpose filled in by the merchant.                                                                                                               | string (255)                               | No            | `За товар` (For goods)                                                                                               |

**Output Parameters**

| **Parameter**          | **Description**                                                               | **Data Format** | **Example**                                                                                                                                   |
| ---------------------- | ----------------------------------------------------------------------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| type                   | Transaction type                                                              | string          | COMPLETION                                                                                                                                    |
| rrn                    | RRN number of the transaction in the IPS (Interchange Payment System)         | string          | 2554256963                                                                                                                                    |
| purpose                | Payment purpose                                                               | string          | За товар (For goods)                                                                                                                          |
| comment                | Comment                                                                       | string          | тест (test)                                                                                                                                   |
| coinAmount             | Payment amount                                                                | int             | 2000                                                                                                                                          |
| merchantId             | Merchant ID                                                                   | string          | 137d9304-0368-11ed-b939-0242ac120002                                                                                                          |
| operationId            | Transaction ID                                                                | string          | 1712844596346b9F-WwrWZpq                                                                                                                      |
| ecomOperationId        | Transaction ID in the Ecom system                                             | string          | 8c3303e9-7396-43b8-af4e-31d9facdde9b                                                                                                          |
| merchantName           | Merchant name                                                                 | string          | KB test terminal                                                                                                                              |
| approvalCode           | Authorization code                                                            | string          | 39203                                                                                                                                         |
| status                 | Transaction status                                                            | string          | <p>\<p>SUСCESS</p><p><br></p><p>FAIL</p><p><br></p><p>PENDING\</p></p>                                                                        |
| transactionType        | Transaction type in numerical value                                           | string          | 196                                                                                                                                           |
| merchantRequestId      | Merchant request ID                                                           | string          | 72837906-f526-4aef-8d11-58d80b44cb75                                                                                                          |
| transactionCurrency    | Payment currency                                                              | string          | 980                                                                                                                                           |
| createDateTime         | Payment creation date                                                         | string          | 2024.09.19 15:29:25.675                                                                                                                       |
| modificationDateTime   | Payment modification date                                                     | string          | 2024.09.19 15:29:25.675                                                                                                                       |
| actionCode             | Response code                                                                 | string          | 0                                                                                                                                             |
| responseCode           | Response details                                                              | string          | 0                                                                                                                                             |
| description            | Response description                                                          | string          | approved                                                                                                                                      |
| processingMerchantId   | Merchant ID in the PC (Processing Center)                                     | string          | AE100000                                                                                                                                      |
| processingTerminalId   | Terminal ID in the PC                                                         | string          | AE100000                                                                                                                                      |
| bankCode               | Name of the issuing bank                                                      | string          | BANK\_ALLIANCE                                                                                                                                |
| paymentSystem          | Name of the issuing IPS                                                       | string          | MasterCard                                                                                                                                    |
| productType            | Terminal product type                                                         | string          | PURCHASE                                                                                                                                      |
| notificationUrl        | URL to which the Callback was sent                                            | string          | [https://merchant.notification\_url/](https://www.google.com/search?q=https://merchant.notification_url/)                                     |
| paymentServiceType     | Payment type                                                                  | string          | CARD/APPLE\_PAY/GOOGLE\_PAY                                                                                                                   |
| notificationEncryption | Flag for encrypting Callback data                                             | string          | <p>\<p>true/false</p><p><br></p><p>If the parameter is not passed or passed as false, the data in the Callback will not be encrypted\</p></p> |
| preauthOperationId     | Pre-authorization ID                                                          | string          | 1712843529623cHAHkmt-G5u                                                                                                                      |
| preauthCoinAmount      | Pre-authorization amount                                                      | int             | 100                                                                                                                                           |
| preauthEcomOperationId | ID in the Ecom system under which the pre-authorization operation was created | string          | c25ee1cb-a052-439b-b075-bcb632615b11                                                                                                          |
| rrnPreauth             | RRN number of the pre-authorization in the IPS                                | string          | 123456789                                                                                                                                     |

**Example Request Body**

```json
{
"merchantRequestId":"137d9304-0368-11ed-b939-0242ac120002",
"originalOperationId":"17594943825392XRyx8EeK6e",
"merchantId":"137d9304-0368-11ed-b939-0242ac120002",
"coinAmount":"2500", 
"notificationUrl": "",
"date": "2022-11-11 11:58:41.56+00:00"
}

```

**Example Response Body**

```json
{
   "type":"COMPLETION",
   "rrn":"527612892256",
   "purpose":"AAAAfasfsfsfAAAAfasAA",
   "comment":"AAAAfasfsfsfAAAAf",
   "coinAmount":100,
   "merchantId":"137d9304-0368-11ed-b939-0242ac120002",
   "operationId":"17594944974293A5xR2LzpAQ",
   "ecomOperationId":"9ee1923c-11ce-4ac2-9917-899d499ff3d8",
   "status":"SUCCESS",
   "transactionType":196,
   "merchantRequestId":"e582be0c-aa5c-4991-95a3-ff3d5f53a1c6",
   "transactionCurrency":"980",
   "creationDateTime":"2025.10.03 15:28:17.399",
   "modificationDateTime":"2025.10.03 15:28:17.399",
   "transactionResponseInfo":{
      "actionCode":"0",
      "responseCode":"00",
      "description":"Операція успішна"
   },
   "productType":"PURCHASE",
   "notificationUrl":"https://webhook.site/95b1ded7-b86f-46cb-a771-c70f1f913d57",
   "paymentServiceType":"CARD",
   "notificationEncryption":false,
   "processingTerminalId":"AE001001",
   "processingMerchantId":"AE001001",
   "creatorSystem":"H2H",
   "rrnPreauth":"527612892256",
   "preauthOperationId":"17594943825392XRyx8EeK6e",
   "preauthCoinAmount":100,
   "preauthEcomOperationId":"f1a166ce-a19e-46e2-bd7c-2dc90acd1041"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.merchant.alb.ua/en/payment-methods-h2h/preauthorization-and-completion/completion-request-finalization-of-preauth.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
