Skip to content
SDK preview. Packages are not publicly published yet — use REST / cURL, or the local development artifacts.

Pagination

List payments page by page with cursors, or let the SDK page for you.

GET /v1/payments returns newest first, one page at a time, using a cursor.

ParameterMeaning
limit1–100, default 20.
starting_afterA payment id: return the payments after it. Use the previous page's next_cursor.
JSON
{ "object": "list", "data": [ … ], "has_more": true, "next_cursor": "9d1f4c3e-…" }

Repeat with starting_after=<next_cursor> until has_more is false. You can combine paging with status, external_id, created_from and created_to.

With the SDK#

One page:

JavaScript
const page = await paytaka.payments.list({ limit: 20 })
console.log(page.data, page.hasMore, page.nextCursor)

Or iterate everything (pages are fetched lazily):

JavaScript
for await (const payment of paytaka.payments.listAutoPaging({ status: "PAID" })) {
  console.log(payment.id)
}