Organization API: Billing & Payouts: Staff
The 12 Organization API operations for staff.
Part of Billing & Payouts.
GET /api/v1/orgs/{org_slug}/staff/invoices
| Name |
In |
Type |
Required |
Description |
org_slug |
path |
string |
yes |
|
q |
query |
string or null |
no |
|
customer_id |
query |
integer or null |
no |
|
status_filter |
query |
string or null |
no |
|
audience |
query |
string or null |
no |
|
limit |
query |
integer |
no |
Default: 50. |
offset |
query |
integer |
no |
Default: 0. |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
POST /api/v1/orgs/{org_slug}/staff/invoices
Raise a one-line invoice by hand: a setup fee, an add-on, a correction.
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
application/json (required)
| Field |
Type |
Required |
customer_id |
integer |
yes |
description |
string |
yes |
amount |
number or string |
yes |
tax |
number or string |
no |
currency |
string or null |
no |
due_days |
integer |
no |
notes |
string or null |
no |
service_id |
integer or null |
no |
send_email |
boolean |
no |
| Status |
Meaning |
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |
GET /api/v1/orgs/{org_slug}/staff/invoices/export.csv
Every invoice in the window, as a CSV.
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
status |
query |
string or null |
no |
since |
query |
string (date) or null |
no |
until |
query |
string (date) or null |
no |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
GET /api/v1/orgs/{org_slug}/staff/invoices/stats
| Name |
In |
Type |
Required |
org_slug |
path |
string |
yes |
audience |
query |
string or null |
no |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
GET /api/v1/orgs/{org_slug}/staff/invoices/{invoice_id}
| Name |
In |
Type |
Required |
invoice_id |
path |
integer |
yes |
org_slug |
path |
string |
yes |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
PATCH /api/v1/orgs/{org_slug}/staff/invoices/{invoice_id}
| Name |
In |
Type |
Required |
invoice_id |
path |
integer |
yes |
org_slug |
path |
string |
yes |
application/json (required)
| Field |
Type |
Required |
notes |
string or null |
no |
due_date |
string (date) or null |
no |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
POST /api/v1/orgs/{org_slug}/staff/invoices/{invoice_id}/cancel
Close an invoice nobody should pay. A paid one is refunded, not cancelled.
| Name |
In |
Type |
Required |
invoice_id |
path |
integer |
yes |
org_slug |
path |
string |
yes |
application/json
| Field |
Type |
Required |
reason |
string or null |
no |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
POST /api/v1/orgs/{org_slug}/staff/invoices/{invoice_id}/charge
Charge the customer's saved method for an unpaid invoice now, the way
the dunning job would on its next attempt. Skipped, not forced, when the
customer has turned auto-pay off or a payment is still settling.
| Name |
In |
Type |
Required |
invoice_id |
path |
integer |
yes |
org_slug |
path |
string |
yes |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
POST /api/v1/orgs/{org_slug}/staff/invoices/{invoice_id}/mark-paid
| Name |
In |
Type |
Required |
invoice_id |
path |
integer |
yes |
org_slug |
path |
string |
yes |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
GET /api/v1/orgs/{org_slug}/staff/invoices/{invoice_id}/pdf
The same document the customer downloads from their portal.
| Name |
In |
Type |
Required |
invoice_id |
path |
integer |
yes |
org_slug |
path |
string |
yes |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
POST /api/v1/orgs/{org_slug}/staff/invoices/{invoice_id}/refund
Refund a paid invoice on staff's own decision (a goodwill gesture, a
duplicate charge, a mistake), in full or in part, to the payment method
or the wallet. Recorded as a refund request staff opened and approved, so
the ledger, the invoice, the service and the audit log move exactly as
they do for a request the customer made.
| Name |
In |
Type |
Required |
invoice_id |
path |
integer |
yes |
org_slug |
path |
string |
yes |
application/json (required)
| Field |
Type |
Required |
amount |
number or string |
yes |
reason |
string |
yes |
to |
string |
no |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
POST /api/v1/orgs/{org_slug}/staff/invoices/{invoice_id}/send
Send the invoice email again: the issued one for an open invoice, the
overdue one once it is past due. Nothing about the invoice changes.
| Name |
In |
Type |
Required |
invoice_id |
path |
integer |
yes |
org_slug |
path |
string |
yes |
| Status |
Meaning |
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |