Hosted balance API

Build points, credits, and in-app currency with one balance API

Issue, spend, split, expire, and reverse app balances without designing ledger transactions, account history, or recovery workflows yourself.

N-to-M transfersLedger-scoped API keysTime-aware balances

5,000 transfers each month · No payment card required

464M+successful balance transfers
300B+units moved
Production-provenprivate deployments
Aggregate production evidence across XferAPI-powered deployments. See how the figures are defined.
One balanced business operationPOST /v1/transfers
{
  "transfer_id": "order_123",
  "scene": "spend",
  "from_accounts": [
    { "account_id": "buyer_42", "asset": "points", "action": "spend", "amount": "100" }
  ],
  "to_accounts": [
    { "account_id": "seller_7", "asset": "points", "action": "spend", "amount": "90" },
    { "account_id": "-2", "asset": "points", "action": "spend", "amount": "10" }
  ]
}

Built for app-defined value

One balance API, three common product models

Use the same ledger and transfer primitives for reward points, product usage credits, or in-app currency. Your application keeps control of the business rules.

Rewards and loyalty

Points API

Issue, redeem, schedule, and expire points while keeping every balance change tied to a traceable business transfer.

Explore the points API
AI and SaaS products

Usage credits API

Keep metering and pricing in your product, then record the resulting credit grants, charges, shared pools, and expiry.

Explore usage credits
Games and digital products

Virtual currency API

Run coins, gems, and other app-defined value with multi-account transfers, platform flows, history, and reversal.

Explore virtual currency

The accounting layer behind the feature

More than a balance column

XferAPI provides the boundaries and recovery state that become difficult once a balance can move between several parties or change over time.

Balanced by asset

Every transfer must debit and credit the same total for each asset, whether it touches two accounts or twenty.

N-to-M transfers

Model issuance, spending, marketplace splits, fees, and multi-recipient flows with one transfer primitive.

Transfer and record views

Read durable lifecycle state and account mutations when a retry, timeout, or support case needs an exact answer.

Scheduled and expiring value

Attach Unix-second start and expiry boundaries to destination value and read current, future, and batch views.

Whole-transfer reversal

Reverse an identified transfer as one operation. Existing records move to their reversal state while account balances are adjusted.

Scoped service access

Each API key belongs to one ledger and carries read, write, or both scopes without crossing that accounting boundary.

Integration model

From an isolated ledger to the first transfer

Your backend decides why value moves. XferAPI validates, records, and advances the accounting operation.

01

Define one ledger

A ledger isolates accounts, assets, actions, scenes, platform accounts, transfers, records, and API keys for one accounting boundary.

  • Name assets such as credits or points
  • Configure business actions and scenes
  • Keep products or environments isolated
02

Create a service key

Issue a ledger-scoped key for the backend that will read balances or create transfers.

  • Read and write scopes
  • Full secret shown once
  • One-way hash stored by XferAPI
03

Send and inspect transfers

Use your business transfer ID and scene, then read the durable status and records when the result needs inspection.

  • Balanced source and destination entries
  • Stable identity for retries
  • Recovery of intermediate work

Plain HTTP

Use it from any backend

XferAPI is a hosted HTTP API. No runtime package or embedded engine is required in your application.

  • Ledger selected by the API key
  • JSON request and response contract
  • Transfer status available for follow-up
See HTTP integration examples

Building with an AI coding tool?

Copy the canonical llms.txt index or the complete public API context.

Open LLM docs
curl -X POST https://api.xferapi.com/v1/transfers \
  -H "Authorization: Bearer xfer_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "transfer_id": "grant_123",
    "scene": "top_up",
    "from_accounts": [{
      "account_id": "-1", "asset": "points", "action": "top_up", "amount": "100"
    }],
    "to_accounts": [{
      "account_id": "member_42", "asset": "points", "action": "top_up", "amount": "100"
    }]
  }'

Verifiable implementation properties

What protects a transfer

These are concrete behaviors in the current service, not throughput claims or abstract reliability labels.

Zero-sum request validation

Before execution, source and destination totals must match for every asset in the transfer.

Short local transactions

An account mutation and its record are committed together. Multi-account progress is persisted separately instead of holding one large transaction.

Durable lifecycle state

Processing, Completing, Reversing, Succeeded, and Reversed states tell the recovery worker which path is valid.

Time evaluated at the boundary

Balance reads and deductions evaluate start and expiry timestamps in Unix seconds. Expired value is unavailable before lazy compaction runs.

Delivery options

Start hosted. Discuss a private deployment when required.

The API contract stays consistent; the operating model changes.

Standard

Hosted API

Use XferAPI's managed API and console. Your backend integrates over HTTPS while XferAPI operates the service.

Contact sales

Managed private deployment

For teams with deployment-boundary requirements, XferAPI can provide deployment, upgrades, and service in an agreed private environment. This is a managed commercial engagement, not a public source distribution.

Discuss requirements