Ledgers and exports
Use 0Base ledger and export concepts for merchant reconciliation where approved.
Ledgers and exports are the finance closeout layer for 0Base. They should not be treated as decorative reports; they are the bridge between payment objects, settlement status, accounting review, support investigation, and merchant payout expectations.
0Base availability is account-gated. Build against capabilities, merchant status, environment mode, and settlement settings instead of assuming that every payment method, asset, network, cadence, or refund path is enabled for every merchant.
0Base product docs and API details
These pages are public product guidance for merchant and platform developers. 0Base endpoint-level API pages are not published for partners yet; use this product documentation to understand the workflow, records, and launch boundaries.
End-to-end picture
This flow is intentionally shown as product infrastructure: Payment intent -> Settlement ledger row -> Settlement status -> Report totals -> CSV/export -> Accounting close. The merchant application can make the customer experience simple, but the backend should keep each step visible enough for retries, support, and finance closeout.
Production contract
| Boundary | What to build | Why it matters |
|---|---|---|
| Ledger identity | Store settlement id, intent id, status, asset, crypto amount, timestamps. | Ledger rows are finance objects. |
| Status meaning | Use pending, processing, paid, and failed distinctly. | Avoids confusing payout operations. |
| Report filters | Record from/to period, cursor, generated timestamp, and requester. | Exports must be reproducible. |
| Totals | Review totals by asset and status. | Finance needs grouped visibility. |
| Accounting handoff | Hand off exports with object ids intact. | Accounting can drill back into support evidence. |
Status and state handling
| State | What it means | Developer action |
|---|---|---|
| Pending | Settlement record exists but not paid. | Keep open. |
| Processing | Payout/settlement work is underway. | Monitor. |
| Paid | Terminal paid ledger row. | Close payout. |
| Failed | Settlement failed. | Exception queue. |
Status handling should be strict even when the customer UI is friendly. Store raw 0Base statuses, map them to customer-safe labels at the edge, and keep the merchant order state separate from the payment object state. That separation lets you change customer copy without corrupting reconciliation.
Example implementation record
This is an application-side record shape for ledgers and exports. Keep exact request and response fields aligned with your enabled account contract when 0Base API access is released for your partner account; the point of this record is to keep product, support, and finance joined in your system.
{
"settlement_id": "set_live_001",
"intent_id": "pi_live_456",
"asset": "USDT",
"crypto_amount": "92.24000000",
"status": "processing",
"report_period": "2026-06",
"export_id": "settlement_2026_06_csv"
}Operational scenario
The ledger is where product and finance meet. Product may be done when the order is fulfilled, but finance is done when the ledger and export agree with expected settlement behavior.
In practice, production 0Base integrations make the happy path fast while keeping exceptions predictable: retries return the same object, delayed notifications can be repaired, expired sessions do not become mystery payments, and finance exports can be traced back to the original merchant order.
Before and after
| Before 0Base | With 0Base |
|---|---|
| Finance exported screenshots or dashboard totals. | Finance exports rows with ids, status, asset, and period. |
| Paid order meant paid payout. | Payment success and settlement paid remain separate. |
| Failures disappeared from totals. | Reports group by status, including failed/pending. |
| Support could not trace export row. | Export row includes intent and settlement ids. |
Evidence to keep
| Evidence | What to store |
|---|---|
| Ledger row | Settlement id, intent id, status, asset, amount, timestamps. |
| Report request | Filters, period, cursor, requester, generated timestamp. |
| Totals row | Asset, status, count, crypto amount. |
| Export file | Version, checksum where used, storage owner. |
| Accounting note | Close date, exception ids, unresolved ledger rows. |
This evidence is what makes the integration supportable at institutional scale. A developer should not need private operational knowledge to answer basic questions such as what the customer saw, which object owns the state, which event announced the change, and which ledger or report row closed the money movement.
Failure modes and recovery
| Failure mode | Recovery |
|---|---|
| CSV downloaded before final batch | Label partial/open and regenerate after close. |
| Ledger failed | Keep row visible and assign settlement recovery. |
| Totals mismatch transactions | Compare by intent id and settlement id. |
| Export loses ids in spreadsheet | Preserve columns and formatting as text where needed. |
Recovery should be idempotent and explainable. When the system is uncertain, preserve the current raw status, read the latest object state, attach a support reference, and avoid changing fulfillment or finance state until a trusted terminal condition is present.
API adjacency
| API area | Use it for |
|---|---|
GET /merchants/{merchantId}/settlement_ledger | List ledger rows. |
GET /reports/settlement | Settlement report. |
GET /reports/settlement/{period}/csv | CSV export. |
GET /reports/transactions | Transaction report. |
For endpoint-level implementation, use the API reference as the source of truth for fields, enums, authentication, idempotency behavior, pagination, and response examples.
Why this matters for merchants and customers
Ledgers and exports make payments usable for real businesses. A checkout product is incomplete if finance cannot close periods, explain exceptions, and trace settlement rows back to customer orders.
At scale, the value of 0Base is not only that a payment can be created. The value is that the payment can be explained later: what the customer saw, which account capabilities allowed it, which backend state changed, which notification delivered it, and which ledger or report row closed it.
Worked API path
The example below shows the implementation shape for this page. Use merchant-specific capabilities, account settings, and API responses in production; the ids and values here are illustrative.
curl -X GET https://base-api-sandbox.0bit.app/v1/merchants/mrc_test_123/settlement_ledger \
-H "Authorization: Bearer $OBIT_SECRET_KEY"Example response shape:
{
"settlementLedger": [
{
"settlementId": "set_test_123",
"intentId": "pi_test_456",
"status": "processing",
"asset": "USDT",
"cryptoAmount": "96.52000000",
"settlementCurrency": "USDC",
"settlementRail": "onchain"
}
],
"nextCursor": null
}Implementation checkpoints:
- Store your merchant reference before calling 0Base.
- Join ledger rows back to the original payment intent and report period.
- Record the request id, idempotency key, raw status, and environment.
- Use webhook and report reads to repair delayed or missed state changes.
Data join map
This join map is the reason 0Base is infrastructure rather than a payment button. A merchant can change checkout UX, support tooling, or finance exports without losing the chain from customer action to backend state and settlement evidence.
Operator runbook
| Signal | Check first | Action |
|---|---|---|
| Customer reports payment not updating | Look up merchant order id, 0Base object id, raw status, and latest webhook delivery. | Read current object state before changing fulfillment. |
| Webhook delivery failed | Check delivery id, event id, attempts, last error, and handler logs. | Fix the handler, replay once, and dedupe by event id. |
| Finance cannot match a row | Compare client reference, intent id, settlement id, report period, and export row. | Move the item to reconciliation queue instead of closing by amount/date. |
| Payout or ledger status is not final | Check settlement cadence, ledger status, report period, and payout setting history. | Keep finance state open and assign settlement recovery if status is failed. |
The runbook should be available to support and finance teams before launch. A developer integration is not complete if only engineering can explain the state of a customer payment.
Developer checklist
- Never close finance from UI redirect state.
- Keep ledger status separate from payment status.
- Export ids with every row.
- Group totals by asset and status.
- Retain report filters for audit.
- Review failed/pending rows before close.