Skip to content
Try For Free
Bizstim
Free tools
Pricing Contact Log in
Try For Free Book Demo
Home / API Reference / Payments
Resource

Payments

Money received from clients (the revenues ledger), credits included.

The payment object

Every payment record carries these fields in this order, after object, which is always "payment".

FieldTypeDescription
idinteger
client_idintegerThe client (see Clients).
revenue_amountdecimalIn the account currency, 2 decimals. Negative for a debit; may be 0.00 on a package payment.
revenue_datestring, up to 15 charactersThe day the money was received, YYYY-MM-DD.
revenue_creditinteger0 = regular payment, 1 = credit, 2 = debit, 3 = package payment.
revenue_sourcestring, up to 255 charactersHow the money was received: credit_card, cash, check, crypto, direct_debit, other, or one of the account's own sources. A credit or a debit is created with other.
revenue_notetext
package_idintegerThe package this payment bought (see Packages); 0 when it bought none.

Example

{
    "object": "payment",
    "id": 42,
    "client_id": 7,
    "revenue_amount": 25.5,
    "revenue_date": "2026-01-15",
    "revenue_credit": 1,
    "revenue_source": "text",
    "revenue_note": "An example note.",
    "package_id": 7
}

List payments

GET /api/v1/payments

Parameters

ParameterInDescription
limitqueryRecords per page, 1 to 1000 (default 100).
offsetqueryRecords to skip (default 0).
client_idqueryOnly payments of this client.

Returns

A list envelope of payment records (see Pagination).

Request

curl "https://www.bizstim.com/api/v1/payments" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Accept: application/json"

Response

{
    "object": "list",
    "total": 2,
    "limit": 100,
    "offset": 0,
    "has_more": false,
    "data": [
        {
            "object": "payment",
            "id": 42,
            "client_id": 7,
            "revenue_amount": 25.5,
            "revenue_date": "2026-01-15",
            "revenue_credit": 1,
            "revenue_source": "text",
            "revenue_note": "An example note.",
            "package_id": 7
        },
        {
            "object": "payment",
            "id": 43,
            "client_id": 7,
            "revenue_amount": 25.5,
            "revenue_date": "2026-01-15",
            "revenue_credit": 1,
            "revenue_source": "text",
            "revenue_note": "An example note.",
            "package_id": 7
        }
    ]
}

Retrieve a payment

GET /api/v1/payments/{id}

Parameters

ParameterInDescription
idpathThe record's id.

Returns

One payment record, or 404 not_found when no record with that id exists on your account.

Request

curl "https://www.bizstim.com/api/v1/payments/42" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Accept: application/json"

Response

{
    "object": "payment",
    "id": 42,
    "client_id": 7,
    "revenue_amount": 25.5,
    "revenue_date": "2026-01-15",
    "revenue_credit": 1,
    "revenue_source": "text",
    "revenue_note": "An example note.",
    "package_id": 7
}

Record a payment

POST /api/v1/payments

Request body

A JSON object (Content-Type: application/json) with these fields.

FieldTypeRequiredDescription
client_idintegeryesA client of the account, any status (active, inactive or prospect).
revenue_amountnumber, 2 decimalsyesFrom 0.01 to 99999999.99 (a package payment may be 0.00). A debit is stored negative whatever the sign sent; a negative payment or credit is refused.
revenue_datestring, YYYY-MM-DDnoThe day the money was received. Default today, in the account's time zone.
revenue_creditintegernoThe type: 0 payment (default), 1 credit, 2 debit, 3 package payment (only while the account is in package mode; package_id is then required).
revenue_sourcestringnoHow the money was received: credit_card (default), cash, check, crypto, direct_debit, other, or one of the account's own sources (Payments > Sources in the app), spelled as listed there. A credit or a debit is always stored as other.
revenue_notestringnoA note on the payment. HTML is cleaned on save.
package_idintegerwith revenue_credit 3The package bought: an active or secret package of the account (see Packages). Only taken with revenue_credit 3.
send_emailbooleannoE-mail the client a receipt, as the app's add page offers. Default false.
check_unpaid_invoicesbooleannoMark the client's unpaid invoices paid, oldest first, for each one the amount covers, as the app's add page offers. Payments and credits only (revenue_credit 0 or 1). Default false.

Returns

201 with the new payment record. The client's balance is brought up to date, as when a payment is added in the app. 400 invalid_request names the field to fix; 409 conflict when package_id is not an active or secret package of the account.

Request

curl -X POST "https://www.bizstim.com/api/v1/payments" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": 52,
    "revenue_amount": 120.5,
    "revenue_date": "2026-10-11",
    "revenue_source": "cash"
}'

Response (201)

{
    "object": "payment",
    "id": 42,
    "client_id": 7,
    "revenue_amount": 25.5,
    "revenue_date": "2026-01-15",
    "revenue_credit": 1,
    "revenue_source": "text",
    "revenue_note": "An example note.",
    "package_id": 7
}

Update a payment

PATCH /api/v1/payments/{id}

Parameters

ParameterInDescription
idpathThe record's id.

Request body

A JSON object (Content-Type: application/json) with these fields.

FieldTypeRequiredDescription
revenue_amountnumber, 2 decimalsnoAs on create. A debit is stored negative.
revenue_datestring, YYYY-MM-DDnoThe day the money was received.
revenue_creditintegernoThe type: 0 payment, 1 credit, 2 debit, changed among each other outside package mode only.
revenue_sourcestringnoOne of the sources listed on create, or the value the payment already holds. Unlike create, a credit or a debit keeps the source sent.
revenue_notestringnoA note on the payment ("" clears it). HTML is cleaned on save.

Returns

200 with the updated payment record. Fields left out keep their values; the client and the package cannot be changed. A payment taken by card through Stripe takes revenue_date and revenue_note only: a different amount, type or source answers 409 (refund it in the app). In package mode the type cannot be changed, and a package payment can be edited only in package mode (409). 400 invalid_request names the field to fix; 404 not_found.

Request

curl -X PATCH "https://www.bizstim.com/api/v1/payments/42" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "revenue_amount": 95,
    "revenue_note": "Paid at the front desk."
}'

Response

{
    "object": "payment",
    "id": 42,
    "client_id": 7,
    "revenue_amount": 25.5,
    "revenue_date": "2026-01-15",
    "revenue_credit": 1,
    "revenue_source": "text",
    "revenue_note": "An example note.",
    "package_id": 7
}

Delete a payment

DELETE /api/v1/payments/{id}

Parameters

ParameterInDescription
idpathThe record's id.

Returns

200 with {"id", "object": "payment", "deleted": true}; the client's balance is brought up to date. 404 not_found; 409 conflict for a payment taken by card through Stripe (refund it in the app), and for a package payment whose sessions are already used, as in the app.

Request

curl -X DELETE "https://www.bizstim.com/api/v1/payments/42" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Accept: application/json"

Response

{
    "id": 42,
    "object": "payment",
    "deleted": true
}