Skip to main content

Test Tenants

Overview​

Test Tenants run in a dedicated environment separate from production, giving you dedicated infrastructure for load testing, integration testing, and development work without any impact on production traffic.

All Test Tenants (tenants with type: "test") were migrated to this dedicated environment, hosted in the United States region, on March 30, 2026. The separation gives better resource isolation and performance for both your testing and production workloads.

Critical Actions Required​

The migration completed on March 30, 2026. Review the following changes for your Test Tenant traffic.

Update API Endpoints​

Action Required: Send all Test Tenant API calls to api.test.basistheory.com instead of api.basistheory.com

Always use api.test.basistheory.com for Test Tenants. api.basistheory.com is for Production Tenants only.

See Update API Endpoints for detailed implementation examples.

Update Webhook Signature Verification​

Action Required: Update webhook signature verification to support the Test Tenant signing key

Test Tenant webhooks use their own signature version (v1-test) with a different signing key. Your webhook handlers must verify signatures using the appropriate key based on the BT-SIGNATURE-VERSION header.

See Webhook Signatures for detailed implementation examples.

Whitelist New IP Addresses​

Action Required: Add Test Tenant IP addresses to third-party system allowlists

The Test Tenant environment uses different IP addresses for outbound traffic. These must be added to any third-party vendor systems (e.g., payment processors, webhook consumers) that have IP allowlists configured.

Test Tenant IP Addresses:

  • 18.191.73.1
  • 52.13.142.52

See the complete list at IP Addresses.

PCI Compliance Warning​

The Test Tenant environment is NOT PCI compliant. Do not store real or live consumer data in Test Tenants.

Test Tenants should only contain synthetic, non-production data. If you require PCI-compliant testing capabilities, please contact Basis Theory Support to obtain a Production Tenant.

Migration Details​

Impact on Production Tenants: None. Production tenants were unaffected by this migration and required no changes.

Impact on Test Tenants: Only Test Tenant requests were affected during the maintenance window.

When: March 30, 2026 at 15:00 UTC

Duration: Approximately 1 hour maintenance window

Data that was not migrated:

  • CVCs on card tokens that were set to expire within 30 days
  • Tokens that were expiring within 30 days
  • Token intents that were expiring within 30 days

Region Changes:

  • All Test Tenants, including those that were in the EU region, were migrated to the United States region
  • Test Tenants are only available in the United States region

Required Changes​

Update API Endpoints​

All API calls for Test Tenant traffic should use the base URL api.test.basistheory.com

This applies to all API requests for Test Tenants including:

  • Direct API calls made with your own HTTP client
  • API calls made with older SDK versions (upgrade to latest version for test environment support)
  • Proxy invocations
  • Reactor invocations

Using SDKs​

If you're using Basis Theory SDKs, upgrade to the latest version and specify the test environment:

import { BasisTheoryClient, BasisTheoryEnvironment } from "@basis-theory/node-sdk";

const client = new BasisTheoryClient({
apiKey: "YOUR_API_KEY",
environment: BasisTheoryEnvironment.Test
});
Ensure you're using the latest version of the Basis Theory SDK for your language to access Test Tenant environment support.

Using Direct API Calls​

If you're making direct API calls, update the base URL in your requests:

curl "https://api.test.basistheory.com/tokens" \
-H "BT-API-KEY: YOUR_API_KEY"

Using Elements​

Elements follow the same pattern as SDKs. Ensure you're using the latest version and configure Elements to point to the test environment. Refer to the Elements documentation for your platform.

API keys and authentication created before the migration continue to work. No credential changes are required.

Using Reactors and Proxy Code Transforms​

If your Reactors, Proxy Request Code Transforms, or Proxy Response Code Transforms make calls back to the Basis Theory API, you may need to update them depending on how you're making those calls.

Using req.bt (pre-configured instance)

If you're using the pre-configured req.bt instance that is automatically injected when your Reactor has an associated application, no changes are required. The instance automatically routes to the correct environment.

module.exports = async function (req) {
const { bt, args } = req;

// No changes needed - bt automatically uses the correct environment
const token = await bt.tokens.create({
type: "token",
data: args.data,
});

return { raw: token };
};

Manual SDK instantiation with @basis-theory/node-sdk-2

If you're manually instantiating the BasisTheory client, pass applicationOptions.baseUrl to the baseUrl option:

const { BasisTheoryClient } = require("@basis-theory/node-sdk-2");

module.exports = async function (req) {
const {
applicationOptions: { apiKey, baseUrl },
args,
} = req;

const client = new BasisTheoryClient({ apiKey, baseUrl });

const token = await client.tokens.create({
type: "token",
data: args.data,
});

return { raw: token };
};

