# Get payments for business

<mark style="color:green;">GET</mark>:/v1/payment

#### Params

| Name      | Type    | Description                                       |
| --------- | ------- | ------------------------------------------------- |
| page      | Integer | The page number for paginated results             |
| limit     | Integer | The limit of payments per page                    |
| reference | string  | The payment reference of a particular transaction |
| from      | integer | The timestamp of the starting date                |
| to        | integer | The timestamp of the ending date                  |

#### Response

The response will have a status code of 200 and a content type of application/json. The body of the response will contain an array of payment data, including details such as payment ID, amount, environment, type, method, status, currency, reference, narration, provider transaction ID, customer details, business ID, creation timestamp, and update timestamp. Additionally, the response will include pagination information with details about the current page, total page count, and total pages count.

```
{
    "status": "success",
    "code": 200,
    "message": "success",
    "data": [
        {
            "id": "20a72fd0-a3a3-4c5d-9fea-e3a7e02b26a5",
            "amount": 1,
            "environment": "test",
            "type": "payment",
            "method": "mobilemoney",
            "status": "pending",
            "currency": "ZMW",
            "reference": "PY_c77f7bff21514bdf9dfe9f1b2",
            "narration": "",
            "provider_transaction_id": "",
            "customer_details": "00000000-0000-0000-0000-000000000000",
            "business_id": "8f212284-3a4d-4c2d-ad27-d0e8703c89cf",
            "created_at": "2024-08-21T12:38:56.704592Z",
            "updated_at": "2024-08-21T12:38:56.704592Z"
        },
        {
            "id": "b05d7e8a-deea-44fd-bc0a-ca6e467c368b",
            "amount": 1,
            "environment": "test",
            "type": "payment",
            "method": "mobilemoney",
            "status": "pending",
            "currency": "ZMW",
            "reference": "PY_6bfb1ddf065d40ebb26e57d7b",
            "narration": "",
            "provider_transaction_id": "",
            "customer_details": "00000000-0000-0000-0000-000000000000",
            "business_id": "8f212284-3a4d-4c2d-ad27-d0e8703c89cf",
            "created_at": "2024-08-21T10:54:11.119607Z",
            "updated_at": "2024-08-21T10:54:11.119607Z"
        }
         ],
    "pagination": [
        {
            "current_page": 1,
            "page_count": 3,
            "total_pages_count": 2
        }
    ]
}
```


---

# 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://developer.redstonepgs.com/api-documentation/payments/get-payments-for-business.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.
