Pagination
All list endpoints use cursor-based pagination. Cursors are opaque strings — don’t try to parse them. They remain stable even if the underlying data changes.
Query parameters
Example
curl "https://api.vaultspay.ae/v1/accounts?limit=10" \
-H "Authorization: Bearer sk_test_yourApiKeyHere"200 OK
{
"object": "list",
"data": [ { "id": "acc_01...", ... }, { "id": "acc_02...", ... } ],
"has_more": true,
"next_cursor": "acc_02HZTPT..."
}To fetch the next page:
curl "https://api.vaultspay.ae/v1/accounts?limit=10&cursor=acc_02HZTPT..." \
-H "Authorization: Bearer sk_test_yourApiKeyHere"Iterating all pages
async function listAllAccounts() {
let cursor = undefined
const all = []
do {
const url = new URL('https://api.vaultspay.ae/v1/accounts')
url.searchParams.set('limit', '100')
if (cursor) url.searchParams.set('cursor', cursor)
const res = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.VAULTSPAY_KEY}` }
})
const page = await res.json()
all.push(...page.data)
cursor = page.has_more ? page.next_cursor : undefined
} while (cursor)
return all
}