Get Payment Agreements
GEThttps://api.cleverhub.co/api/v1/pay_to/payment_agreement/search
Retrieve a paginated list of payment agreements within a specified time range. This endpoint enables merchants to query and filter payment agreements based on date parameters, allowing for efficient management and monitoring of agreement records over a specified period.
The query supports pagination, making it possible to navigate through large datasets by specifying the page number and the number of records per page.
Request
Query Parameters
The start date for querying payment agreements. Accepted formats are 'DD/MM/YY' or 'YYYY-MM-DDThh:mm:ss'. This date-time is in UTC.
The end date for querying payment agreements. Accepted formats are 'DD/MM/YY' or 'YYYY-MM-DDThh:mm:ss'. This date-time is in UTC.
The page number to retrieve. Each page contains a subset of results based on the specified size
parameter.
The number of records to return per page. This allows you to control the volume of data returned in each response, aiding in efficient data management.
Responses
- 200
- 400
- 401
- 422
Request processed successfully.
- application/json
- Schema
- Example (auto)
Schema
The start date of the queried payment agreements, as specified in the request.
2022-01-01T00:00:00
The end date of the queried payment agreements, as specified in the request.
2022-12-01T00:00:00
The current page number of the returned results.
1
The number of records per page as specified in the query.
20
The page number for the next set of results, if available.
2
The total number of pages available based on the query parameters.
5
The total number of payment agreement records available within the specified date range.
100
records object[]
{
"from_date": "2022-01-01T00:00:00",
"to_date": "2022-12-01T00:00:00",
"page": 1,
"size": 20,
"next_page": 2,
"total_page": 5,
"total_count": 100,
"records": [
{
"id": 12345,
"payment_agreement_id": "agreement-12345",
"client_transaction_id": "client-trans-001",
"limit_amount": 5000,
"description": "Monthly utility bill payment agreement.",
"external_id": "custom-agreement-id-7890",
"status": "active",
"created_at": "2024-01-01T00:00:00Z",
"payment_agreement_type": "UTILITY",
"agreement_details": {
"variable_agreement_details_obj": {
"start_date": "15/07/24",
"frequency": "MONTHLY"
}
},
"payer_details": {
"name": "Jane Doe",
"bank_account_details": {
"bsb": "123456",
"account_number": "987654321"
},
"pay_id_details": {
"pay_id": "payer@payid.com",
"pay_id_type": "EMAIL"
}
},
"payment_agreement_notification": {
"endpoint_url": "https://merchant.com/payment_callback",
"authorization_header": "Bearer your_token"
}
}
]
}
Bad Request
Unauthorized
Unprocessable Entity
Authorization: app-id
name: app-idtype: apiKeyin: headerdescription: A unique identifier assigned to each application.
name: secret-keytype: apiKeyin: headerdescription: A secure token associated with the `app-id`.
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.cleverhub.co/api/v1/pay_to/payment_agreement/search");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("app-id", "<app-id>");
request.Headers.Add("secret-key", "<app-id>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());