For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
RegisterLoginSandbox Login
GuidesRecipesAPI Reference
GuidesRecipesAPI Reference
  • Product Overview
    • Products & Features
    • Key Concepts
  • Getting Started
    • Account Setup
    • Quickstart
  • Checkout
    • Settlement Locations
      • Settlement to Coinflow Wallet
      • Merchant BYO Wallet Settlement
        • Whitelist Your Contracts
          • Implement Settlement to EVM Contract
          • EVM Transactions In-Depth
          • Tempo Signature Integration (secp256k1 / P-256 / WebAuthn / Keychain V2)
  • Payouts
    • Payout Overview
    • What is a Payout
  • Subscriptions
    • Subscriptions Overview
  • Marketplaces
    • Marketplace Overview
    • How Marketplaces Work
    • Marketplaces Webhooks
    • Marketplaces Implementation
  • Developer Resources
    • Custom Branding
    • Checkout Implementation
    • Webhooks
  • Merchant Dashboard
    • Login & Account Access
    • Users and Roles
    • Rate Limits
    • Developer Contact
LogoLogo
RegisterLoginSandbox Login
On this page
  • How Coinflow EVM transactions work
  • How to debug EVM transactions
  • Steps to debug
CheckoutSettlement LocationsSettlement to ContractsSettle to EVM Contract

EVM Transactions In-Depth

How Coinflow EVM transactions work end-to-end and how to debug them.

Was this page helpful?
Previous

Tempo Signature Integration (secp256k1 / P-256 / WebAuthn / Keychain V2)

Accept Tempo wallets signing with secp256k1, raw P-256, WebAuthn passkeys, or Keychain V2 access-key envelopes for EVM credits redemption on the Tempo chain.

Next
Built with

This page is for advanced / cryptocurrency-native companies. If that’s not you, head back to the Quickstart for the standard flows.

How Coinflow EVM transactions work

  1. User enters card info.
  2. Card gets authorized and passes chargeback checks.
  3. Coinflow runs the transaction. At this point, the Coinflow contract has a USDC balance that can be deducted from to send USDC to the merchant for settlement. The Coinflow contract receives:
    • The amount of USDC to approve
    • Merchant contract address
    • Function call data (the data to call the merchant contract with)
  4. The Coinflow contract calls approve() on the USDC contract, allowing the merchant’s contract to pull $X amount of USDC from the Coinflow contract.
  5. The Coinflow contract calls the merchant’s contract with the provided function call data.
    • Inside the merchant’s contract, a call to the USDC contract’s transferFrom() function is made. This takes in the merchant’s contract address, the amount of USDC to transfer, and the destination that will receive USDC (destination could be the end-user wallet, merchant wallet, or merchant contract). This represents fulfillment of payment or settlement.
    • Inside the function data passed to the Coinflow contract, the merchant needs to include the end user’s wallet address so that the merchant’s contract can send the NFT to the end user.

How to debug EVM transactions

When merchants submit transaction data, Coinflow simulates it upfront to ensure successful execution. The response includes any revert reasons and the corresponding transaction data. Receiving an error message INSUFFICIENT FUNDS TO REDEEM indicates the transaction failed due to inadequate funds.

Steps to debug

  1. Check response details
    • Look for the revertReason messages to understand why the transaction failed.
    • Identify which addresses (to and from) are involved in the failure.
  2. Use a transaction simulator tool like Tenderly
  • Copy the transaction data into a simulation tool like Tenderly for more detailed reasons of where the transaction failed
  1. Analyze transaction data
  • Verify the to field in the transaction data matches the Coinflow contract
  • Ensure the from field correctly corresponds to the wallet paying USDC