Skip to main content

Connections
Enterprise

Create Connection

Creates a new connections based on a Connection Formula, once created a connection is available for use in transactions.

POST
https://api.basistheory.com/orchestration/connections
Copy

Permissions

orchestration:connections:create

Request

module "basistheory_orchestration_connection" "example_connection" {
connection_formula_id = "stripe"
method = "card"
display_name = "Stripe (Production)"
accepted_countries = ["US", "GB", "DE"]
accepted_currencies = ["EUR", "USD", "GBP"]
active = true

fields = [
{
key = "private_key"
value = "sk_test_26PHem9A..."
}
// All required fields for the connection formula
]
}

Request Parameters

ParameterRequiredTypeDefaultDescription
connection_formula_idtruestringThe connection formula to use to create the connection
methodtruestringType of connection.
display_nametruestringName to identify the connection.
fieldstruearrayFields needed to meet the requirements of the connection formula
accepted_countriestruearrayCountries to support with connection
accepted_currenciestruearrayCurrencies to support with connection
activetruebooleantrueDetermines if the connection is usable for transactions.

Response

Returns a connection object if the connection was created. Returns an error if there were validation errors.

{
"id": "faaad066-30b4-4997-a438-242b0752d7e1",
"connection_formula_id": "stripe",
"display_name": "Stripe (Production)",
"status": "pending",
"accepted_countries": [
"US",
"GB",
"DE"
],
"accepted_currencies": [
"EUR",
"USD",
"GBP"
],
"three_d_secure_enabled": true,
"active": true
}

Delete Connection

DELETE
https://api.basistheory.com/orchestration/connections/{id}
Copy

Permissions

orchestration:connections:delete

Request

curl "https://api.basistheory.com/orchestration/connections/c06d0789-0a38-40be-b7cc-c28a718f76f1" \
-H "BT-API-KEY: <API_KEY>" \
-X "DELETE"

URL Parameters

ParameterRequiredTypeDescription
connection_idtrueuuidExisting connection id

Update Connection

PUT
https://api.basistheory.com/orchestration/connections/{id}
Copy

Permissions

orchestration:connections:update

Request

curl "https://api.basistheory.com/orchestration/connections/c06d0789-0a38-40be-b7cc-c28a718f76f1" \
-H "BT-API-KEY: <API_KEY>" \
-H "Content-Type: application/json" \
-X "POST" \
-d '{
"connection_formula_id": "stripe",
"method": "card",
"display_name": "Stripe (Production)",
"fields": [
{
"key": "private_key",
"value": "sk_test_26PHem9AhJZvU623DfE1x4sd"
}
],
"accepted_countries": [
"US",
"GB",
"DE"
],
"accepted_currencies": [
"EUR",
"USD",
"GBP"
],
"active": true,
}'

URL Parameters

ParameterRequiredTypeDescription
connection_idtrueuuidExisting connection id

Request Parameters

ParameterRequiredTypeDefaultDescription
connection_formula_idtruestringThe connection formula to use to create the connection
methodtruestringType of connection.
display_nametruestringName to identify the connection.
fieldstruearrayFields needed to meet the requirements of the connection formula
accepted_countriestruearrayCountries to support with connection
accepted_currenciestruearrayCurrencies to support with connection
activetruebooleantrueDetermines if the connection is usable for transactions.

Response

{
"id": "faaad066-30b4-4997-a438-242b0752d7e1",
"connection_formula_id": "stripe",
"display_name": "Stripe (Production)",
"method": "card",
"status": "pending",
"accepted_countries": [
"US",
"GB",
"DE"
],
"accepted_currencies": [
"EUR",
"USD",
"GBP"
],
"three_d_secure_enabled": true,
"active": true,
}

List Connections

PUT
https://api.basistheory.com/orchestration/connections
Copy

Permissions

orchestration:connections:update

Request

curl "https://api.basistheory.com/orchestration/connections" -H "BT-API-KEY: <API_KEY>"

Response

[
{
"id": "faaad066-30b4-4997-a438-242b0752d7e1",
"connection_formula_id": "stripe",
"display_name": "Stripe (Production)",
"method": "card",
"status": "pending",
"accepted_countries": [
"US",
"GB",
"DE"
],
"accepted_currencies": [
"EUR",
"USD",
"GBP"
],
"three_d_secure_enabled": true,
"active": true,
},
]

Resources

Connection Object

ParameterTypeDescription
idstringUnique identifier for the connection
connection_formula_idstringThe connection formula to use to create the connection
display_namestringName to identify the connection.
fieldsarrayFields needed to meet the requirements of the connection formula
accepted_countriesarrayCountries to support with connection
accepted_currenciesarrayCurrencies to support with connection
activebooleanDetermines if the connection is usable for transactions.
statusenumReturns if connection is available, failed, or pending
three_d_secure_enabledbooleanDetermines if 3D Secure is enabled for the connection