Pay with Credit
Product pays a Flash Checkouts invoice by borrowing against the payer’s own position. Borrowing and payment happen in one transaction with the collateral remaining in the position.
On this page
- On the roadmap
- V2 Execution
- Contract
- FlasetPayWithCredit
- Pays
- One Flash Checkout invoice, exactly
- Borrows on
- The payer’s own position
Use this product when you want to pay an invoice by borrowing against collateral, rather than selling it.
- Keeping a WETH position: The client holds WETH and owes a freelancer a USDC invoice. The loan pays the invoice and WETH stays in the position.
- Treasury paying a supplier: The DAO pays an invoice from a position it already holds, without selling its collateral first.
- Paying now, repaying later: The loan stays on the position, and the payer pays it down later with a Flash Credit move or on the protocol directly.
Borrow, then pay the invoice
- Checks, before any token moves: The market’s allowlist and tokens, its loan token equal to the invoice’s payment (
PayTokenNotLoanToken), a merchant other than the payer (SelfPayment) and the borrow, within the cap per transaction. - Collateral: With
collateralInabove 0, exactly that much is pulled from the wallet and supplied to the payers position. - Borrow: The invoice amount plus Checkout’s fee, on the payers position.
- Payment: One direct Checkout step of exactly the borrow.
- Exit: The merchant received the invoice amount (
MerchantNotPaid), health is at leastmax(minHealth, healthFloor), the contract holds what it held before.
To pay an invoice of $500 USDC, the contract borrows $501 USDC on your position with the merchant receiving $500 USDC, and your WETH staying in position as collateral.
No fee of its own
Pay with Credit adds no separate fee. The payment carries Checkout’s 0.20% on the invoice. That is the one Flaset fee, the same on every product, and a governance vote can change it. The merchant signs the same invoice as for any Checkout payment, since an invoice has no payer field. PaidWithCredit(payer, digest, marketId, merchant, amount, fee, collateralIn, healthAfter) names the payer, where Checkout’s own event names this contract.
Borrowing risk. The payment leaves debt on your Morpho position: it accrues interest, and it can be liquidated when health falls below 1.00.