Using HTTP clients with hardcoded URLs

If you're using HTTP clients (such as axios, node-fetch, or Node.js https) with hardcoded Basis Theory API URLs, update them to use https://api.test.basistheory.com:

const fetch = require("node-fetch");

module.exports = async function (req) {
const {
applicationOptions: { apiKey },
args,
} = req;

const response = await fetch("https://api.test.basistheory.com/tokens", {
method: "POST",
headers: {
"BT-API-KEY": apiKey,
"Content-Type": "application/json",
},
body: JSON.stringify({
type: "token",
data: args.data,
}),
});

return { raw: await response.json() };
};
Alternatively, you can use req.applicationOptions.baseUrl as your base URL to automatically use the correct environment without hardcoding.

IP Address Allowlisting​

The Test Tenant environment uses dedicated IP addresses for all outbound network traffic. If you have IP allowlists configured in third-party systems, you must add these IP addresses:

Test Tenant IP Addresses (North America):

  • 18.191.73.1
  • 52.13.142.52

View the complete list of IP addresses for all environments at IP Addresses.

Without proper IP allowlisting, Test Tenant traffic to third-party systems and webhook callbacks will fail.

Webhook Signatures​

Test Tenant webhooks use their own signature version so you can verify webhooks are coming from the correct environment. Your webhook verification logic must dynamically select the appropriate signing key.

Test Signature Version​

Test Tenant webhooks include BT-SIGNATURE-VERSION: v1-test in the headers, while production webhooks use BT-SIGNATURE-VERSION: v1.

Signing Keys:

  • Production Tenants: https://cdn.basistheory.com/keys/webhooks.v1.key
  • Test Tenants: https://cdn.basistheory.com/keys/webhooks.v1-test.key

Dynamic Verification Implementation​

Update your webhook handlers to dynamically verify signatures based on the BT-SIGNATURE-VERSION header:

Dynamic Webhook Signature Verification
const crypto = require('crypto');
const stringify = require('json-stable-stringify');

// Cache the signing keys
const signingKeys = {
'v1': null, // Production key
'v1-test': null // Test Tenant key
};

const getSigningKey = async (version) => {
// Return cached key if available
if (signingKeys[version]) {
return signingKeys[version];
}

// Fetch and cache the key
const keyUrls = {
'v1': 'https://cdn.basistheory.com/keys/webhooks.v1.key',
'v1-test': 'https://cdn.basistheory.com/keys/webhooks.v1-test.key'
};

const response = await fetch(keyUrls[version]);
const key = await response.text();
signingKeys[version] = key;

return key;
};

const verifyWebhook = async (webhookRequest) => {
const body = JSON.parse(webhookRequest.request.body);
const signature = webhookRequest.request.headers['BT-SIGNATURE'];
const signatureVersion = webhookRequest.request.headers['BT-SIGNATURE-VERSION'];

// Get the appropriate signing key based on version
const publicKey = await getSigningKey(signatureVersion);

const verifier = crypto.createVerify('SHA256');
verifier.update(stringify(body));

const isVerified = verifier.verify(
{
key: publicKey,
padding: crypto.constants.RSA_PKCS1_PSS_PADDING,
},
Buffer.from(signature, 'base64')
);

return isVerified;
};
Production webhooks use the v1 signature. Only Test Tenant webhooks use the v1-test signature.

Benefits of Dedicated Test Tenant Environment​

Dedicated Testing Resources​

The dedicated Test Tenant environment provides isolated infrastructure for testing workloads, including:

  • Load Testing: Conduct performance and load tests without impacting production systems
  • Integration Testing: Test full integrations in isolation
  • Development: Develop and test new features without production concerns

Transparent Operation​

After completing the required changes above, Test Tenants operate transparently:

  • New Test Tenants are automatically created in the dedicated environment (no environment selection needed)
  • All existing API keys and authentication continue to work
  • No ongoing environment management required

No Production Impact​

Production tenants are completely unaffected:

  • No changes required for production tenant traffic
  • Continue using api.basistheory.com for production tenants
  • No migration or maintenance window for production data

Post-Migration Behavior​

With the migration complete and your endpoints updated:

  1. All Test Tenant traffic automatically routes to the dedicated environment at api.test.basistheory.com
  2. New Test Tenants are automatically created in the dedicated environment in the United States region (no additional configuration needed)
  3. Existing authentication continues working without any credential changes
  4. Test Tenant data is accessible with full functionality

Support​

If you have any questions or concerns, please reach out to Basis Theory Support:

If you require PCI-compliant testing capabilities, please contact Basis Theory Support to obtain a Production Tenant for testing purposes.