Customer portals

Short-lived links where a customer can view, download and pay their invoices.

See the customer portal guide for what payers see.

The customer portal object

idstring
Prefixed cprt_.
customerstring
urlstring
The link to share, on checkout.borga.is.
statusenum
active, expired, revoked or consumed.
reusableboolean
expires_attimestamp
revoked_attimestamp | null
last_accessed_attimestamp | null
metadataobject
created_attimestamp
POST/v1/customer_portalsSecret key

Body

customerstringrequired
expires_inintegerdefault: 3600
Seconds, 60 to 86400.
reusablebooleandefault: true
false for a single-use link.
metadataobject
Node.jsts
const portal = await borga.customerPortals.create({
  customer: "cus_8Jk2Lm4Np6Qr8St0Uv2Wx4Yz",
  expires_in: 3600, // seconds; up to 24 hours
  reusable: true,
});

// Link or email portal.url to the customer.
console.log(portal.url); // https://checkout.borga.is/portal/cprt_…
Response
{
  "id": "cprt_2Wx4Yz6Ab8Cd0Ef2Gh4Ij6Kl",
  "customer": "cus_8Jk2Lm4Np6Qr8St0Uv2Wx4Yz",
  "url": "https://checkout.borga.is/portal/cprt_2Wx4Yz6Ab8Cd0Ef2Gh4Ij6Kl",
  "reusable": true,
  "status": "active",
  "expires_at": "2026-09-07T13:00:00.000Z",
  "revoked_at": null,
  "last_accessed_at": null,
  "metadata": {},
  "created_at": "2026-09-07T12:00:00.000Z"
}
GET/v1/customer_portals/:idSecret key
GET/v1/customer_portalsSecret key

Returns up to limit links without a cursor.

Query parameters

customerstring
limitintegerdefault: 25
Up to 100.
DELETE/v1/customer_portals/:idSecret key

The link stops working immediately. Revoking an already revoked link is a no-op.