Sequence

Recipient resolution

The app normalizes what the user typed before calling the API (src/lib/recipient.ts): If the lookup returns 404, the app calls POST /api/user/pregenerate with { email } or { phoneNumber }. If another sender created the claimable wallet first, the endpoint returns the existing record instead of creating a second one.

On-chain call

The payment is a single ERC-20 transfer executed by the sender’s Kernel account:

Recording

After the transfer, the app reports it with POST /api/transaction. The backend requires both addresses to belong to Numpay users and stores the payment with SEND type, so it appears in the sender’s “sent” and the receiver’s “received” history.

Balance

The app reads the balance directly from the chain, not from the API:
Only the smart account’s balance is counted.