Swap-Pay Invoice

Billing module accepting token swap payment for merchants.

Visit Repo
Swap-Pay Invoice banner

About

Swap-Pay Invoice lets one merchant bill in native ETH or an accepted ERC-20. The merchant chooses which tokens to accept, then creates an invoice for a fixed amount, with an optional due date and an optional payer. If no payer is set, anyone may pay. The merchant sees each invoice’s amount, asset, due date, and status. A payer can settle a pending invoice before the due date, either in the invoice currency or by spending another accepted token that is exchanged into that currency in the same payment. The merchant receives the funds, and the invoice is marked paid.

The same billing flow can be offered through an API as part of a digital asset management service. The merchant creates an invoice through the API and receives a link to the payment page. When payment completes, a webhook notifies the merchant’s existing system so the payment can be reconciled with the matching account or invoice.

How it's made

# Uniswap The app builds Uniswap v4 Universal Router calldata off-chain (V4Planner and RoutePlanner). The contract does not choose the pool. It pulls the payer's tokenIn through Permit2, calls Universal Router, and checks the result. Unspent tokenIn is refunded, and the Permit2 allowance is cleared before the call returns. Local tests run against an Anvil mainnet fork so the script can use live v4 pool liquidity.

# MultiBaas

Tested on Sepolia, as MultiBaas works with live testnets and does not support a local mainnet fork. On Sepolia, the invoice and accepted-token lists are retrieved through MultiBaas event queries rather than eth_getLogs, which helps overcome the limitations imposed by RPC providers on eth_getLogs. MultiBaas makes it easier to query and retrieve data that would otherwise be difficult to access efficiently due to the limitations of smart contract data structures.

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.