Skip to content

An org’s invoices waiting for a transfer

GET
/billing/admin/orgs/{orgId}/invoices
curl --request GET \
--url https://api.sloose.com/billing/admin/orgs/org_9f3c/invoices \
--header 'Authorization: Bearer <token>'

Backoffice route: a staff session, or ADMIN_TOKEN; never a customer’s session. The org’s open invoices billed by invoice, newest first, as Stripe has them: what each still owes, and when it is due. Empty for an org Stripe does not know.

orgId
required

The org id.

string
Example
org_9f3c

The org id.

The open invoices.

Media typeapplication/json
object
invoices
required
Array<object>
object
id
required
string
number
required
string | null
amountRemaining
required

What is still owed, in cents.

number
total
required

The invoice’s total, tax included, in cents.

number
currency
required
string
dueDate
required
string | null
created
required
string
hostedInvoiceUrl
required
string | null
Examplegenerated
{
"invoices": [
{
"id": "example",
"number": "example",
"amountRemaining": 1,
"total": 1,
"currency": "example",
"dueDate": "example",
"created": "example",
"hostedInvoiceUrl": "example"
}
]
}

A bearer that is neither the token nor a live session (code: AUTH_REQUIRED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

A customer’s session, an API token, or no bearer at all — not staff, and not the ADMIN_TOKEN (code: ADMIN_REQUIRED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

Stripe refused the request (PAYMENT_PROVIDER_REFUSED) — nothing was charged, though a step taken before the refusal stands: the org’s first Stripe customer, or an existing customer’s billing email brought up to date — or was unavailable (PAYMENT_PROVIDER_UNAVAILABLE: unreachable, failing or rate-limiting), which may or may not have gone through — check before retrying. Stripe’s own words are logged, not returned.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed values: PAYMENT_PROVIDER_REFUSED PAYMENT_PROVIDER_UNAVAILABLE
key
additional properties
Example
{
"code": "PAYMENT_PROVIDER_REFUSED"
}

Report a problem with this page