Whiteflow
v0.3.0USDT payment links, payments and collection summaries on Whitechain testnet.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_business_profile Get business profile
The signed-in business: name, environment (sandbox or testnet), time zone and today's date there, supported price currencies, invoice currency, payment methods and limits, and what this API key may do. Call it first, and resolve relative dates ("next Friday") against its `today`.
search_customers Search customers
Find existing customers by name or email (part of either). Returns stable customer ids with a masked email. Use it before create_customer, and to turn a name into the customer_id an invoice needs.
| Parameter | Type | Description |
|---|---|---|
query * | string | Part of the customer's name or email, e.g. "Acme". |
limit | integer | At most this many, 1 to 20. |
create_customer Create customer
Create a customer with only what's needed: a name, and an email if the merchant gives one. Refuses a likely duplicate (same name or email) and lists it instead; pass confirm_new only after the merchant confirms it's a different customer.
| Parameter | Type | Description |
|---|---|---|
name * | string | The customer's or company's name, as the merchant said it. |
confirm_new | boolean | true only after the merchant confirmed that a listed possible duplicate is a different customer. |
create_another | boolean | true only when the merchant deliberately wants a second record identical to one just created (e.g. two identical sales). Never to retry an error. |
email | string | Optional email, only if the merchant gave it. |
idempotency_key | string | Optional, advanced: your own key for this exact request. Leave it out normally: a retry of an unresolved request is resumed automatically. |
create_payment_link Create payment link
Create a hosted payment link and return its URL and status. It is NOT sent to anyone: the merchant shares the URL. Single-use by default (one payment closes it). currency is the price's currency, exactly as the merchant said it (₹ → INR, $ → USD); never convert it yourself. A price not in USDT is converted by Whiteflow at checkout.
| Parameter | Type | Description |
|---|---|---|
amount * | string | The price as a decimal string in `currency`, e.g. "15000" or "15000.00" (at most 2 decimals for fiat, 6 for USDT). |
currency * | string | The price's currency, as the merchant stated it. Ask if unclear; don't assume. |
description * | string | What it's for, shown to the customer, e.g. "Acme website redesign". |
create_another | boolean | true only when the merchant deliberately wants a second record identical to one just created (e.g. two identical sales). Never to retry an error. |
customer_id | string | Optional customer id from search_customers/create_customer (sandbox backend only). |
expires_on | string | Optional last day the link can be paid, YYYY-MM-DD in the business time zone (it closes at the end of that day). |
idempotency_key | string | Optional, advanced: your own key for this exact request. Leave it out normally: a retry of an unresolved request is resumed automatically. |
reference | string | Optional merchant reference (unique per link), e.g. an order number. |
single_use | boolean | true (default): closes after one payment. false: a reusable link. |
get_payment_link Get payment link
A payment link's current status (active, paid, expired, cancelled) and the verified payments made through it, newest first, from Whiteflow's own records.
| Parameter | Type | Description |
|---|---|---|
link_id * | string | The link id, like lnk_…, from create_payment_link. |
create_invoice_draft Create invoice draft
Save a private invoice DRAFT (not sent, not payable) for an existing customer_id: line items with quantity × unit price, a due date, and only an explicit discount or tax the merchant stated. Invoices are in USDT, the settlement asset: if the merchant priced in another currency, ask for the USDT amounts or offer a payment link; never convert. Never invent a tax rate. Resolve a relative due date ("next Friday") with get_business_profile's today and confirm the resulting date.
| Parameter | Type | Description |
|---|---|---|
currency * | string | Must be "USDT". |
customer_id * | string | From search_customers or create_customer. Never a name. |
due_date * | string | YYYY-MM-DD in the business time zone; today or later. |
line_items * | array | |
create_another | boolean | true only when the merchant deliberately wants a second record identical to one just created (e.g. two identical sales). Never to retry an error. |
discount | Only if the merchant asked for one. | |
idempotency_key | string | Optional, advanced: your own key for this exact request. Leave it out normally: a retry of an unresolved request is resumed automatically. |
memo | string | Optional note shown on the invoice. |
tax | object | Only a tax the merchant explicitly named, with its rate. Never infer one. |
update_invoice_draft Update invoice draft
Change a DRAFT before publication: customer, line items, due date, discount, tax or memo (give only what changes; `discount: null` / `tax: null` removes one). It creates a new revision, and any pending publication approval for the old one is cancelled. Published invoices can't be edited.
| Parameter | Type | Description |
|---|---|---|
invoice * | string | The invoice id (inv_…) or its number (WF-1042). |
customer_id | string | |
discount | ||
due_date | string | |
idempotency_key | string | Optional, advanced: your own key for this exact request. Leave it out normally: a retry of an unresolved request is resumed automatically. |
line_items | array | |
memo | ||
tax |
finalize_invoice Request invoice publication
Ask to publish a reviewed DRAFT. This doesn't publish by itself: Whiteflow creates an approval request for this exact version (total, currency, customer), and an Owner of the business approves it on the review page; then the invoice gets its number and payment URL. A conversation 'yes' is not that approval. The connector re-checks the totals first and refuses if they don't add up. Nothing is emailed or sent.
| Parameter | Type | Description |
|---|---|---|
invoice * | string | The invoice id (inv_…) or its number (WF-1042). |
idempotency_key | string | Optional, advanced: your own key for this exact request. Leave it out normally: a retry of an unresolved request is resumed automatically. |
get_invoice Get invoice
An invoice's status (draft, awaiting approval, open, overdue, paid), totals, amount paid and still due, due date, payment URL, and its verified payments. Paid status comes only from Whiteflow's verified payment records.
| Parameter | Type | Description |
|---|---|---|
invoice * | string | The invoice id (inv_…) or its number (WF-1042). |
list_invoices List invoices
Invoices newest first, filtered by customer, status (draft, open, paid, overdue) and due-date range, with a cursor for the next page. Amounts stay in each invoice's own currency.
| Parameter | Type | Description |
|---|---|---|
cursor | string | The `next_cursor` of the previous page. |
customer_id | string | |
due_from | string | YYYY-MM-DD, inclusive. |
due_to | string | YYYY-MM-DD, inclusive. |
limit | integer | |
status | string |
prepare_invoice_reminder Prepare invoice reminder
Draft a payment reminder for an open invoice: subject, body, the intended recipient and the payment URL. It does NOT send anything (sent: false); the merchant reviews and sends it.
| Parameter | Type | Description |
|---|---|---|
invoice * | string | The invoice id (inv_…) or its number (WF-1042). |
list_payments List payments
Verified payments received, newest first: amount in USDT, refunded amount, time, the related invoice or link, and evidence (an explorer link on testnet). A cursor pages through older ones.
| Parameter | Type | Description |
|---|---|---|
cursor | string | The `next_cursor` of the previous page. |
limit | integer | How many, 1 to 100. |
get_collection_summary Collection summary
Money collected in a period (gross, fees, refunds, net and count, per currency) and, where the backend has invoices, what is outstanding and overdue now. Days are the business's own time zone. Give a period, or from and to.
| Parameter | Type | Description |
|---|---|---|
from | string | YYYY-MM-DD, inclusive (with to; instead of period). |
period | string | this_week starts on Monday. Default: this_week. |
to | string | YYYY-MM-DD, inclusive. |
get_operation_status Operation status
Writes whose outcome is still unknown or needs reconciliation (after a timeout, a lost reply, or a reply that didn't match the request), or one write by its idempotency_key: what was attempted, when, and what Whiteflow's records say. Pass acknowledge: true only after the merchant has checked the record themselves; it clears the local flag so a new, identical request can be made.
| Parameter | Type | Description |
|---|---|---|
acknowledge | boolean | With idempotency_key: the merchant checked this record; stop treating it as unresolved. |
idempotency_key | string | One operation; leave out to list every unresolved one. |