register_domain
Register a new domain with price matching check_domain's quote. Supports idempotent retries for safe ordering under 24 hours.
Instructions
Spends account credit. Registers a new domain on the authenticated Porkbun account. The cost parameter must exactly match the current registration price returned by check_domain (in cents) — Porkbun rejects mismatched quotes. Workflow: call check_domain first to get availability + price, confirm the spend with the user, then call this. The order is idempotency-safe: retries within 24 hours via the same Idempotency-Key return the original response without re-charging. Premium domains, .uk, and a handful of registry-specific TLDs cannot be registered via API and must be done on the website. The account's email and phone number must be verified, and the account must have at least one prior registration order before this works.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Fully qualified domain name to register, e.g. `example.com` | |
| cost | Yes | Registration price in cents. Must match the value returned by `check_domain` for this domain (multiplied by years if duration > 1). |