On this page

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.

Sessions, subscriptions and payment holds
Sessions, subscriptions and payment holds
Payment Sessions

Buy service credit in increments and sign each resource request.

Streaming & Usage Billing

Bill a stream in segments and settle its purchases periodically.

Subscriptions

Charge prepaid periods and check whether the current period has been paid.

Authorization & Capture

Reserve a spending ceiling, then capture the amount the merchant charges.

Settlement & Revenue Sharing

Claim earned payments onchain and distribute them to the configured beneficiaries.

Author an Adapter

Write a Pool adapter and submit its route for publisher review.

DeFi Integration

Connect swaps, vaults and settled payments to private notes. Start with the route, then handle quotes, execution and recovery.

ERC-4626 Vaults

Add a synchronous vault: describe its shares, check its dependencies, register supply and redeem, and keep a share withdrawal path.

Aave V3 Stata

Supply or redeem Aave static shares using the USDC fork route or the Sepolia WETH/native-ETH manifests.

Morpho V1 Vaults

Supply USDC to the Steakhouse V1 fork vault, account for 18-decimal shares and handle redemption or direct share withdrawal.

Dolomite dUSDC

Use dUSDC shares for the USDC market-2 route. Check wrapper implementations, receiver permissions and available cash before execution.

Uniswap V3

Swap USDC and WETH through one adapter per direction. Set the output floor, check the pool and recover the final private note.

Asynchronous Redemption

Turn a pending vault redemption into private tickets, then claim harvested assets or refund cancelled shares.

Tokenized Assets

Check token transfers, issuer permissions and trading liquidity before adding custody or a swap route.

Payment Credits & DeFi

Redeem settled payment credits for their backing asset and recover the payout as a private note.

Choose a rail#

RailUse it forAuthorization
SessionIncremental requests and streaming segmentsA cumulative purchase voucher and separate signed requests
SubscriptionPrepaid service periodsOnchain charges with paid-through access
AuthorizationWork with a cost known after executionA signed ceiling, confirmed hold and cumulative capture
SplitterDistribute settled earningsImmutable 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.