Billing

List bills#

GET /api/organizations/{organization_id}/bills

Your MilkStraw AI bills, newest first.

Parameters

NameInTypeDescription
organization_idpathstring (uuid)The organization's ID, from the organizations list. Required.

Response

  • bills (array of objects): The matching bills.

    • id (string (uuid)): The bill's ID.
    • created_at (string (date-time)): When the bill was issued.
    • savings_amount (number): The savings the bill charges a fee on, in USD.
    • fee_amount (number): MilkStraw AI's fee, in USD.
    • status (string): Where the bill is in payment. One of pending_admin_review, admin_approved, processed, failed, action_required.
    • receipt_url (string or null): The Stripe receipt, once there's one.
    • invoice_available (boolean): Whether the invoice PDF can be downloaded.

Errors: 401, 403, 404, 429. See errors.

Get a bill#

GET /api/organizations/{organization_id}/bills/{bill_id}

One bill, with the commitments behind its savings.

Parameters

NameInTypeDescription
organization_idpathstring (uuid)The organization's ID, from the organizations list. Required.
bill_idpathstring (uuid)The bill's ID. Required.

Response

  • bill (object): The bill.

    • id (string (uuid)): The bill's ID.
    • created_at (string (date-time)): When the bill was issued.
    • savings_amount (number): The savings the bill charges a fee on, in USD.
    • fee_amount (number): MilkStraw AI's fee, in USD.
    • status (string): Where the bill is in payment. One of pending_admin_review, admin_approved, processed, failed, action_required.
    • receipt_url (string or null): The Stripe receipt, once there's one.
    • invoice_available (boolean): Whether the invoice PDF can be downloaded.
    • data (object): The commitments behind the savings, line by line.

Errors: 401, 403, 404, 429. See errors.

Download an invoice#

GET /api/organizations/{organization_id}/bills/{bill_id}/invoice

The bill's invoice as a PDF. A bill without an invoice yet returns 404.

Parameters

NameInTypeDescription
organization_idpathstring (uuid)The organization's ID, from the organizations list. Required.
bill_idpathstring (uuid)The bill's ID. Required.

Response

The invoice, as application/pdf.

Errors: 401, 403, 404, 429. See errors.