# Loan Confirmation

## Loan Confirmation

<mark style="color:green;">`POST`</mark> `{{BASE_URL}}/mfi/v1/loans/confirmation`

This endpoint allows you to get free cakes.

#### Headers

| Name           | Type   | Description                                                    |
| -------------- | ------ | -------------------------------------------------------------- |
| Authentication | string | Authentication token to track down who is emptying our stocks. |

#### Request Body

| Name                  | Type    | Description                                  |
| --------------------- | ------- | -------------------------------------------- |
| success               | boolean | Whether the loan has been funded or not      |
| message               | string  | Description of loan status                   |
| loan\_id              | string  | Loan ID gotten from loan application         |
| channel               | string  | Client Name gotten from Pezesha              |
| data                  | object  | Transaction data                             |
| data.trans\_reference | string  | Reference for transaction                    |
| data.trans\_time      | string  | Transaction Time                             |
| data.trans\_amount    | number  | Transaction Amount                           |
| data.wallet\_balance  | number  | New Pezesha Wallet Balance after transaction |

{% tabs %}
{% tab title="200 Loan confirmed successfully" %}

```json
{
   "status":200,
   "response_code":0,
   "error":false,
   "message":"Payment processed successfully"
}
```

{% endtab %}

{% tab title="404 Error confirming loan" %}

```json
{
   "status":400,
   "response_code":0,
   "error":false,
   "message":"Unable to process request"
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
**Loan ID**&#x20;

This is gotten from Loan Application response
{% endhint %}

{% hint style="info" %}
**Loan Confirmation**

You can let Pezesha know whether a loan has been disbursed successfully or not using this callback
{% endhint %}

{% tabs %}
{% tab title="Loan Funded Successfully" %}

```javascript
{
   "status":200,
   "response_code":0,
   "error":false,
   "message":"Payment processed successfully"
}
```

{% endtab %}

{% tab title="Failed To Fund Loan" %}

```javascript
{
   "status":400,
   "response_code":0,
   "error":false,
   "message":"Unable to process request"
}
```

{% 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.pezesha.com/pezesha-wallet/loan-confirmation.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.
