Then, add a payment requirement by inserting a row to flow_deployments_x402_fees table. There can be multiple payment requirements and the client is free to choose one of them to use.
Table description:
Name
Format
Type
Description
user_id
uuid
string
Owner user ID
id
bigint
number
ID of the row, auto-generated
deployment_id
uuid
string
Deployment ID
network
public.x402network
string
Available network: "base", "base-sepolia", "solana", "solana-devnet".
pay_to
bigint
number
Wallet ID to receive the payment.
amount
numeric
number
USDC amount.
enabled
boolean
boolean
Can use this column to disable a requirement without completely removing it.
Because wallets table can only store Solana wallet at the moment, we cannot support payment on Ethereum yet.
Mainnet is not implemented yet.
Because of a recent exploit, Solana facilitator no longer creates USDC ATA automatically, therefore you need to create it manually, e.g. by depositing a small amount of USDC to it.
Start flow and automatically pay fees with x402-fetch