# Collection Post Request

You can make the payment using any of the URLs below&#x20;

#### Live

```typescript
POST  https://kitegateway.com/v1/collections/request-to-pay
```

**Sandbox**

```
POST  https://sandbox.kitegateway.com/v1/collections/request-to-pay
```

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

#### Request Headers

| Header           | Value                  | Required |
| ---------------- | ---------------------- | -------- |
| **Content-Type** | **`application/json`** | YES      |
| Accept           | **`application/json`** | YES      |
| Authorization    | **`JWT ***`**          | YES      |
| {% endtab %}     |                        |          |

{% tab title="Request" %}

#### Request Body

| Parameter           | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                        | Required                                               |
| ------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| currency            | string | <p>The medium of exchange for goods and services. e.g USD, UGX, KES</p><p>In case the currency is different from the merchant wallet where the money is supposed to go, the funds will be exchanged based on the market rate</p>                                                                                                                                                                                                   | YES                                                    |
| amount              | double | 2 decimal places                                                                                                                                                                                                                                                                                                                                                                                                                   | YES                                                    |
| payment\_method     | string | <p>The means through which the money will be transacted.</p><p><code>MOBILE\_MONEY</code>, <code>CARD</code>, <code>BANK</code>, <code>CRYPTO</code></p>                                                                                                                                                                                                                                                                           | YES                                                    |
| account\_number     | string | The unique identifier on the providers' network where the money will originate from. For mobile money ie if the **payment\_method** is`MOBILE_MONEY`, you should provide an internationally formatted `phone_number` i.e 2567041111111                                                                                                                                                                                             | Not Required for `CARD`                                |
| merchant\_reference | string | The **UNIQUE** Identification for a transaction generated by your merchant application                                                                                                                                                                                                                                                                                                                                             | <p>YES,</p><p><code>UUID4 9 to 36 character</code></p> |
| narration           | string | A brief description of the transaction                                                                                                                                                                                                                                                                                                                                                                                             | required, `9 to 64` characters max                     |
| redirect\_url       | string | <p>When a payment is initiated, sometimes a payment link is returned in the response if the payment must be completed by the customer via the <strong>payment\_url</strong></p><p></p><p>The payment methods that return a payment\_url link include, online banking methods, visa 3d</p><p></p><p>So the redirect\_url is used to redirect the customer after payment has been completed or canceled via the payment\_url<br></p> | Required for `BANK`, `CARD` and `CRYPTO` collections.  |
| account\_name       | string | The name of your customer who is making the payment request                                                                                                                                                                                                                                                                                                                                                                        | Required for CARD                                      |
| account\_email      | string | The email of your customer who is making the request                                                                                                                                                                                                                                                                                                                                                                               | Required for CARD                                      |
| {% endtab %}        |        |                                                                                                                                                                                                                                                                                                                                                                                                                                    |                                                        |

{% tab title="Response" %}

#### &#x20;Response body

| Parameters             | Type    | Description                                                                                                                                                                                                                                                                                            |
| ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| request\_amount        | double  | Amount requested for collection                                                                                                                                                                                                                                                                        |
| request\_currency      | string  | The currency of the requested amount                                                                                                                                                                                                                                                                   |
| account\_amount        | double  | The converted amount from request\_currency to wallet\_currency at market rate.                                                                                                                                                                                                                        |
| account\_currency      | string  | <p>The wallet currency where the amount paid by the customer will be deposited.<br><br>The currency of the amount paid by the customer is determined by the <strong>provider</strong> used to pay.</p>                                                                                                 |
| transaction\_fee       | double  | This is the fee charged based on the paid amount.                                                                                                                                                                                                                                                      |
| total\_credit          | double  | This is the amount less the transaction\_fee deposited in your account wallet                                                                                                                                                                                                                          |
| merchant\_reference    | string  | This is the reference that was specified at the start of the transaction                                                                                                                                                                                                                               |
| kitegateway\_reference | string  | This is the unique id of the transaction on the Kitegateway network. You are advised to store it because it is used to track transaction-related queries.                                                                                                                                              |
| transaction\_status    | string  | The stage of the transaction                                                                                                                                                                                                                                                                           |
| customer\_charged      | boolean | It indicates whether if the merchant customer was charged instead                                                                                                                                                                                                                                      |
| payment\_url           | string  | <p><code>Optional</code> The URL where the customer is redirected to complete the payment.<br><br>It's only returned if the payment has to be completed from a web browser.</p>                                                                                                                        |
| instructions           | string  | <p><code>Optional</code> It contains instructions that advise the customer about what they should next.<br><br>It is always present on mobile money transactions and requests that do not contain <code>payment\_url</code>.<br><br>We recommend that you display the instructions to the customer</p> |
| {% endtab %}           |         |                                                                                                                                                                                                                                                                                                        |

{% tab title="Sample Request" %}

```typescript
{ 
    "currency": "USD", // OR KES or TZS or RWF or USD or EUR ..etc
    "amount": 200,
    "account_number": "256775123123",
    "payment_method": "CARD", // OR CARD or BANK or CRYPTO, 
    "merchant_reference": "Your unique payment reference", 
    "narration": "Reason for payment",
    "redirect_url": "optional.For payments completed via payment_url ",
    "account_name": "Ankunda Ruth",
    "account_email": "ankunda99ruth@gmail.com"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```javascript
{
  "code": 200,
  "status": "accepted",
  "message": "Transaction Initiated",
  "data": {
    "id": "8823887277266266662662662",
    "request_amount": 20000,
    "request_currency": "UGX",
    "account_amount": 20000,
    "account_currency": "UGX",
    "transaction_fee": 3000,
    "total_credit": 15000,
    "merchant_reference": "3CC383-3A673-8392-AF883-99AKJ",
    "kitegateway_reference": "WPC405GZM1G5JXGA71IK",
    "transaction_status": "PENDING",
    "transaction_type": "collection",
    "message": "Transaction started",
    "account_name": "Ankunda Ruth",
    "account_email": "ankunda99ruth@gmail.com",
    "customer_charged": false,
    "payment_url": "Exists if web browser shold be used to complete payments",
    "instructions": [
      {
        "step": "1",
        "description": "Ensure that you have enough money on your Airtel Money account"
      },
      {
        "step": "2",
        "description": "When the USSD screen appears with the specified amount, approve the payment"
      }
    ]
  }
}
```

{% endtab %}

{% tab title="Sample IPN" %}

```javascript
{
    "id": "888237273723723772377232323",
    "request_amount": 20000,
    "request_currency": "UGX",
    "account_amount": 20000,
    "account_currency": "UGX",
    "transaction_fee": 3000,
    "total_credit": 15000,
    "customer_charged": false,
    "merchant_reference": "3CC383-3A673-8392-AF883-99AKJ",
    "kitegateway_reference": "KG405GZM1G5JXGA71IK",
    "transaction_status": "COMPLETED",
    "transaction_type": "collection",
    "message": "Transaction Completed Successfully",
    "account_name": "Ankunda Ruth",
    "account_email": "ankunda99ruth@gmail.com",
    "institution_name": "Optional eg: Aritel Money Uganda"
}
```

{% 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.kitegateway.com/receiving-money/make-payment.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.
