Skip to content

Payments

What was paid, how, and what is still owed. Recording and refunding are API-key scopes or approved actions, never a connected assistant on its own.

payments

List

GET/v1/payments

List payments, newest first.

Scope
payments:read
Effect
Read only
MCP tool
list_payments
Retries
Safe to repeat

Parameters

List parameters
NameInTypeNotes
limitoptionalqueryintegermin 1 · max 50
cursoroptionalquerystringup to 256 chars
invoiceIdoptionalqueryid—
statusoptionalqueryenumOne of pending, processing, authorized, succeeded, declined, failed, voided, refunded, returned
methodoptionalqueryenumOne of card, ach, cash, check, bankTransfer, other
clientIdoptionalqueryid—
businessIdoptionalqueryid—
qoptionalquerystringup to 80 chars
settledoptionalqueryenumOne of settled, pending
dayoptionalquerystringmatches ^\d{4}-\d{2}-\d{2}$
includeAuthorizationoptionalqueryboolean—

Returns

data: Payment[]. Pass meta.cursor back as cursor for the next page.

Example requestSample
curl -X GET "https://api.billingmart.com/v1/payments" \
  -H "Authorization: Bearer $BILLINGMART_API_KEY"

payments

Get

GET/v1/payments/{paymentId}

One payment.

Scope
payments:read
Effect
Read only
MCP tool
get_payment
Retries
Safe to repeat

Parameters

Get parameters
NameInTypeNotes
paymentIdrequiredpathid—
includeAuthorizationoptionalqueryboolean—

Returns

data: Payment

Example requestSample
curl -X GET "https://api.billingmart.com/v1/payments/{paymentId}" \
  -H "Authorization: Bearer $BILLINGMART_API_KEY"

payments

Receipt pdf

GET/v1/payments/{paymentId}/receipt-pdf

Render (or reuse) the receipt PDF for a succeeded payment and return a short-lived signed URL.

Scope
payments:read
Effect
Read only
MCP tool
get_receipt_pdf
Retries
Safe to repeat

Parameters

Receipt pdf parameters
NameInTypeNotes
paymentIdrequiredpathid—

Returns

data: PdfPreview

Example requestSample
curl -X GET "https://api.billingmart.com/v1/payments/{paymentId}/receipt-pdf" \
  -H "Authorization: Bearer $BILLINGMART_API_KEY"

payments

Notes

GET/v1/payments/{paymentId}/notes

The internal notes on one payment, newest first.

Scope
payments:read
Effect
Read only
MCP tool
list_payment_notes
Retries
Safe to repeat

Parameters

Notes parameters
NameInTypeNotes
paymentIdrequiredpathid—
limitoptionalqueryintegermin 1 · max 50
cursoroptionalquerystringup to 256 chars

Returns

data: PaymentNote[]. Pass meta.cursor back as cursor for the next page.

Example requestSample
curl -X GET "https://api.billingmart.com/v1/payments/{paymentId}/notes" \
  -H "Authorization: Bearer $BILLINGMART_API_KEY"

payments

Notes

POST/v1/payments/{paymentId}/notes

Add an internal note to a payment (plain text, at most 2,000 characters). Append-only: a note is never edited or deleted, never shown to the customer, and never moves money.

Scope
payments:notes
Effect
Writes a draft or record
MCP tool
add_payment_note
Retries
Send an Idempotency-Key; a repeat replays the stored answer for 24 hours

Parameters

Notes parameters
NameInTypeNotes
paymentIdrequiredpathid—

Request body

JSON. Money is an integer count of minor units beside its currency; quantities are thousandths.

Notes request body
FieldTypeNotes
textrequiredstringup to 2000 chars

Returns

data: object

Example requestSample
curl -X POST "https://api.billingmart.com/v1/payments/{paymentId}/notes" \
  -H "Authorization: Bearer $BILLINGMART_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"text":"<text>"}'

payments

Record

POST/v1/invoices/{invoiceId}/payments

Record a payment taken OUTSIDE the gateway (cash, check, bank transfer) against an open invoice. Idempotent on method + reference + amount.

