| Name | Type | Description |
|---|---|---|
domainName | string | The domain name that you want to purchase. |
years | number (Optional) | The number of years you want to register the domain for. Default is 1. |
useWallet | boolean | Set to true if you want to use wallet balance for the purchase. |
{
"domains": [
{
"domainName": "domain.com",
"years": 1
}
],
"useWallet": false
}curl --location --request POST 'https://api.zapmail.ai/api/v2/domains/buy' \
--header 'x-auth-zapmail;' \
--header 'x-workspace-key;' \
--header 'x-service-provider;' \
--header 'Content-Type: application/json' \
--data-raw '{
"domains": [
{
"domainName": "domain.com",
"years": 1
}
],
"useWallet": false
}'{
"message": "Your payment Link is generated",
"paymentLink": "https://payment.example.com"
}