{"componentChunkName":"component---src-templates-simple-markdown-js","path":"/api-docs/best-practices/base-urls/","matchPath":"","result":{"data":{"markdownRemark":{"html":"<h1 style=\"position:relative;\"><a href=\"#base-urls\" aria-label=\"base urls permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"base-urls\"></div>Base URLs</h1>\n<p>Ripple makes RESTful APIs available to integrate, manage and interact with Ripple products and services. To use these APIs, you need to use the correct base URL. A base URL is part of a well-formed REST URL.</p>\n<p>To form the final API request, append the necessary version, path, resource, and parameters to the base URL.</p>\n<div class=\"admonition admonition-success\"><div class=\"admonition-heading\"><h5><span class=\"admonition-icon\"><i></i></span>All environments use unique base URLs</h5></div><div class=\"admonition-content\"><p>For more information on the correct base URL for the API environment you interact with, see <a href=\"#base-url-by-api-environment\">Base URL by API environment</a>.</p></div></div>\n<h2 style=\"position:relative;\"><a href=\"#components-of-a-base-url\" aria-label=\"components of a base url permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"components-of-a-base-url\"></div>Components of a base URL</h2>\n<p>A base URL includes the HTTPS protocol, the <code class=\"language-text\">[domainPrefix]</code>, and the domain. A <code class=\"language-text\">[domainPrefix]</code> refers to a segment of the base URL that's variable depending on the API and environment.</p>\n<!--- Each API has its own unique URL and these are the general components:\n\n ![baseurl](../../images/baseurl.png) -->\n<p>This example uses the  <code class=\"language-text\">test</code> environment using the Ripple Payments API:</p>\n\n      <div class=\"code-snippets-tabs\" >\n    <div class=\"snippets-tabs-headers\">\n      <span class=\"tab-header active\" data-lang=\"https\" data-snippet-id=\"URL-format\">URL format</span><span class=\"tab-header \" data-lang=\"http\" data-snippet-id=\"Example-URL\">Example URL</span>\n    </div>\n    <div class=\"snippets-tabs-contents\">\n      <div class=\"tab-content active\" data-lang=\"https\" data-snippet-id=\"URL-format\"><div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"58518205754729990000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`https://{domainPrefix}.{domain}/{apiVersion}/{path}?{parameters}`, `58518205754729990000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-58518205754729990000\">Copied!</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"https\"><pre class=\"language-https\"><code class=\"language-https\">https://{domainPrefix}.{domain}/{apiVersion}/{path}?{parameters}</code></pre></div>\n      </div></div><div class=\"tab-content \" data-lang=\"http\" data-snippet-id=\"Example-URL\"><div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"13454177983010095000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`https://api.test.ripple.com/v2/identities`, `13454177983010095000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-13454177983010095000\">Copied!</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"http\"><pre class=\"language-http\"><code class=\"language-http\"><span class=\"token header\"><span class=\"token header-name keyword\">https</span><span class=\"token punctuation\">:</span><span class=\"token header-value\">//api.test.ripple.com/v2/identities</span></span></code></pre></div>\n      </div></div>\n    </div></div>\n    \n<p>The following table describes each component of a complete API request:</p>\n<table>\n<thead>\n<tr>\n<th><div style=\"width:120px\">Field</div></th>\n<th><div style=\"width:180px\">Example value</div></th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Protocol</strong></td>\n<td><code class=\"language-text\">https</code></td>\n<td>Ripple uses the HTTPS protocol for all APIs.</td>\n</tr>\n<tr>\n<td><strong>Domain Prefix</strong></td>\n<td><code class=\"language-text\">api.test</code></td>\n<td>Each base URL is prefixed by <code class=\"language-text\">api</code> followed by an optional <a href=\"#base-url-by-api-environment\">API environment</a>.<br/><br/><strong>Example</strong>: This example uses the <code class=\"language-text\">api.test</code> environment.</td>\n</tr>\n<tr>\n<td><strong>Domain</strong></td>\n<td><code class=\"language-text\">ripple.com</code></td>\n<td>The Ripple Payments API uses <code class=\"language-text\">ripple.com</code> as the domain.</td>\n</tr>\n<tr>\n<td><strong>API Version</strong></td>\n<td><code class=\"language-text\">/v2</code></td>\n<td>The latest Ripple Payments API version is <code class=\"language-text\">/v2</code>.</td>\n</tr>\n<tr>\n<td><strong>Path</strong></td>\n<td><code class=\"language-text\">/identities</code></td>\n<td>The path is appended to the base URL to reach the endpoint for the API operation.<br><br>This example targets the <code class=\"language-text\">/v2/identities</code> endpoint.</td>\n</tr>\n</tbody>\n</table>\n<!-- Commenting out the parameters section until we have a clean Pagination implementation -->\n<!-- | **Parameters** | `page=0&size=100` | Apply any required or optional query parameters for your API operation.<br><br>This example uses [pagination](pagination.md) to start on the first page with 100 results per page. | -->\n<h2 style=\"position:relative;\"><a href=\"#base-url-for-ripple-payments-api\" aria-label=\"base url for ripple payments api permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"base-url-for-ripple-payments-api\"></div>Base URL for Ripple Payments API</h2>\n<p>The Ripple Payments API includes a domain prefix that consists of <code class=\"language-text\">api.{environment}</code>.</p>\n<div class=\"admonition admonition-attention\"><div class=\"admonition-heading\"><h5><span class=\"admonition-icon\"><i></i></span>Note</h5></div><div class=\"admonition-content\"><p>The production environment does not have an environment variable.</p></div></div>\n<p>You can use Ripple Payments APIs in the following environments:</p>\n<ul>\n<li>\n<strong>Test</strong>\n : Simulated partners and simulated currency.\n</li>\n<li>\n<strong>Production</strong>\n : Production environment with actual partners and currency.\n</li>\n</ul>\n<h2 style=\"position:relative;\"><a href=\"#base-url-by-api-environment\" aria-label=\"base url by api environment permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"base-url-by-api-environment\"></div>Base URL by API environment</h2>\n<div class=\"admonition admonition-success\"><div class=\"admonition-heading\"><h5><span class=\"admonition-icon\"><i></i></span>Tokens are unique per environment</h5></div><div class=\"admonition-content\"><p>In addition to unique base URLs, access tokens are also unique per environment. Be sure to <a href=\"/payments-direct-2/api-docs/best-practices/authentication/#request-the-access-token\">request the access token</a> for the desired environment.</p></div></div>\n<table>\n<thead>\n<tr>\n<th>Environment</th>\n<th><div style=\"width:120px;\">Domain Prefix</div></th>\n<th>Domain</th>\n<th>Base URL</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Test</td>\n<td><code class=\"language-text\">api.test.</code></td>\n<td><code class=\"language-text\">ripple.com</code></td>\n<td><code class=\"language-text\">https://api.test.ripple.com/v2</code></td>\n</tr>\n<tr>\n<td>Production</td>\n<td><code class=\"language-text\">api.</code></td>\n<td><code class=\"language-text\">ripple.com</code></td>\n<td><code class=\"language-text\">https://api.ripple.com/v2</code></td>\n</tr>\n</tbody>\n</table>\n<p><strong>Note</strong>: The following examples use <code class=\"language-text\">test</code> environment.</p>\n\n      <div class=\"code-snippets-tabs\" >\n    <div class=\"snippets-tabs-headers\">\n      <span class=\"tab-header active\" data-lang=\"https\" data-snippet-id=\"URL-Formatlesstdgreater-lesstdgreater\">URL Format<td> </td></span><span class=\"tab-header \" data-lang=\"https\" data-snippet-id=\"Example-Base-URLlesstdgreater-lesstdgreater\">Example Base URL<td> </td></span><span class=\"tab-header \" data-lang=\"https\" data-snippet-id=\"Example-fully-qualified-URLlesstdgreater-lesstdgreater\">Example fully-qualified URL<td> </td></span>\n    </div>\n    <div class=\"snippets-tabs-contents\">\n      <div class=\"tab-content active\" data-lang=\"https\" data-snippet-id=\"URL-Formatlesstdgreater-lesstdgreater\"><div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"28499996629161763000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`https://{domainPrefix}.{domain}/{path}?{parameters}\n\n# This is the URL format.`, `28499996629161763000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-28499996629161763000\">Copied!</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"https\"><pre class=\"language-https\"><code class=\"language-https\">https://{domainPrefix}.{domain}/{path}?{parameters}\n\n# This is the URL format.</code></pre></div>\n      </div></div><div class=\"tab-content \" data-lang=\"https\" data-snippet-id=\"Example-Base-URLlesstdgreater-lesstdgreater\"><div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"98129362692031230000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`https://api.test.ripple.com/\n\n# This is the base URL for the test environment.`, `98129362692031230000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-98129362692031230000\">Copied!</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"https\"><pre class=\"language-https\"><code class=\"language-https\">https://api.test.ripple.com/\n\n# This is the base URL for the test environment.</code></pre></div>\n      </div></div><div class=\"tab-content \" data-lang=\"https\" data-snippet-id=\"Example-fully-qualified-URLlesstdgreater-lesstdgreater\"><div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"68726409794747110000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`https://api.test.ripple.com/v2/identities\n\n# This connects to the test environment and requests a list of identities.`, `68726409794747110000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-68726409794747110000\">Copied!</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"https\"><pre class=\"language-https\"><code class=\"language-https\">https://api.test.ripple.com/v2/identities\n\n# This connects to the test environment and requests a list of identities.</code></pre></div>\n      </div></div>\n    </div></div>\n    ","headings":[{"value":"Base URLs","depth":1},{"value":"Components of a base URL","depth":2},{"value":"Base URL for Ripple Payments API","depth":2},{"value":"Base URL by API environment","depth":2}]},"contentItem":{"data":{"lastModified":"2025-11-13T00:24:58.000Z","enableToc":null,"disableLastModified":null,"tocMaxDepth":null,"requestLogin":false}},"siteConfig":{"enableToc":false,"disableLastModified":true,"tocMaxDepth":4}},"pageContext":{"matchPath":"","id":"2523a9aa-cd50-5ddc-a520-69053beda348__redocly content/api-docs/best-practices/base-urls/","seo":{"title":"Base URLs","description":null,"image":"","keywords":null,"jsonLd":null,"lang":null,"siteUrl":null},"pageId":"api-docs/best-practices/base-urls.md","pageBaseUrl":"/api-docs/best-practices/base-urls","type":"markdown","toc":{"enable":true,"maxDepth":4,"headings":[{"depth":1,"value":"Base URLs","id":"base-urls"},{"depth":2,"value":"Components of a base URL","id":"components-of-a-base-url"},{"depth":2,"value":"Base URL for Ripple Payments API","id":"base-url-for-ripple-payments-api"},{"depth":2,"value":"Base URL by API environment","id":"base-url-by-api-environment"}]},"data":{"title":""},"catalogInfo":null,"link":"/api-docs/best-practices/base-urls/","sidebarName":"__root-sidebar__-data-69308394-sidebars.yaml","isLanding":false,"showPrevButton":null,"showNextButton":null,"apiVersions":null,"apiVersionId":null,"isDefaultApiVersion":null}},"staticQueryHashes":["1123603147","1302185487","1344209882","1398840060","1520077861","1975142765","2667623876","2950305614","3240152602","3743992808","561138138"]}