Scope
payments:record
Effect
Writes a draft or record
MCP tool
None — REST and API keys only
Retries
Send an Idempotency-Key; a repeat replays the stored answer for 24 hours

Parameters

Record parameters
NameInTypeNotes
invoiceIdrequiredpathid—

Request body

JSON. Money is an integer count of minor units beside its currency; quantities are thousandths.

Record request body
FieldTypeNotes
methodrequiredenumOne of cash, check, bankTransfer, other
referencerequiredstringup to 128 chars
amountrequiredobject—
amount.minorUnitsrequiredinteger—
amount.currencyrequiredCurrency—
receivedOnoptionalstringmatches ^\d{4}-\d{2}-\d{2}$
sendReceiptoptionalboolean—

Returns

data: object

Example requestSample
curl -X POST "https://api.billingmart.com/v1/invoices/{invoiceId}/payments" \
  -H "Authorization: Bearer $BILLINGMART_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"method":"cash","reference":"<reference>","amount":{"minorUnits":0,"currency":"USD"}}'

payments

Refund

POST/v1/payments/{paymentId}/refund

Refund a succeeded payment, in full or in part. `idempotencyKey` is required: a retried refund must never become two.

Scope
payments:refund
Effect
Writes a draft or record
MCP tool
None — REST and API keys only
Retries
Send an Idempotency-Key; a repeat replays the stored answer for 24 hours

Parameters

Refund parameters
NameInTypeNotes
paymentIdrequiredpathid—

Request body

JSON. Money is an integer count of minor units beside its currency; quantities are thousandths.

Refund request body
FieldTypeNotes
amountoptionalobject—
amount.minorUnitsrequiredinteger—
amount.currencyrequiredCurrency—
reasonrequiredstringup to 500 chars
idempotencyKeyrequiredstringat least 8 chars · up to 128 chars

Returns

data: object

Example requestSample
curl -X POST "https://api.billingmart.com/v1/payments/{paymentId}/refund" \
  -H "Authorization: Bearer $BILLINGMART_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"amount":{"minorUnits":0,"currency":"USD"},"reason":"<reason>","idempotencyKey":"<idempotencyKey>"}'

payment methods

List

GET/v1/clients/{clientId}/payment-methods

A client’s saved payment methods as HANDLES: id, card or bank, last four, card type, expiry, label, whether it is usable. Never a vault id.

Scope
payments:read
Effect
Read only
MCP tool
list_payment_methods
Retries
Safe to repeat

Parameters

List parameters
NameInTypeNotes
clientIdrequiredpathid—

Returns

data: SavedPaymentMethod[]. Pass meta.cursor back as cursor for the next page.

Example requestSample
curl -X GET "https://api.billingmart.com/v1/clients/{clientId}/payment-methods" \
  -H "Authorization: Bearer $BILLINGMART_API_KEY"

merchant applications

List

GET/v1/admin/merchant-applications

List the workspace’s merchant account applications: status, business name, dates, and the Producer ID once approved. Nothing the application carried.

Scope
admin:read
Effect
Read only
MCP tool
list_merchant_applications
Retries
Safe to repeat

Parameters

List parameters
NameInTypeNotes
limitoptionalqueryintegermin 1 · max 50
cursoroptionalquerystringup to 256 chars

Returns

data: MerchantApplicationSummary[]. Pass meta.cursor back as cursor for the next page.

Example requestSample
curl -X GET "https://api.billingmart.com/v1/admin/merchant-applications" \
  -H "Authorization: Bearer $BILLINGMART_API_KEY"

rate requests

List

GET/v1/admin/rate-requests

List the workspace’s merchant rate requests: status, business name, dates, and the proposed rates once quoted.

Scope
admin:read
Effect
Read only
MCP tool
list_rate_requests
Retries
Safe to repeat

Parameters

List parameters
NameInTypeNotes
limitoptionalqueryintegermin 1 · max 50
cursoroptionalquerystringup to 256 chars

Returns

data: RateRequestSummary[]. Pass meta.cursor back as cursor for the next page.

Example requestSample
curl -X GET "https://api.billingmart.com/v1/admin/rate-requests" \
  -H "Authorization: Bearer $BILLINGMART_API_KEY"

