Obtener una clave API
Domain purchases

POST /api/domains/purchases/checkout

POST https://api.iagenify.com/api/domains/purchases/checkout

Prepare a customer-confirmed payment for a domain registration. Registration is requested only after payment is confirmed.

signed-in session requiredverified emaillegal consent required
Never start checkout from a stale quote

Call the quote endpoint immediately before checkout and use the exact returned first-year and renewal amounts. Checkout rejects a changed quote and does not open payment.

Request

{
  domain: quote.domain,
  expectedFirstPeriodCents: quote.customerFirstPeriodCents,
  expectedRenewalCents: quote.customerRenewalCents,
  "legalConsent": true,
  "registrant": {
    "country": "US",
    "whoisDetails": {
      "first_name": "Alex",
      "last_name": "Example",
      "email": "alex@example.net",
      "phone": "+12025550123",
      "address": "1 Example Street",
      "city": "Example City",
      "state": "CA",
      "zip": "90001",
      "organization": ""
    }
  }
}
domainstringrequired

The exact domain from the current quote.

expectedFirstPeriodCentsintegerrequired

Current quote's first-period customer amount in cents.

expectedRenewalCentsintegerrequired

Current quote's annual renewal customer amount in cents.

legalConsentbooleanrequired

Must be true; confirms that the registrar may receive the submitted registrant details.

registrant.countrystringrequired

Two-letter ISO country code.

registrant.whoisDetailsobjectrequired

Must include first_name, last_name, email, phone, address, city, state and zip. organization is optional.

registrant.tldDetailsobject

Optional extension-specific contact fields.

registrant.additionalDetailsobject

Optional registrar contact details for this registration.

Response and next steps

Success returns { ok: true, order, url }. order includes the order ID, domain, status, charged amount in cents, currency, years, nameservers, failure code and timestamps. url is the customer payment link.

  • Send the customer to the returned url to complete payment.
  • After the customer returns, fetch the order using GET /api/domains/purchases/orders/:id; do not infer payment success from the browser redirect alone.
  • After paid registration, the purchased domain is added to the same signed-in account and onboarding provisions its DNS zone and IaGenify nameservers. The domain can remain pending nameserver delegation while registration or DNS setup completes.
StatusCodeMeaning
401unauthorizedThe bearer session is missing, expired, or invalid. Exchange the account API key for a short-lived session first.
403session_requiredThis checkout route requires a signed-in account session; an API-key credential alone is not accepted.
400registrant_required · registrant_phone_invalid · registrant_consent_required · currency_unsupported · domain_restrictedRequired legal registrant information or consent is missing or invalid, or the registrar offer cannot be checked out in the supported currency.
403email_verification_required · domain_limitVerify the account email or reduce the account's registered domain count.
409domain_quote_changed · domain_unavailable · domain_order_pending · domain_already_attachedThe quote changed, name is no longer available, an order is already running, or the domain is already attached.
503domain_purchases_disabled · domains_unavailable · billing_unavailableThe required purchase, automatic DNS onboarding, or payment service is unavailable.