Integrate Fuyu
Add funded payment rails and service accounting to your application.
What the SDK handles#
The payment SDK manages funded rails, their lifecycle and a durable payment ledger. You can purchase service credit in increments, charge prepaid periods, reserve a spending ceiling for later capture or distribute settled earnings.
Your application supplies resource IDs and prices, computes request digests and carries messages over HTTP or a stream. It also executes the work, handles retries and defines what happens when service delivery fails.
Buy service credit in increments and sign each resource request.
Streaming & Usage BillingBill a stream in segments and settle its purchases periodically.
SubscriptionsCharge prepaid periods and check whether the current period has been paid.
Authorization & CaptureReserve a spending ceiling, then capture the amount the merchant charges.
Settlement & Revenue SharingClaim earned payments onchain and distribute them to the configured beneficiaries.
Author an AdapterWrite a Pool adapter and submit its route for publisher review.
DeFi IntegrationConnect swaps, vaults and settled payments to private notes. Start with the route, then handle quotes, execution and recovery.
ERC-4626 VaultsAdd a synchronous vault: describe its shares, check its dependencies, register supply and redeem, and keep a share withdrawal path.
Aave V3 StataSupply or redeem Aave static shares using the USDC fork route or the Sepolia WETH/native-ETH manifests.
Morpho V1 VaultsSupply USDC to the Steakhouse V1 fork vault, account for 18-decimal shares and handle redemption or direct share withdrawal.
Dolomite dUSDCUse dUSDC shares for the USDC market-2 route. Check wrapper implementations, receiver permissions and available cash before execution.
Uniswap V3Swap USDC and WETH through one adapter per direction. Set the output floor, check the pool and recover the final private note.
Asynchronous RedemptionTurn a pending vault redemption into private tickets, then claim harvested assets or refund cancelled shares.
Tokenized AssetsCheck token transfers, issuer permissions and trading liquidity before adding custody or a swap route.
Payment Credits & DeFiRedeem settled payment credits for their backing asset and recover the payout as a private note.
Choose a rail#
| Rail | Use it for | Authorization |
|---|---|---|
| Session | Incremental requests and streaming segments | A cumulative purchase voucher and separate signed requests |
| Subscription | Prepaid service periods | Onchain charges with paid-through access |
| Authorization | Work with a cost known after execution | A signed ceiling, confirmed hold and cumulative capture |
| Splitter | Distribute settled earnings | Immutable beneficiaries and cumulative release accounting |
Choose a funding path#
A public backend opens a payment from its payer wallet after the user approves the required token allowance. For private funding, the driver predicts an immutable escrow address. The holder separately authorizes a Pool withdrawal to fund it.
The rail still publishes its budget, merchant and lifecycle state. The Pool proof protects the funding note, while relaying choices, timing and network traffic can affect how the withdrawal is linked.
Start with a funded session#
Give buyer and merchant durable ledgers and configure the chain, contract, asset, merchant, signing authority and budget. Define the request digest codec. The buyer prepares authorizations; the merchant recomputes the requested content and price before accepting them.
Add settlement monitoring and restart recovery before serving paid work. The SDK accounts for purchases but leaves provider execution and job deduplication to your application.
Use Streaming & Usage Billing for a continuous service. To add an external venue, follow the adapter author guide and submit its route manifest for independent review.