Quickstart

Send your first SMS
in 60 seconds

Get up and running with Dial in four simple steps. No account required. No API keys to manage. Just your wallet and a few lines of code.

Step 01

Install the SDK

Add the Dial SDK to your project. Works with any JavaScript runtime.

bashnpm install
npm install @payphone/api @x402/fetch
# Or with yarn
yarn add @payphone/api @x402/fetch
# Or with pnpm
pnpm add @payphone/api @x402/fetch
Step 02

Configure your client

Set up the Dial client with your x402 payment wrapper. No API key needed — your wallet is your credential.

typescriptdial-client.ts
import { DialClient } from "@payphone/api";
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { toClientEvmSigner } from "@x402/evm";
// Create your x402 payment wrapper
const signer = toClientEvmSigner(walletClient);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));
const paidFetch = wrapFetchWithPayment(fetch, client);
// Initialize Dial
const dial = new DialClient({
baseUrl: "https://payphone.wtf",
x402Fetch: paidFetch,
});
Step 03

Buy a phone line

Order a dedicated US or international phone number. $100 activation, activated within 48 business hours (Monday to Friday, US Eastern), or refunded. Your wallet owns it.

typescriptbuy-line.ts
// Order a US phone line ($100 activation)
const order = await dial.numbers.buyUs({
country: "US",
});
console.log(order.status, order.orderId, order.promisedBy);
// → reserved <orderId> 2026-11-03T17:00:00.000Z
// Activated within 48 business hours, or refunded.
// Check it with dial.numbers.buyStatus({ orderId: order.orderId }).
// Or order an international line
const intlOrder = await dial.numbers.buyIntl({
country: "GB",
});
Step 04

Send your first SMS

Send a message from your new number. $0.05 per SMS. Track delivery status in real-time.

typescriptsend-sms.ts
// Send an SMS from your number
const message = await dial.messages.send({
to: "+1234567890",
from: number,
body: "Hello from Dial! 👋",
});
console.log("Message ID:", message.id);
console.log("Status:", message.status);
// → queued
// Check delivery status
const status = await dial.messages.get(message.id);
console.log("Delivery:", status.deliveryState);
// → delivered
The Magic Moment

Watch your message deliver

Real-time delivery tracking from queue to inbox.

Queued
Sent
Delivered
jsonDelivery webhook payload
{
"messageId": "msg_2vPqN9LkX3wR8sT",
"status": "delivered",
"to": "+1234567890",
"from": "+15551234567",
"body": "Hello from Dial! 👋",
"deliveredAt": "2024-01-15T09:23:17.000Z",
"carrier": "T-Mobile",
"networkCode": "310260"
}