e-Commerce
Simplify the architecture of your marketplace or storefront with a ledgering system built for the modern web. WAPI provides the infrastructure to handle multi-party settlements, automated shipping fees, and real-time reconciliation—all within a single, high-throughput environment.
Use Case: e-commerce
1// Ensure the buyer has a dedicated ledger entry2await wapi.createWallet({3 foreign: 'buyer1',4 metadata: {5 location: 'EU',6 }7});89// Map a single order to multiple ledger movements10await wapi.createTransferGroup({11 identifier: 'order1',12 children: [13 // Initial deposit from external provider14 { wallet: 'buyer1', token: 'EUR', amount: 12, type: 'deposit', metadata: { paypal: true } },15 // Payment for the seller16 { from_wallet: 'buyer1', to_wallet: 'seller1', token: 'EUR', amount: 10 },17 // Payment for shipping18 { from_wallet: 'buyer1', to_wallet: 'house', token: 'EUR', amount: 2, metadata: { shipping: true } }19 ],20});2122// Commit all sub-transfers simultaneously23await wapi.updateTransferGroup({24 transfer_group: 'order1',25 transfer_status: 'finished',26});2728// Fetch a consolidated view of the transaction's impact29const balances = await wapi.findBalances()30 .where('token', 'EUR')31 .where((t) => {32 return t.where('wallet', 'buyer1')33 .orWhere('wallet', 'seller1')34 .orWhere('wallet', 'house');35 })36 .orderBy('wallet_foreign asc');
Frequently Asked Questions
Get started with WAPI.
Leave your email, we will get in touch with you as soon as possible.
Leave your email, we will get in touch with you as soon as possible.