Make your first call
Every request goes to https://api.paieday.com/v1 and sends your key as a bearer token.
1. Ask for your companies
Section titled “1. Ask for your companies”curl https://api.paieday.com/v1/companies \ -H "Authorization: Bearer $PAIE_API_KEY"const res = await fetch("https://api.paieday.com/v1/companies", { headers: { Authorization: `Bearer ${process.env.PAIE_API_KEY}` },});const body = await res.json();if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);const companies = body.data;import os, requests
res = requests.get( "https://api.paieday.com/v1/companies", headers={"Authorization": f"Bearer {os.environ['PAIE_API_KEY']}"},)body = res.json()res.raise_for_status()companies = body["data"]2. Read the answer
Section titled “2. Read the answer”Lists come back as data with a nextCursor. Money is exact decimal text with its currency, never a floating point number.
{ "data": [ { "id": "cmp_Xq2b9Lr0aKsT", "name": "Blue Mahoe Trading Ltd", "trn": "•••-•••-412", "nisNumber": "1234567", "currency": "JMD", "address": { "line1": "1 Harbour Street", "line2": null, "city": "Kingston", "region": null, "postalCode": null, "country": "JM" } } ], "nextCursor": null}3. Next steps
Section titled “3. Next steps”- Page through long lists with
cursor: see Lists and pages. - Switch on
error.codewhen something is refused: see Errors. - Every endpoint is in the API reference.