---
title: "Purchase phone number"
method: POST
path: "/v1/whatsapp/phone-numbers/purchase"
tags: ["WhatsApp Phone Numbers"]
deprecated: true
---

# Purchase phone number

`POST /v1/whatsapp/phone-numbers/purchase`

> **Deprecated.**

Deprecated alias of `/v1/phone-numbers/purchase`; same contract. New
integrations should use that path.

Payment-first: the system provisions a number and auto-assigns it, unless you pass
`phoneNumber` to buy one exact number from `GET /v1/phone-numbers/available`. With
usage-based billing active and a payment method on file, the
number provisions inline and bills per month on your usage-based invoice (there is
no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`;
a regulated country returns `202` with `status: "kyc_required"` and a `kycUrl`.

The monthly price is the one `GET /v1/phone-numbers/countries` quotes for that
country and `numberType` at the time of purchase, and it is stamped on the number:
later rate-card changes never move a number you already own.

Requires usage-based billing (the Usage plan). The maximum number of phone numbers
is determined by the user's plan.

## Request body

- object
  - `profileId` string, required — Profile to associate the number with
  - `country` string — ISO 3166-1 alpha-2 country for the number (default US). International numbers require usage-based billing. Tier 3/4 countries return 202 { status: "kyc_required", kycUrl }. The customer must complete KYC at that URL before the number is ordered. See GET /v1/whatsapp/phone-numbers/countries.
  - `phoneNumber` string — One exact number to buy, in E.164, taken from GET /v1/phone-numbers/available. Fails with 409 code PHONE_NUMBER_UNAVAILABLE when it is no longer available.
  - `purchaseIntentId` string — Optional idempotency key. Send the same value when retrying a purchase: if a number was already bought under this key, the API returns { status: "already_purchased", numberId, phoneNumber } instead of provisioning a second number. Generate a fresh key for each genuinely new purchase.
  - `allowMultiple` boolean — Any second purchase within 10 minutes of a previous one is rejected with 409 code PURCHASE_VELOCITY as duplicate protection. Pass true to confirm the additional purchase is intentional (e.g. bulk provisioning).

## Response `200`

Either a checkout URL (first number) or the provisioned phone number (subsequent numbers).

- union
  - object — Checkout session created (first number)
    - `message` string
    - `checkoutUrl` string, uri
  - object — Phone number provisioned inline (subsequent numbers)
    - `message` string
    - `phoneNumber` object
      - `id` string
      - `phoneNumber` string
      - `status` string
      - `country` string
      - `provisionedAt` string, date-time
      - `metaPreverifiedId` string
      - `metaVerificationStatus` string
  - object — A number was already purchased under the supplied purchaseIntentId; no new number was provisioned.
    - `status` 'already_purchased'
    - `numberId` string
    - `phoneNumber` string

## Other responses

- `202` — Country requires end-user KYC before the number can be ordered.
- `400` — Plan limit reached, profileId required, or country not available
- `401` — Unauthorized
- `402` — Payment method required (usage-based billing account with no card on file). Response body carries code: PAYMENT_REQUIRED; add a card, then retry.
- `403` — A paid plan is required
- `409` — Either duplicate-purchase protection (code PURCHASE_VELOCITY: another number was purchased within the last 10 minutes; retry with allowMultiple: true to confirm), or the requested areaCode has no deliverable inventory right now (code AREA_CODE_UNAVAILABLE: pick another area or omit areaCode; PHONE_NUMBER_UNAVAILABLE: search again and pick another number; COUNTRY_OUT_OF_STOCK: this country and type have no orderable numbers right now, pick another).
- `422` — International numbers require usage-based billing (legacy Stripe users are US-only). Response body code: USAGE_BILLING_REQUIRED.
- `503` — The carrier could not take the order just now (code CARRIER_UNAVAILABLE); the number is not taken, retry the same request in a minute.

## Changes

- **2026-09-18** `eded32b62823` — 1 warning
  - added the new `COUNTRY_OUT_OF_STOCK` enum value to the `code` response property for the response status `409`
- **2026-09-17** `be448f13ecdc` — 1 info
  - added the non-success response with the status `503`
- **2026-09-10** `e70ed06e7150` — 1 warning, 1 info
  - added the new `PHONE_NUMBER_UNAVAILABLE` enum value to the `code` response property for the response status `409`
  - added the new optional request property `phoneNumber`

[Change history](https://skmtc.dev/zernio/apis/zernio-api/changes/v1/whatsapp/phone-numbers/purchase/post.md)

---

[API](https://skmtc.dev/zernio/apis/zernio-api.md) · [All operations](https://skmtc.dev/zernio/apis/zernio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zernio/apis/zernio-api/revisions/eded32b62823?raw)