merchant accounts

List

GET/v1/admin/merchant-accounts

The workspace’s merchant accounts: each one’s id and label, whether it is the default or archived, whether test and live are set up, whether its self-tests passed, whether live is activated, and whether it charges live or test right now. Use an id as `merchantAccountId` on a draft invoice. Yes-or-no answers and the label only; never a credential, a producer id, a host or a timestamp. Credentials are entered only by a person in the console.

Scope
admin:read
Effect
Read only
MCP tool
list_merchant_accounts
Retries
Safe to repeat

Returns

data: MerchantAccountView[]. Pass meta.cursor back as cursor for the next page.

Example requestSample
curl -X GET "https://api.billingmart.com/v1/admin/merchant-accounts" \
  -H "Authorization: Bearer $BILLINGMART_API_KEY"

gateway status

Get

GET/v1/admin/gateway-status

Whether the payment gateway is set up: booleans only (test and live configured, self-tests passed, live activated). Never a credential, id or host.

Scope
admin:read
Effect
Read only
MCP tool
get_gateway_status
Retries
Safe to repeat

Returns

data: GatewayStatus

Example requestSample
curl -X GET "https://api.billingmart.com/v1/admin/gateway-status" \
  -H "Authorization: Bearer $BILLINGMART_API_KEY"

Object

Payment

One payment attempt and its outcome. THE MOST SECURITY-CONSTRAINED DOCUMENT IN THE CONTRACT. PAN and CVV exist only as local variables inside the charging function and appear NOWHERE in this schema — the only card digits persisted are cardLast4 and cardType.

