Skip to content
شعار البي شعار البي El-BDevelopers

Getting started

Pagination and filters

Lists are newest first and read page by page with a cursor, so a payment created while you read never shifts the pages.

Pages

Ask for up to 100 items with per_page (25 by default). Each answer holds meta.next_cursor: send it back as cursor for the next page, or follow links.next. It is null on the last page.

{
    "data": [
        "…"
    ],
    "links": {
        "first": null,
        "last": null,
        "prev": null,
        "next": "https://el-b.com/api/v1/payments?per_page=25&cursor=eyJpZCI6MTA0Mn0"
    },
    "meta": {
        "path": "https://el-b.com/api/v1/payments",
        "per_page": 25,
        "next_cursor": "eyJpZCI6MTA0Mn0",
        "prev_cursor": null
    }
}

Reading everything

use Illuminate\Support\Facades\Http;

$cursor = null;

do {
    $page = Http::withToken(env('ELB_API_KEY'))->acceptJson()
        ->get('https://el-b.com/api/v1/payments', array_filter([
            'status' => ['finalized'],
            'per_page' => 100,
            'cursor' => $cursor,
        ]))
        ->throw()
        ->json();

    foreach ($page['data'] as $payment) {
        // ...
    }

    $cursor = $page['meta']['next_cursor'];
} while ($cursor !== null);

Filters

GET /payments takes status[] (repeat it for several statuses), reference_number, created_after and created_before. Filters combine, and the cursor keeps them. See List payments.

Dates

Dates are ISO 8601 with their offset, in Algiers time: 2026-11-02T10:12:03+01:00. Filters accept any ISO 8601 date or date-time.