Skip to main content

Pagination

Retrieving multiple objects at the same time can be convenient, as it ensures less bandwidth and higher performance. However, too many objects can also be a burden on performance, both on client application and Dibsy API. Therefore, the maximum number of objects allowed is capped at 250.

Furthermore, the response is divided into pages of objects, for your application to navigate through, without sacrificing performance.

FieldTypeData description
countintegerThe number of objects returned on a single response in the _embedded object. If this number is not specified, the maximum of 20 objects are returned. The maximum value is 250.
_embeddedintegerThe queried data.
_linksobjectConsists of links to help you navigate your data. Each object will contain a link and a type field.
_links[self]objectURL to the current set of objects.
_links[previous]objectURL to the previous set of objects.
_links[next]objectURL to the next set of objects.
_links[documentation]objectURL to the documentation page for the current endpoint.

Request

curl -X GET https://api.dibsy.one/v2/payments?limit=10&from=pt_dijsn0uuZMAclEuIGd \
-H "Authorization: Bearer sk_live_42069ce69ea8686921f128be69d65ddf9706"

Response

HTTP/1.1 200 OK
Content-Type: application/hal+json

{
"count": 10,
"_embedded": {
"payments": [
{
"id": "pt_dijsn0uuZMAclEuIGd",
"resource": "payment",
"mode": "live",
"amount": {
"value": "20.00",
"currency": "QAR"
},
"amountNet": {
"value": "18.42",
"currency": "QAR"
},
"amountRemaining": {
"value": "20.00",
"currency": "QAR"
},
"description": "Order #1236",
"method": "creditcard",
"redirectUrl": "https://example.org/order/12345",
"webhookUrl": "https://webhook.site/19baf9c3-856f-461e-91f7-e02a7bc0501f",
"status": "succeeded",
"organizationId": "300000",
"sequenceType": "recurring",
"metadata": {
"order_id": "12345"
},
"details": {
"cardCountryCode": "GB",
"cardHolder": "23",
"cardLabel": "Visa",
"cardNumber": "4242 42XX XXXX 4242"
},
"createdAt": "2021-12-26T21:13:21.523",
"expiresAt": "2021-12-26T21:28:21.446",
"customerId": "ct_jNjHWvlEiFdyKIfYLl",
"paidAt": "2021-12-26T21:13:24.611",
"_links": {
"self": {
"href": "http://api.dibsy.one/v2/payments/pt_dijsn0uuZMAclEuIGd",
"type": "application/hal+json"
},
"dashboard": {
"href": "https://dashboard.dibsy.one/payments/pt_dijsn0uuZMAclEuIGd",
"type": "text/html"
},
"documentation": {
"href": "https://api.dibsy.dev/#operation/Get%20Payment",
"type": "text/html"
}
}
},
{},
{},
...
]
},
"_links": {
"documentation": {
"href": "https://api.dibsy.dev/#operation/List%20Payments",
"type": "text/html"
},
"previous": {
"href": "http://api.dibsy.one/v2/payments?limit=10&from=pt_lceEZvPz2cHyLjlLPO",
"type": "application/hal+json"
},
"self": {
"href": "http://api.dibsy.one/v2/payments?limit=10&from=pt_Y17jvET2e8LVpNbb4e",
"type": "application/hal+json"
},
"next": {
"href": "http://api.dibsy.one/v2/payments?limit=10&from=pt_PJ8mNJHoTzeROCGGSZ",
"type": "application/hal+json"
}
}
}