Payment fields
FieldTypeNotes
idrequiredId—
tenantrequiredTenantRef—
invoiceIdoptionalIdThe invoice this payment settles. OPTIONAL: a payment-link payment has none and names paymentLinkId instead; exactly one of the two is set.
paymentLinkIdoptionalIdThe payment link this payment was taken through, when it settles no invoice.
linkCheckoutIdoptionalstringThe checkout (the payer's seat) the payment was made under.
receiptEmailoptionalstringM2c: where a payment-link payer asked for the receipt. One address, typed by the payer, used for that ONE receipt and nothing else: it grants no portal, client record, verification or marketing.
clientIdoptionalId—
statusrequiredPaymentStatus—
methodrequiredPaymentMethod—
amountrequiredMoneyThe amount applied to the invoice. amountDue`, derived from the stored line items at save and send and moved by each ledger posting), so a payment never applies more than is due.
serviceFeeoptionalMoneyThe pass-through fee the payer paid on top of amount for a card payment, computed once at claim from amount and the workspace's rate (integer, half away from zero) and stored, so a replay or a capture never recomput…
serviceFeeBpsoptionalBasisPointsThe rate serviceFee was computed at.
serviceFeeLabeloptionalServiceFeeLabel—
idempotencyKeyoptionalstringIdentifies one payment ATTEMPT: a retry with the same key replays that attempt and never charges twice. This key plus a time-boxed processing lease are claimed in a transaction before the gateway is touched.
leaseExpiresAtoptionalIsoTimestampThe processing lease. Time-boxed so a crashed attempt cannot wedge an invoice permanently.
gatewayRequestedAtoptionalIsoTimestampStamped the moment before the request leaves for the gateway.
cardLast4optionalstringThe ONLY card digits ever persisted.
cardTypeoptionalstring—
saveMethodRequestedoptionalbooleanThe customer ticked "save this card" on the pay page after reading the consent copy. A request, not a vault: reads it when it tokenises. Never a card number.
achLast4optionalstringLast four of the account number. The routing number is not persisted.
vaultCustomerIdoptionalstringTenant-scoped TranzPay CustomerID. Not a replayable card token.
merchantAccountIdoptionalIdThe merchant account that took this payment, written by the function that called the gateway. A void, refund or ACH return that arrives later goes to this account, never to whichever account is the default now.
gatewayTransactionIdoptionalstring—
initiatedByoptionalChargeInitiatorFor a charge of a SAVED method: who started it. Absent on every other payment and on records older than.
gatewayResponseoptionalGatewayOutcome—
pendingReversaloptionalPendingReversal—
failureReasonoptionalstringHuman-readable, already masked. Never the raw gateway body.
settledAtoptionalIsoTimestampSettlement is POLLED — there are no webhooks.
returnedAtoptionalIsoTimestampAn ACH return, arriving days after the debit. This is what takes an invoice out of paid.
returnCodeoptionalstringThe NACHA return code, e.g. R01.
refundedAmountoptionalMoney—
doubleCreditoptionalDoubleCredit—
disputeoptionalPaymentDisputePR B: the card dispute on this payment, when the customer's bank disputed it. At most one per payment. Written only by the dispute callables (function-written, like the rest of the payment).
voidAfterReturnoptionalVoidAfterReturn—
recordedByoptionalIdFor cash / check / bankTransfer, the staff uid that recorded it, taken from the verified token.
referenceoptionalstringUntrusted textFor staff-recorded payments: the check number, transfer id or receipt the tenant keeps. With the amount it is the idempotency key of recordOfflinePayment — the same reference and amount twice records one payment.
receiptIdoptionalIdThe receipt this payment is one allocation of — Receive payment applies one amount across several invoices and writes a payment per invoice, each naming the receipt.
authorizationoptionalPaymentAuthorizationThe customer's authorisation for THIS charge, captured on the pay page before the gateway was called: the sentence they agreed to, the signature they gave, and the request metadata the SERVER observed.
entryModeoptionalenumHow the card details reached BillingMart.
processedByoptionalPaymentProcessedBy—
callerPhoneoptionalPhoneE164Untrusted textThe phone number of the caller who gave the card, required for every phone payment and normalized server-side.
receiptDeliveryoptionalPaymentReceiptDelivery—
createdAtrequiredIsoTimestamp—
updatedAtoptionalIsoTimestamp—

Object

PaymentLinkSummary

PaymentLinkSummary is computed by the server for this request, not a stored document, so no contract describes it. Its fields are the TypeScript type of the same name that the handler returns.

Object

PaymentLinkViews

PaymentLinkViews is computed by the server for this request, not a stored document, so no contract describes it. Its fields are the TypeScript type of the same name that the handler returns.

Object

PaymentLinkPayments

PaymentLinkPayments is computed by the server for this request, not a stored document, so no contract describes it. Its fields are the TypeScript type of the same name that the handler returns.

Object

PaymentNote

An INTERNAL note on one payment: staff text for the workspace, never shown to the customer and never on a receipt. Read by the members who can read the payment; written ONLY by the `addPaymentNote` callable (and its REST/MCP twin), which takes the author from the verified token and audits it.

PaymentNote fields
FieldTypeNotes
idrequiredId—
tenantrequiredTenantRefCopied from the payment, so a member confined to some businesses reads a note exactly when they can read its payment.
paymentIdrequiredId—
textrequiredstringUntrusted textPLAIN TEXT written by a member or a connection; rendered as text, never markup, and returned by the API and MCP inside the untrusted-data envelope.
authorUidrequiredIdThe member who wrote it, from the verified ID token — never from the payload.
viaoptionalenumWhere it was written: a person in the console or an app, or a connection (API key or MCP grant) acting for authorUid.
credentialIdoptionalIdThe API key or OAuth grant that wrote it, when via is api.
createdAtrequiredIsoTimestamp—

Object

SavedPaymentMethod

A handle on an instrument TRANZPAY HOLDS, not an instrument we hold. THERE IS NOWHERE IN THIS SCHEMA TO PUT A PAN, A CVV, A ROUTING NUMBER OR AN ACCOUNT NUMBER — deliberately, in all three generated languages, so no code can accidentally persist one.

SavedPaymentMethod fields
FieldTypeNotes
idrequiredId—
tenantrequiredTenantRef—
clientIdrequiredIdWhose method this is. A method is never offered to another client, even inside one tenant.
methodrequiredPaymentMethodcard or ach. 1 trap all over again.
vaultCustomerIdrequiredstringThe TranzPay CustomerID. CALLER-SUPPLIED, so it is derived from the tenant and the client: re-vaulting the same instrument is idempotent, and the id means nothing in another tenant.
merchantAccountIdoptionalIdThe merchant account whose vault holds this method. A saved method can be charged only through this account; an invoice routed to another account asks the customer for the card again.
labeloptionalstringUntrusted textReturned inside the data envelope by every API and MCP response.
cardLast4optionalstringThe last four digits: the only part of the card NUMBER ever stored. It sits beside cardType and the expiry month and year (expMonth, expYear), which are not enough to charge the card.
cardTypeoptionalstring—
expMonthoptionalintegerFor display and for warning before a card expires. Not a secret, and not enough to charge with.
expYearoptionalinteger—
achLast4optionalstringLast four of the account number. THE ROUTING NUMBER IS NOT PERSISTED — together they are the credential that moves money.
bankAccountTypeoptionalBankAccountTypeDisplay only here; the wire builders map it to each operation's own spelling.
consentAtoptionalIsoTimestampWhen the customer agreed this method could be kept. Saving a method and permitting a recurring charge on it are two different permissions — the second one is recurring.autopay.consentAt.
consentVersionoptionalstringWhich wording the customer ticked to keep this card.
consentTextoptionalstringUntrusted textThe COMPLETE words of the save-this-card tick, rebuilt by the SERVER from consentVersion and the business name; never taken from the client.
consentTextHashoptionalstringSHA-256 (hex) of consentText, written by the server, so the stored wording can be shown unchanged.
consentClientAtoptionalIsoTimestampThe customer's own clock when they pressed Pay with the tick set. Corroboration beside the authoritative consentAt (the server's time), never instead of it.
needsUpdateoptionalbooleanSet when a NOC says the bank corrected this account. Nothing keeps silently debiting a corrected account: the method is flagged and a human is told.
needsUpdateCodeoptionalstringThe NOC change code that raised needsUpdate, e.g. C01.
lastUsedAtoptionalIsoTimestamp—
archivedAtoptionalIsoTimestampArchived, never deleted: active is archivedAt absent. A payment names the method that paid it, and deleting the method would orphan the record of how money moved.
createdByoptionalIdFrom the verified ID token when a staff member saved it; absent when the customer saved it on the pay page.
createdAtrequiredIsoTimestamp—
updatedAtoptionalIsoTimestamp—

Object

MerchantApplicationSummary

What the applicant's workspace sees of its merchant application after submitting: the status and nothing it submitted, by owner decision. Function-written; owners and admins of the workspace read it; nobody writes it.

MerchantApplicationSummary fields
FieldTypeNotes
idrequiredId—
tenantIdrequiredId—
statusrequiredMerchantApplicationStatus—
dbarequiredstringUntrusted textThe business name, so the list can tell two applications apart.
submittedAtrequiredIsoTimestamp—
updatedAtrequiredIsoTimestamp—
producerIdoptionalstringPresent once approved.

Object

RateRequestSummary

. What the workspace sees of its rate request: the status, the business name, the dates, the platform's quote once given, and the application it became. Function-written; owners and admins of the workspace read it; nobody writes it.

RateRequestSummary fields
FieldTypeNotes
idrequiredId—
tenantIdrequiredId—
statusrequiredRateRequestStatus—
dbarequiredstringUntrusted textThe business name, so the list can tell two requests apart.
submittedAtrequiredIsoTimestamp—
updatedAtrequiredIsoTimestamp—
passThroughFeesRequestedrequiredboolean—
quoteoptionalRateQuote—
applicationIdoptionalIdPresent once converted.

Object

MerchantAccountView

MerchantAccountView is computed by the server for this request, not a stored document, so no contract describes it. Its fields are the TypeScript type of the same name that the handler returns.

Next section

Recurring and automation

Schedules that raise invoices on their own, the reminder cadence, and what the scheduled jobs will do next.

Continue to Recurring and automation →

Try it against your sandbox

Create a bmk_test_ key in the console. It can only reach your sandbox workspace.

We use Google Analytics on our website by default to understand visits. Choose Decline to turn it off; you can change this at any time on the Cookies page. We never send Google your name, email or account. Cookie policy