Purchase new domain
Changed onPurchase and register a new domain name.
If registration fails, login to hPanel and check domain registration status.
If no payment method is provided, your default payment method will be used automatically.
If the response is 202 Accepted, the payment is still being processed and the domain was not registered. Once the order completes, register the domain from hPanel.
If no WHOIS information is provided, default contact information for that TLD will be used. Before making request, ensure WHOIS information for desired TLD exists in your account.
Some TLDs require additional_details to be provided and these will be validated before completing purchase.
Use this endpoint to register new domains for users.
Request
- Base URL: https://developers.hostinger.com
- URL: https://developers.hostinger.com/api/domains/v1/portfolio
- Auth: HTTP bearer
Request body
Example request
{
"domain": "my-new-domain.tld",
"item_id": "hostingercom-domain-com-usd-1y",
"payment_method_id": 1327362,
"domain_contacts": {
"owner_id": 741288,
"admin_id": 546123,
"billing_id": 741288,
"tech_id": 741288
},
"coupons": [
[
"Coupon 3"
]
]
}Response
Success response
Example response
{
"id": 2957086,
"subscription_id": "Azz353Uhl1xC54pR0",
"status": "completed",
"currency": "USD",
"subtotal": 899,
"total": 1088,
"billing_address": {
"first_name": "John",
"last_name": "Doe",
"country": "NL",
"email": "john@doe.tld"
},
"created_at": "2025-02-27T11:54:22Z",
"updated_at": "2025-03-27T11:54:22Z"
}Changes
- info
added the success response with the status
- info