Prerequisites
Before you begin, ensure that you’ve:- Followed the Embed the Onramp widget quickstart.
- Set up a backend process that can read the Arc blockchain. See Connect to Arc if you don’t have RPC access yet.
- Stored the
destinationAddressyou pass when creating each session, so you can correlate onchain transfers back to the user.
Verify the deposit onchain
1
Poll for deposits to the destination wallet
Poll or subscribe to A few polling considerations:
Transfer logs for the destinationAddress you set when
minting the session. Track the last block you’ve scanned so you don’t re-process
from genesis on every run. The public Arc RPC rejects large block ranges, so
page the scan in small chunks (around 2,000 blocks per request).On Arc, every USDC transfer, native or through the ERC-20 interface, emits a
Transfer log from the system address
0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE, with 18-decimal values. Read only
that log: native transfers emit nothing at the USDC ERC-20 contract
(0x3600000000000000000000000000000000000000), and
reading both counts ERC-20 transfers twice.
Onramp delivers only USDC on Arc.TypeScript
- A transfer to the wallet confirms funds arrived, not that they came from this
Onramp purchase. The destination wallet belongs to the customer and can
receive tokens from other sources. If you need a tighter link, match on timing
after
DEPOSIT_SUBMITTED, and treat the result as best effort. - Watch all wallets you’ve associated with each customer, not just the current
session’s
destinationAddress. A returning customer can pick a bank transfer account they set up in an earlier session, so the deposit lands on that account’s wallet. Bank transfer accounts stay open after a session ends, so later transfers into them arrive onchain with no widget event. - Identify deposits by the destination wallet, transaction hash, and log index, not by sender address. Transfers come from the payment provider’s wallets, which differ by environment and payment method, and aren’t guaranteed to stay stable.
2
Take the amount from the blockchain
The delivered amount is net of payment provider fees, so it won’t match the fiat
amount in the event payload. Read the transferred value from the log and
format it against the token’s decimals.TypeScript
3
Count each transfer once
Key your records by transaction hash and log index. One transaction can carry
more than one Don’t use
Transfer (for example a batched payout to two of your users), so
a key on transactionHash alone drops the second transfer.TypeScript
orderId to disambiguate deposits for bank transfer customers. It’s
the customer’s bank transfer reference, which is the same across all of their
accounts and deposits.