Buy a Domain API

Let your users buy
a domain inside your app.

One API call. We charge your card, register the domain with your end-user as the legal owner, set the DNS, and connect it to your app. Then we give you DNS, nameserver, and renewal endpoints so your users never have to log into a registrar.

No registrar account to set up. No reseller paperwork. No PCI scope.

1
API call to buy a domain
+$1
flat fee on top of wholesale
500+
TLDs supported
0
lines of registrar code you write

Trusted by teams building the future of SaaS

  • Common Ninja
  • Embeddable
  • Vidocu
  • Brackets Ninja

Why Buy-a-Domain on Domainee

Your end-user is the legal ownerWHOIS

Domain is registered at the upstream registrar with their contact info — not yours, not ours. If they ever leave your platform, they can transfer the domain out.

Charged + refunded automaticallyStripe + auto-refund

We charge your workspace's Stripe card off-session the moment your API call lands. If the registrar refuses after the charge succeeds, we refund automatically and fire a failure webhook. Your code stays simple.

Connect on the same callautoConnect

Pass autoConnect with an originUrl and the domain is registered, DNS set, edge provisioned, TLS issued — one POST, no second flow.

Why $1 flat, not a percentage: percentage markups feel right for $50 SaaS pricing but predatory for a $1,000 .ai domain. $1 flat scales with effort, not with your customer's bad luck on TLD pricing.

Quote · then buy

Two API calls and you're shipping.

Preview the price before charging anyone, then complete the purchase with one call. Auto-connect on the same call if you want the domain pointed at your app from the moment it's registered.

Step 1 — preview the price

No charge, no row written

GET /v1/domain-purchases/check returns live availability + wholesale + Domainee's $1 fee. Show your end-user the total before they click.

curl — check availability
$ curl https://api.domainee.dev/v1/domain-purchases/check \
    --get --data-urlencode 'hostname=janesbakery.com' \
    -H "Authorization: Bearer sk_live_…"

{
  "hostname": "janesbakery.com",
  "available": true,
  "premium": false,
  "pricing": {
    "wholesaleCents": 1418,
    "feeCents": 100,
    "totalCents": 1518,
    "currency": "USD"
  }
}
Step 2 — buy + connect

One call: charge, register, connect

POST /v1/domain-purchases with autoConnect charges, registers, provisions on our edge, and sets the DNS. Refunds automatically if any step fails.

curl — register + connect
$ curl https://api.domainee.dev/v1/domain-purchases \
    -H "Authorization: Bearer sk_live_…" \
    -d '{
      "hostname": "janesbakery.com",
      "years": 1,
      "registrant": { /* Jane's contact */ },
      "customerReference": "user_jane_42",
      "autoConnect": {
        "originUrl": "https://janesbakery.acmesites.app"
      }
    }'

{
  "purchase": {
    "id": "f8a0c1b9-…",
    "hostname": "janesbakery.com",
    "status": "completed",
    "totalCents": 1518,
    "expiresAt": "2027-05-21T…",
    "connectedDomainId": "8f09b47c-…"
  }
}

Then domain_purchase.completed fires on your webhook endpoint, signed with the same HMAC as the rest of Domainee's events.

You build the dashboard. We provide the plumbing.

Every operation a domain owner expects — DNS records, nameservers, renewal, transfer-out — is exposed as a REST endpoint scoped to the purchase. Your end-users never see Namecheap.

Live registrar status
GET /:id/details

Expiry, nameservers, lock state, WHOIS privacy. Power a domain detail page with one call.

DNS records
GET / PUT /:id/dns

Read + write A, CNAME, MX, TXT, etc. Declarative — what you POST is the full record set.

Custom nameservers
PUT /:id/nameservers

Let advanced users point their domain at Cloudflare, Vercel, Route 53, or wherever they manage DNS.

Renew
POST /:id/renew

Charge wholesale + $1, extend the registration. Or set autoRenew: true and let our worker handle it.

Cancel
PATCH /:id { "autoRenew": false }

Turn off auto-renewal — domain runs out the clock. The right model for refundable churn.

Transfer out
GET /:id/auth-code

Returns the EPP code so your end-user can move the domain elsewhere. The escape hatch every good registrar offers.

Build vs Buy

What you don't have to do.

Becoming a registrar is a years-long contract dance with ICANN. You don't need to. We did it.

  • No reseller agreement with Namecheap / OpenSRS / IONOS. We hold the account, fund the balance, eat the FX.
  • No XML-over-GET adapter code. Our REST API is the same shape as the rest of Domainee — JSON in, JSON out, idempotency keys, HMAC webhooks.
  • No refund logic. If the registrar refuses after we've taken your money, we refund automatically and fire a failure webhook.
  • No PCI scope on your end. We charge your saved Domainee card via Stripe off-session. Your end-user's card never touches us.
  • No parallel database. Filter the purchases ledger by your own customer-reference and the join is one query, not a sync job.
Wholesale
Pass-through

Whatever the registrar charges us — surfaced live on every quote. You see the same number we see.

Domainee fee
+$1 flat

Per purchase, regardless of TLD or term length. Covers refund risk, FX, support. Not percentage-based.

Your markup
Yours to set

Whatever you charge your end-users is between you and them. Domainee isn't in that part of the money flow.

FAQ

Frequently asked

Who is the legal owner of the domain after a Buy-a-Domain API call?
Your end-user. We register the domain at the upstream registrar (Namecheap and friends) using the registrant contact information you pass in the API call. Domainee never appears in WHOIS. If your user leaves your platform, the domain is theirs to transfer out.
What does it cost to register a domain through this API?
Wholesale + $1 flat per purchase. The wholesale price is whatever the upstream registrar charges us, surfaced live on every quote. The $1 is fixed regardless of TLD or term length. You set whatever markup you want to charge your end-user — Domainee isn't in that part of the money flow.
Do I need a reseller agreement with a registrar?
No. Domainee holds the registrar account, funds the balance, handles the FX. You just call our REST API and pay your Domainee invoice.
How does payment work if a registration fails?
We charge your Domainee Stripe card off-session the moment your API call lands. If the registrar refuses after the charge succeeds (rare, but happens with restricted TLDs), we refund automatically and fire a failure webhook. Your code stays simple — no manual reconciliation.
Which TLDs do you support?
500+ TLDs through our upstream registrar coverage, including all common gTLDs (.com, .net, .org, .io, .ai, .dev) and most popular ccTLDs (.co, .me, .tv, .uk, .de, .fr). The GET /v1/domain-purchases/check endpoint returns live availability + price for any TLD we sell.
Can I auto-connect the registered domain to my SaaS?
Yes. Pass autoConnect with an originUrl and we'll provision the hostname on our edge, set the DNS records, and issue TLS — same flow as the Connect API, in one call.
What happens at renewal?
Default: autoRenew is on. Our worker renews ~30 days before expiry, charges your Stripe card for wholesale + $1, and fires a renewal webhook. To opt out per-purchase, PATCH the purchase with autoRenew: false.
How is this different from the Connect API?
Connect API is for users who already own a domain — they bring it, you connect it. Buy a Domain API is for users who don't have one yet — we register on their behalf, they own it, you sell the experience. Most SaaS teams use both: connect for power users, buy for first-timers.

Still have questions? Ask our team →

Ship Buy-a-Domain today.

Spin up an API key, run a quote against any hostname, register your first domain in under a minute.