Skip to main content

node-bt

The node-bt runtime image is the default runtime, running on Node.js 16 with a curated set of whitelisted dependencies. Reactors and Proxy Transforms created without specifying a runtime object automatically use node-bt.

Getting Started

The node-bt runtime is used by both Reactors and Proxy Transforms. For API details on creating and managing these resources, see:

Dependencies

The node-bt runtime can only use packages from the whitelisted dependencies listed below.

If you need packages not listed here, use node22 which allows any npm package or contact support@basistheory.com.

List of available dependencies

This is a list of the dependencies that are available to use within a node-bt runtime. You'll need to require the module name in "Require in Reactors" below to import the corresponding package. For example, using require('@basis-theory/node-sdk-2') to import @basis-theory/node-sdk module.

PackageRequire in Reactors (if different from package name)Version
@adyen/api-library^10.3.0
@basis-theory/apple-pay-js^2.0.2
@basis-theory/basis-theory-js^1.80.0
@basis-theory/google-pay-js^1.0.0
@basis-theory/node-sdk@basis-theory/node-sdk-2~2
@basis-theory/shopify-js^1.0.0
archiver^5.0.0
aws-sdk^2.1478.0
axios^0.30.2
braintree^3.18.0
crypto-js^4.2.0
csv-parse^5.5.2
dropbox^10.34.0
dwolla-v2^3.4.0
exceljs^4.4.0
fast-xml-parser^4.4.1
https-proxy-agent^7.0.2
json-stable-stringify^1.1.1
jsonpath^1.1.1
jszip^3.10.1
mastercard-client-encryption^1.9.0
mastercard-oauth1-signer^1.1.6
node-adyen-encrypt^2.3.1
node-fetch^2.7.0
node-forge^1.3.1
node-jose^2.2.0
openpgp^5.11.3
p-limit^3.1.0
pdf-lib^1.17.1
pdfkit^0.13.0
snakecase-keys^5.5.0
soap^1.0.0
split2^4.2.0
ssh2^1.14.0
stripe^8.222.0
tesseract.js^4.1.4
twilio^4.19.2
uuid^8.3.2
xmlbuilder2^3.0.2
yup^1.3.2

List of available built-in node dependencies

This is a list of the built-in node dependencies that are available to use within a node-bt runtime. You'll need to require the module name in "Require in Reactors" below to import the corresponding package. For example, using require('buffer') to import node:buffer module.

Require in ReactorsNode Package
buffernode:buffer
cryptonode:crypto
httpsnode:https
querystringnode:querystring
streamnode:stream

Asynchronous Reactors
Enterprise

Invoke a node-bt Reactor through /react-async, sending the Reactor input within args. The Reactor receives this input as req.args.

The endpoint validates the request, then returns 202 Accepted with a request ID without waiting for execution to finish. The reactor.completed event is raised when execution succeeds, and reactor.failed is raised when it fails or times out. See Rate Limits for the execution timeout.

Use the Reactor ID and request ID from the invocation response or webhook event to retrieve the result. The webhook does not include the full response.

See Invoke Async Reactors for request bodies, SDK examples, polling, and result contracts.

Legacy Callback URL
Enterprise
DEPRECATED

This functionality is deprecated and will be removed at some time in the future.

Legacy node-bt Reactors can be invoked asynchronously by providing a callback_url parameter within the request. The Reactor performs synchronous validation, then returns 202 Accepted.

Your Reactor code will then be asynchronously executed in our serverless compute environment for up to 5 minutes. If the timeout period is exceeded, the Reactor will be terminated and you will receive a callback containing a Reactor Runtime Error indicating that a timeout occurred.

Once the Reactor is completed, the response from the Reactor code will be delivered in the body of an HTTP POST request to your callback_url.

Your callback endpoint must be hosted using HTTPS and should respond with a 2xx status code after receiving the message. If your servers fail to respond with a 2xx status code, delivery will be retried up to 10 times with exponential backoff over the next ~2.5 hours.

Any errors that occur while executing the Reactor will be delivered to the callback_url. See Reactor Error Handling for details.

curl "https://api.basistheory.com/reactors/5b493235-6917-4307-906a-2cd6f1a90b13/react" \
-H "BT-API-KEY: <PRIVATE_API_KEY>" \
-X "POST" \
-d '{
"args": {
"card": "{{fe7c0a36-eb45-4f68-b0a0-791de28b29e4}}",
"customer_id": "myCustomerId1234"
},
"callback_url": "https://my-service.com/webhooks/transactions/b1d16efc-f613-45af-a1d5-57b07ddd741b"
}'

Migrating to node22

If you need features not available in node-bt (custom dependencies, configurable resources, structured logging), consider migrating to node22.

For a detailed comparison between runtimes, see the Runtime comparison table.