Skip to content

Decline a request to pay by invoice

POST
/billing/admin/orgs/{orgId}/invoice-requests/{requestId}/decline
curl --request POST \
--url https://api.sloose.com/billing/admin/orgs/org_9f3c/invoice-requests/ir_9f3c/decline \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "reason": "example" }'

Backoffice route: a staff session, or ADMIN_TOKEN; never a customer’s session. Closes the org’s open request without billing it by invoice; the org may ask again. The reason is the staff record’s (org.invoice_request.decline), never the request’s, and nobody is mailed — tell the customer yourself.

orgId
required

The org id.

string
Example
org_9f3c

The org id.

requestId
required

The request.

string
Example
ir_9f3c

The request.

Media typeapplication/json
object
reason
string
key
additional properties
Examplegenerated
{
"reason": "example"
}

Declined.

Media typeapplication/json
object
request
required
object
id
required
string
status
required
string
Allowed values: open billed declined
billingEntity
required
string
country
required
string
taxId
required
string | null
poNumber
required
string | null
currency
required
string
createdAt
required
string
decidedAt
required
string | null
Example
{
"request": {
"status": "open"
}
}

No reason given.

Media typeapplication/json
object
error
required
string
key
additional properties
Examplegenerated
{
"error": "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"
}

No such request open on this org.

Media typeapplication/json
object
error
required
string
key
additional properties
Examplegenerated
{
"error": "example"
}

Report a problem with this page