⛓ ACH transactions

Since ACH has delayed settlement, merchants should design their smart contracts in a way that conforms to the following principle: You must support separate wallets paying for the good/service and the wallet receiving the good/service

Solana

Solana transactions list every account which is read from or written to during the transaction. In the place of the users wallet (or the wallet paying the USDC), replace that key in the transaction instructions with 22222222222222222222222222222222222222222222. In the place of the USDC payers token account, replace the key in the transaction instructions with 33333333333333333333333333333333333333333333.

For example if you would normally construct a transaction instruction like so:

const transferIx = createTransferInstruction(  
  getTokenAddressSync(usersWallet, USDC_MINT), // spender token account
  destinationTokenAccount,  // destination token account
  usersWallet, // Owner of spender token account
  1  // amount
);

You would now instead construct the transaction instruction like so:

const transferIx = createTransferInstruction(  
  new PublicKey('33333333333333333333333333333333333333333333'), // spender token account
  destinationTokenAccount,  // destination token account
  new PublicKey('22222222222222222222222222222222222222222222'), // Owner of spender token account
  1  // amount
);

On the backend Coinflow will replace these placeholders with a signer and the signers token account so that it can pay USDC on behalf of the user.

📘

If you support both card and ACH payments, add the placeholders, and in the redeem transaction Coinflow will automatically replace the placeholders with the users wallet and their token account.

EVM

Evm transactions always have a msg.sender and a from field. Our system will automatically set that to our payer.

Flow

  1. Merchant passes a transaction to the CoinflowPurchase component.
  2. User initiates an ACH purchase.
  3. Our systems initiate the ACH transfer and then wait until the money is received (3 business days).
  4. After transfer, our system runs the transaction you provided with our USDC payer, delivering the goods/services to the end user.