pay Function
Send USDC payments on Base
Code Editor
Intended for testing purposes only. Never paste code from untrusted sources. Coinbase is not responsible for any loss of funds that you incur. Testnet funds hold no real value.
Quick Tips
- Get testnet ETH at https://faucet.circle.com/ - select "Base Sepolia" as the network
- testnet (`true`) toggles base sepolia testnet
- Amount is in USDC (e.g., "1" = $1 of USDC)
- Only USDC on base and base sepolia are supported
- Use payerInfo to request user information.
Output
Click "Execute Code" to run your code
getPaymentStatus Function
Check the status of a payment
Code Editor
Intended for testing purposes only. Never paste code from untrusted sources. Coinbase is not responsible for any loss of funds that you incur. Testnet funds hold no real value.
Quick Tips
- Use an `id` returned from the pay function
- Status can be: pending, completed, failed, or not_found
- For completed payments, you can see the amount and recipient
- For failed payments, you can see the failure reason
- Make sure to use the same testnet setting as the original payment
Output
Click "Execute Code" to run your code