# Payment capture

| API endpoint (POST)                        |
| ------------------------------------------ |
| <https://api.maibmerchants.md/v1/complete> |

### **Request parameters (body)**

<table><thead><tr><th width="177">Parameter</th><th width="113">Required</th><th width="137">Type</th><th>Description</th></tr></thead><tbody><tr><td>payId</td><td>YES</td><td>String</td><td>The identifier of the transaction that has been authorized and must be completed.</td></tr><tr><td>confirmAmount</td><td>NO</td><td><p>Number</p><p>(decimal)</p></td><td><p>Amount to be debited from Customer's bank account. Format: <strong>X.XX</strong></p><p>E.g: <strong>10.25</strong> (currency=USD) means $10 and 25 cents.</p><p></p><p>It can be less than or equal to the amount that was previously put on hold.</p><p>If this parameter is not present, the entire previously put on hold amount will be debited.</p></td></tr></tbody></table>

**Example**

```json
{
"payId": "f16a9006-128a-46bc-8e2a-77a6ee99df75",
"confirmAmount": 10.25
}
```

### **Response parameters**&#x20;

<table><thead><tr><th>Parameter</th><th width="121.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>result</td><td>Object</td><td>Object containing transaction data.</td></tr><tr><td><ul><li>payId</li></ul></td><td>String</td><td>Transaction identifier assigned by <strong>maib ecomm</strong><em><strong>.</strong></em></td></tr><tr><td><ul><li>orderId</li></ul></td><td>String</td><td>Order ID generated by Merchant website/app.</td></tr><tr><td><ul><li>status</li></ul></td><td>String</td><td><p><a href="/pages/MNTSWn43bFYBkPI948Sp#transaction-status">Transaction status</a></p><p>OK - successfully completed.</p></td></tr><tr><td><ul><li>statusCode</li></ul></td><td>String</td><td>Transaction status code</td></tr><tr><td><ul><li>statusMessage</li></ul></td><td>String</td><td>Transaction status information message</td></tr><tr><td><ul><li>rrn</li></ul></td><td>String</td><td>RRN - Transaction ID generated by <strong>maib ecomm</strong>.</td></tr><tr><td><ul><li>approval</li></ul></td><td>String</td><td>Approval Code - The transaction approval code generated by the card issuing bank.</td></tr><tr><td><ul><li>cardNumber</li></ul></td><td>String</td><td>Masked number card.</td></tr><tr><td><ul><li>confirmAmount</li></ul></td><td><p>Number</p><p>(decimal)</p></td><td>Amount debited from Customer's bank account. Format: <strong>X.XX</strong></td></tr><tr><td>ok</td><td>Boolean</td><td><p>Request/transaction processing status:</p><p><em>true</em> - no errors;</p><p><em>false -</em> an error occurred (error details will be in <em>errors</em>);</p></td></tr><tr><td>errors</td><td>Array</td><td>Request/transaction processing errors. <a href="/pages/DCjblsWjWxuRYokUtopZ"><mark style="color:blue;">Errors table</mark></a></td></tr><tr><td><ul><li>errorCode</li></ul></td><td>String</td><td>Error code</td></tr><tr><td><ul><li>errorMessage</li></ul></td><td>String</td><td>Error description</td></tr><tr><td><ul><li>errorArgs</li></ul></td><td>Object</td><td>Object contains parameters with error details</td></tr></tbody></table>

**Example**

{% tabs %}
{% tab title="Successful" %}

```json
{
"result": {
"payId": "f16a9006-128a-46bc-8e2a-77a6ee99df75",
"orderId": "123",
"status": "OK",
"statusCode": "000",
"statusMessage": "Approved",
"confirmAmount": 10.25
},
"ok": true
}
```

{% endtab %}

{% tab title="Error" %}

```json
{
    "errors": [
        {
            "errorCode": "12001",
            "errorMessage": "Parameter 'confirmAmount' is invalid",
            "errorArgs": {
                "parameter": "confirmAmount"
            }
        }
    ],
    "ok": false
}
```

{% endtab %}
{% endtabs %}


---

# 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.maibmerchants.md/e-commerce/two-step-payment/payment-capture.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.
