Resolve
resolve() turns a phone number into the place to pay on your user's network: the person's Nomapay account, or a vault for that number until they join.
The @nomapay/phone-pay kit turns a phone number into a place to pay, from the network your user is already on. If the person isn't on Nomapay yet, the money waits for them.
resolve() turns a phone number into the place to pay on your user's network: the person's Nomapay account, or a vault for that number until they join.
buildPay() returns the calls in order, each fee, the least that arrives, an estimated time, and a one-line summary for your user.
Nothing reveals a name, a balance, or whether money is waiting. Show your user a masked number, never the account behind it.
Works with viem. The kit holds no keys: your user's wallet sends the calls. From an externally owned account, send them one by one; from a smart account, as one batch.
refundTo, or it defaults to the payer.unsupported, with a reason.import { resolve, buildPay, refFrom } from '@nomapay/phone-pay'
// 1. Resolve: the number becomes a place to pay, on your user's network
const route = await resolve('+2348012345678', { region: 'NG', network: 'base' })
if (route.kind === 'unsupported') throw new Error(route.message)
// 2. Build the payment: ordered calls, fees, and the least that arrives
const plan = await buildPay({
phone: '+2348012345678',
region: 'NG',
network: 'base',
token: 'USDC',
amount: 20_000_000n, // $20.00 (6 decimals)
ref: refFrom('order-1042'), // your own id, emitted on payment
payer: account.address, // the address that sends the calls
})
if (plan.kind === 'unsupported') throw new Error(plan.message)
// 3. Show plan.summary, then send plan.calls in order (or as one batch)
for (const call of plan.calls) await walletClient.sendTransaction(call)
From the same live network list the app uses.
USDC on every one. USDT on Arbitrum, and on the others that carry it once the number has a Nomapay account.
For these, createPhonePayService returns where to pay. It needs an API key, so call it from your server, never from a browser or app.
The kit is in private preview ahead of launch. Write to us for the package, the API reference and sandbox, and an API key for the phone-pay service.
Paying from an exchange to your own Nomapay account instead? Receive from an exchange