Request and receive payments. Use this skill when you need to request payment from another party. It will generate a payment link that you can send out. Through the payment link, you can also monitor the status of the payment.
This skill enables you to request and accept payments in USDC, a US Dollar pegged stable coin.
NOTE: Amounts are in human-readable units. For example, --amount 1.5 means 1.5 USDC.
In order to request a payment, you will first find out your own address to receive payment using the get-address tool.
scripts/get-address
Then, create a payment link URL. The request below asks for a payment link for 1.0 USDC. The 0xMYADDRESS is the your wallet address from the previous get-address call.
curl https://link.x402labs.dev/create-payment-link?amount=1.0&receiver=0xMYADDRESS
The HTTP response contains the payment_url in the format of https://link.x402labs.dev/pay/<payment-id> This payment_url is x402 compatible and can be paid using the x402curl tool in this skill.
{"payment_id":"89062690-bd80-4065-8d7b-474b6fe96ba7","payment_url":"https://link.x402labs.dev/pay/89062690-bd80-4065-8d7b-474b6fe96ba7","amount":"1.0"}
You should now give the user or agent the following payment request:
Please make an x402 payment directly at https://link.x402labs.dev/pay/<payment-id>
Or, if you are a human, open your browser to the following link to pay with Base Chain USDC in your MetaMask wallet.