{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-api/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"GetTLDPricing","description":"Developer documentation for the WHMCS API — the","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"gettldpricing","__idx":0},"children":["GetTLDPricing"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Retrieve TLD pricing"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"request-parameters","__idx":1},"children":["Request Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["action"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"GetTLDPricing\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["currencyid"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The currency ID to fetch pricing for. Pass this or clientid, but not both. clientid overrides currencyid."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["clientid"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The client ID to fetch pricing for. Pass this or clientid, but not both. clientid overrides currencyid."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"response-parameters","__idx":2},"children":["Response Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["result"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The result of the operation: success or error"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["currency"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An array of information about the associated currency."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["pricing"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An array of pricing and other information for configured TLDs. The items in this array are conditional and only appear when a user has already configured pricing (including a price of 0)."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-request-curl","__idx":3},"children":["Example Request (CURL)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, 'https://www.example.com/includes/api.php');\ncurl_setopt($ch, CURLOPT_POST, 1);\ncurl_setopt($ch, CURLOPT_POSTFIELDS,\n    http_build_query(\n        array(\n            'action' => 'GetTLDPricing',\n            // See https://developers.whmcs.com/api/authentication\n            'username' => 'IDENTIFIER_OR_ADMIN_USERNAME',\n            'password' => 'SECRET_OR_HASHED_PASSWORD',\n            'currencyid' => '1',\n            'responsetype' => 'json',\n        )\n    )\n);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n$response = curl_exec($ch);\ncurl_close($ch);\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-request-local-api","__idx":4},"children":["Example Request (Local API)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$command = 'GetTLDPricing';\n$postData = array(\n    'currencyid' => '1',\n);\n$adminUsername = 'ADMIN_USERNAME'; // Optional for WHMCS 7.2 and later\n\n$results = localAPI($command, $postData, $adminUsername);\nprint_r($results);\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-response-json","__idx":5},"children":["Example Response JSON"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"{\n    \"result\": \"success\",\n    \"currency\": {\n        \"id\": 1,\n        \"code\": \"USD\",\n        \"prefix\": \"$\",\n        \"suffix\": \" USD\",\n        \"format\": 1,\n        \"rate\": \"1.00000\"\n    },\n    \"pricing\": {\n        \"com\": {\n            \"tld\": \"com\",\n            \"categories\": [\n                \"Popular\"\n            ],\n            \"addons\": {\n                \"dns\": false,\n                \"email\": false,\n                \"idprotect\": false\n            },\n            \"group\": \"\",\n            \"register\": {\n                \"1\": \"14.95\"\n            },\n            \"transfer\": {\n                \"1\": \"14.95\"\n            },\n            \"renew\": {\n                \"1\": \"14.95\"\n            },\n            \"grace_period\": null,\n            \"redemption_period\": null\n        },\n        \"net\": {\n            \"tld\": \"net\",\n            \"categories\": [\n                \"Popular\"\n            ],\n            \"addons\": {\n                \"dns\": false,\n                \"email\": false,\n                \"idprotect\": false\n            },\n            \"group\": \"\",\n            \"register\": {\n                \"1\": \"14.95\"\n            },\n            \"transfer\": {\n                \"1\": \"14.95\"\n            },\n            \"renew\": {\n                \"1\": \"14.95\"\n            },\n            \"grace_period\": null,\n            \"redemption_period\": null\n        },\n        \"org\": {\n            \"tld\": \"org\",\n            \"categories\": [\n                \"Popular\"\n            ],\n            \"addons\": {\n                \"dns\": false,\n                \"email\": false,\n                \"idprotect\": false\n            },\n            \"group\": \"\",\n            \"register\": {\n                \"1\": \"14.95\"\n            },\n            \"transfer\": {\n                \"1\": \"14.95\"\n            },\n            \"renew\": {\n                \"1\": \"14.95\"\n            },\n            \"grace_period\": null,\n            \"redemption_period\": null\n        },\n        \"biz\": {\n            \"tld\": \"biz\",\n            \"categories\": [\n                \"Popular\"\n            ],\n            \"addons\": {\n                \"dns\": false,\n                \"email\": false,\n                \"idprotect\": false\n            },\n            \"group\": \"\",\n            \"register\": {\n                \"1\": \"14.95\"\n            },\n            \"transfer\": {\n                \"1\": \"14.95\"\n            },\n            \"renew\": {\n                \"1\": \"14.95\"\n            },\n            \"grace_period\": null,\n            \"redemption_period\": null\n        },\n        \"info\": {\n            \"tld\": \"info\",\n            \"categories\": [\n                \"Popular\"\n            ],\n            \"addons\": {\n                \"dns\": false,\n                \"email\": false,\n                \"idprotect\": false\n            },\n            \"group\": \"\",\n            \"register\": {\n                \"1\": \"14.95\"\n            },\n            \"transfer\": {\n                \"1\": \"14.95\"\n            },\n            \"renew\": {\n                \"1\": \"14.95\"\n            },\n            \"grace_period\": null,\n            \"redemption_period\": null\n        }\n    }\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"version-history","__idx":6},"children":["Version History"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Version"},"children":["Version"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Changelog"},"children":["Changelog"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Initial Version"]}]}]}]}]}]},"headings":[{"value":"GetTLDPricing","id":"gettldpricing","depth":1},{"value":"Request Parameters","id":"request-parameters","depth":3},{"value":"Response Parameters","id":"response-parameters","depth":3},{"value":"Example Request (CURL)","id":"example-request-curl","depth":3},{"value":"Example Request (Local API)","id":"example-request-local-api","depth":3},{"value":"Example Response JSON","id":"example-response-json","depth":3},{"value":"Version History","id":"version-history","depth":3}],"frontmatter":{"title":"GetTLDPricing","seo":{"title":"GetTLDPricing"}},"lastModified":"2026-08-04T14:47:26.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/api-reference/gettldpricing","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}