Qora by Laayo
Get API keys

Retrieving payments

Read a single payment, or page through them with a cursor.

Retrieve one

bash
curl https://qora.laayo.com.np/v1/payments/pay_7Fh2kQ9mXwRt3vNbLp6sDc \
  -H "Authorization: Bearer sk_test_YOUR_KEY"

Returns the full payment object. A payment belonging to another merchant, or to the other mode, returns 404.

List payments

bash
curl -G https://qora.laayo.com.np/v1/payments \
  -H "Authorization: Bearer sk_test_YOUR_KEY" \
  -d limit=25 \
  -d status=succeeded
ParameterDescription
limit1–100. Defaults to 25.
starting_afterA payment ID. Returns the page after it.
statusFilter by status.
referenceExact match on your own reference.
json
{
  "object": "list",
  "url": "/v1/payments",
  "has_more": true,
  "next_cursor": "pay_2bXk9LmQwErTy7UiOp3AsD",
  "data": [ { "id": "pay_...", "object": "payment", "…": "…" } ]
}

Paging correctly

Pagination is cursor-based, not offset-based. Payments arrive constantly, so with ?page=2 a new payment shifts every row down and you re-read one you already processed. A cursor is anchored to a specific row, so that cannot happen.

Walking every page
$cursor = class="tok-key">null;

do {
    $query = ['limit' => class="tok-num">100];

    class="tok-key">if ($cursor) {
        $query['starting_after'] = $cursor;
    }

    $page = $api->get('/v1/payments', $query);

    class="tok-key">foreach ($page['data'] class="tok-key">as $payment) {
        process($payment);
    }

    $cursor = $page['next_cursor'];
} while($page['has_more']);

Results are newest-first. To reconcile a day's takings, page until created_at passes the start of your window and then stop.

Cancel a payment

bash
curl -X POST https://qora.laayo.com.np/v1/payments/pay_7Fh2.../cancel \
  -H "Authorization: Bearer sk_test_YOUR_KEY"

Cancelling makes the QR unusable. A payment that already succeeded returns 409 — Qora does not hold the funds, so there is nothing to reverse from here. Refunds are handled between you and your bank.

Events

GET /v1/events pages the same way and returns everything Qora recorded, whether or not a webhook endpoint existed at the time. It is the audit trail to reconcile against if your receiver was down.