Skip to main content

Tenant Merchants

Tenant Merchants enable organizations with multiple business units, regional entities, or sub-merchants to manage independent service configurations within a single Tenant. Each Tenant Merchant holds its own merchant details, card network identifiers, and per-service onboarding state for services like Account Updater and Network Tokens.

Create Tenant Merchant

Create a Tenant Merchant within the Tenant.

POST
https://api.basistheory.com/tenants/{tenantId}/merchants
Copy

Permissions

tenant:merchant:create

Request

curl "https://api.basistheory.com/tenants/e4e865b2-304e-4179-a040-9f8b3cd8bedb/merchants" \
-H "BT-API-KEY: <MANAGEMENT_API_KEY>" \
-H "Content-Type: application/json" \
-X "POST" \
--data '{
"name": "Acme",
"details": {
"merchant": {
"full_legal_name": "Acme, Inc.",
"doing_business_as": "Acme",
"parent_company_name": "Acme Holdings",
"website_url": "https://www.acme.com",
"category_code_mcc": "5734",
"descriptor": "ACME.COM",
"business_description": "Online software and digital goods",
"registration": {
"registration_type": "EIN",
"registration_id": "12-3456789"
},
"contact": {
"name": "Jane Doe",
"title": "Head of Payments",
"phone_number": "+14155552671",
"email": "jane@acme.com"
},
"address": {
"street_1": "123 Main Street",
"city": "Anytown",
"state_province": "CA",
"postal_code": "94016",
"country": "US"
}
},
"card_network_info": {
"visa": { "acquirer_bin": "400000", "card_acceptor_id_caid": "123456789012345" },
"mastercard": { "merchant_id_mid": "987654321" },
"amex": { "se_number": "1234567890" },
"discover": { "merchant_id_mid": "555555555" }
}
}
}'

URI Parameters

ParameterRequiredTypeDefaultDescription
tenantIdtrueuuidnullThe ID of the Tenant

Request Parameters

AttributeRequiredTypeDefaultDescription
nametruestringnullDisplay name of the Tenant Merchant. Must be unique within the Tenant.
detailsfalsemerchant detailsnullMerchant information and card network identifiers used to onboard services.

Response

Returns a Tenant Merchant if created successfully. Returns an error if there were validation errors, the Tenant was not found, or creation failed.

Errors

StatusDescription
400The request body failed validation.
404The Tenant was not found.
409A Tenant Merchant with the same name already exists in the Tenant.

List Tenant Merchants

Get a list of Tenant Merchants for the Tenant.

GET
https://api.basistheory.com/tenants/{tenantId}/merchants
Copy

Permissions

tenant:merchant:read

Request

curl "https://api.basistheory.com/tenants/e4e865b2-304e-4179-a040-9f8b3cd8bedb/merchants" \
-H "BT-API-KEY: <MANAGEMENT_API_KEY>"

URI Parameters

ParameterRequiredTypeDefaultDescription
tenantIdtrueuuidnullThe ID of the Tenant

Query Parameters

ParameterRequiredTypeDefaultDescription
pagefalseinteger1Page number of the results to return.
sizefalseinteger20Number of the results to return per page. Maximum size of 50 results.

Response

Returns a paginated object with the data property containing an array of Tenant Merchants. Returns an error if Tenant Merchants could not be retrieved.

The details field is omitted from the response when it has not been set on the Tenant Merchant.

{
"pagination": {...},
"data": [
{
"id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"tenant_id": "8f1b2c3d-4e5f-6789-0abc-def012345678",
"name": "Acme",
"details": {
"merchant": { ... },
"card_network_info": { ... }
},
"services": {
"account_updater": { "status": "active", "card_network_status": { ... } },
"network_token": { "status": "onboarding", "card_network_status": { ... } }
},
"created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2024-12-01T10:30:00+00:00",
"modified_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"modified_at": "2024-12-15T14:22:00+00:00"
},
{...},
{...}
]
}

Get a Tenant Merchant

Get a Tenant Merchant by ID in the Tenant.

GET
https://api.basistheory.com/tenants/{tenantId}/merchants/{merchantId}
Copy

Permissions

tenant:merchant:read

Request

curl "https://api.basistheory.com/tenants/e4e865b2-304e-4179-a040-9f8b3cd8bedb/merchants/d290f1ee-6c54-4b01-90e6-d701748f0851" \
-H "BT-API-KEY: <MANAGEMENT_API_KEY>"

URI Parameters

ParameterRequiredTypeDefaultDescription
tenantIdtrueuuidnullThe ID of the Tenant
merchantIdtrueuuidnullThe ID of the Tenant Merchant

Response

Returns a Tenant Merchant with the id provided. Returns an error if the Tenant Merchant could not be retrieved.

Update Tenant Merchant

Update a Tenant Merchant's name and/or details.

PATCH
https://api.basistheory.com/tenants/{tenantId}/merchants/{merchantId}
Copy

Permissions

tenant:merchant:update

Request

curl "https://api.basistheory.com/tenants/e4e865b2-304e-4179-a040-9f8b3cd8bedb/merchants/d290f1ee-6c54-4b01-90e6-d701748f0851" \
-H "BT-API-KEY: <MANAGEMENT_API_KEY>" \
-H "Content-Type: application/json" \
-X "PATCH" \
-d '{
"name": "Acme",
"details": {
"merchant": { "...": "..." },
"card_network_info": { "...": "..." }
}
}'

URI Parameters

ParameterRequiredTypeDefaultDescription
tenantIdtrueuuidnullThe ID of the Tenant
merchantIdtrueuuidnullThe ID of the Tenant Merchant

Request Parameters

AttributeRequiredTypeDefaultDescription
namefalsestringnullDisplay name of the Tenant Merchant.
detailsfalsemerchant detailsnullMerchant information and card network identifiers.

Response

Returns the updated Tenant Merchant. Returns an error if the Tenant or Tenant Merchant could not be found, or if the update failed validation.

Delete Tenant Merchant

Delete a Tenant Merchant by ID from the Tenant.

DELETE
https://api.basistheory.com/tenants/{tenantId}/merchants/{merchantId}
Copy

Permissions

tenant:merchant:delete

Request

curl "https://api.basistheory.com/tenants/e4e865b2-304e-4179-a040-9f8b3cd8bedb/merchants/d290f1ee-6c54-4b01-90e6-d701748f0851" \
-H "BT-API-KEY: <MANAGEMENT_API_KEY>" \
-X "DELETE"

URI Parameters

ParameterRequiredTypeDefaultDescription
tenantIdtrueuuidnullThe ID of the Tenant
merchantIdtrueuuidnullThe ID of the Tenant Merchant

Response

Returns the deleted Tenant Merchant. Returns an error if the Tenant Merchant could not be deleted.

Request Service Onboarding

Request onboarding for one or more services (e.g., Account Updater, Network Tokens) across specific card networks. The system validates the required card network identifiers, registers the merchant with the upstream provider, and updates the service status to onboarding until activation completes.

POST
https://api.basistheory.com/tenants/{tenantId}/merchants/{merchantId}/services
Copy

Permissions

tenant:merchant:update

Request

curl "https://api.basistheory.com/tenants/e4e865b2-304e-4179-a040-9f8b3cd8bedb/merchants/d290f1ee-6c54-4b01-90e6-d701748f0851/services" \
-H "BT-API-KEY: <MANAGEMENT_API_KEY>" \
-H "Content-Type: application/json" \
-X "POST" \
-d '{
"account_updater": ["visa", "mastercard"],
"network_token": ["visa"],
"card_network_info": {
"visa": { "acquirer_bin": "400000", "card_acceptor_id_caid": "123456789012345" },
"mastercard": { "merchant_id_mid": "987654321" },
"amex": { "se_number": "1234567890" },
"discover": { "merchant_id_mid": "555555555" }
}
}'

URI Parameters

ParameterRequiredTypeDefaultDescription
tenantIdtrueuuidnullThe ID of the Tenant
merchantIdtrueuuidnullThe ID of the Tenant Merchant

Request Parameters

AttributeRequiredTypeDefaultDescription
account_updaterfalsestring[]nullCard networks to onboard for Account Updater. Valid values: visa, mastercard, amex, discover.
network_tokenfalsestring[]nullCard networks to onboard for Network Tokens. Valid values: visa, mastercard, amex, discover.
card_network_infoconditionalcard network infonullCard network identifiers. Required for any network being onboarded that doesn't already have identifiers stored on the merchant. Values provided here are persisted back to the merchant.
At least one service (account_updater or network_token) must be specified with one or more networks.

Response

Returns the updated Tenant Merchant with the requested services reflecting onboarding status on the requested networks.

Errors

StatusDescription
400Missing card network info for one or more requested networks.
404The Tenant or Tenant Merchant was not found.
409One or more (service, network) pairs are already in onboarding or active status.

Tenant Merchant Object

AttributeTypeDescription
iduuidUnique identifier of the Tenant Merchant.
tenant_iduuidThe Tenant ID that this Merchant belongs to.
namestringDisplay name of the Tenant Merchant. Each Tenant Merchant within a Tenant must have a unique name.
detailsmerchant detailsMerchant information and card network identifiers collected at creation or update time.
servicesservicesPer-service and per-network onboarding state (e.g., Account Updater, Network Tokens).
created_byuuid(Optional) The ID of the User or Application that created the Tenant Merchant.
created_atdate(Optional) Created date of the Tenant Merchant in ISO 8601 format.
modified_byuuid(Optional) The ID of the User or Application that last modified the Tenant Merchant.
modified_atdate(Optional) Last modified date of the Tenant Merchant in ISO 8601 format.

Merchant Details Object

The details object groups merchant information and card network identifiers.

AttributeTypeDescription
merchantmerchant infoCore business information for the merchant.
card_network_infocard network infoCard network identifiers (BIN, CAID, MID, SE number) used when onboarding services.

Merchant Info Object

AttributeRequiredTypeDescription
full_legal_nametruestringFull legal name of the business.
doing_business_asfalsestringDoing Business As (DBA) name.
parent_company_namefalsestringParent company name, if applicable.
website_urltruestringMerchant website URL.
category_code_mcctruestringMerchant Category Code (MCC). Must be exactly four digits.
descriptortruestringMerchant descriptor as shown on statements. Maximum length 150.
business_descriptionfalsestringShort description of the merchant's line of business.
registrationtrueregistrationBusiness registration information.
contacttruecontactPrimary contact for the merchant.
addresstrueaddressPhysical address of the merchant.

Registration Object

AttributeRequiredTypeDescription
registration_typetruestringType of business registration. Must be one of: ABN, ACN, CNPJ, BN, DIC, ICO, CVR, CRN, SIREN, SIRET, CR, CF, RC, KvK, GST, NZBN, BIR, KRS, NIP, REGON, BRN, UEN, CIF, NIF, ROC, EIN, VAT.
registration_idtruestringBusiness registration identifier.
vat_idconditionalstringVAT Identification Number. Required in jurisdictions that use VAT.

Contact Object

AttributeRequiredTypeDescription
nametruestringPrimary contact name.
titlefalsestringPrimary contact's job title.
phone_numbertruestringPrimary contact phone number in E.164 format (e.g., +14155552671).
emailtruestringPrimary contact email address.

Address Object

AttributeRequiredTypeDescription
street_1truestringStreet address line 1. Maximum length 100.
street_2falsestringStreet address line 2. Maximum length 100.
citytruestringCity. Maximum length 30.
state_provincetruestringState or province. Maximum length 30.
postal_codetruestringZIP or postal code. Maximum length 10.
countrytruestringCountry in ISO 3166-1 alpha-2 format. Two uppercase letters (e.g., US).

Card Network Info Object

Card network identifiers collected at merchant creation/update time. Identifiers are required before onboarding services that use the corresponding card network.

AttributeRequiredTypeDescription
visa.acquirer_binconditionalstringVisa acquirer BIN. Required to onboard Visa on services that use it. Must be between 6 and 8 digits.
visa.card_acceptor_id_caidconditionalstringVisa Card Acceptor ID (CAID).
mastercard.merchant_id_midconditionalstringMastercard Merchant ID (MID).
amex.se_numberconditionalstringAmerican Express Service Establishment (SE) number.
discover.merchant_id_midconditionalstringDiscover Merchant ID (MID).

Services Object

The services object is always present on a Tenant Merchant and reports the onboarding state of each supported service. For a newly-created merchant that has not yet requested onboarding, each service defaults to status: "inactive" with every network also set to inactive. Each service entry has the same shape.

AttributeTypeDescription
account_updaterservice statusState of the Account Updater service.
network_tokenservice statusState of the Network Tokens service.

Service Status Object

AttributeTypeDescription
statusstringRolled-up service status. See Service Status Values.
card_network_statuscard network statusPer-network status for visa, mastercard, amex, and discover.

Card Network Status Object

Each network (visa, mastercard, amex, discover) on card_network_status has the following shape. All fields are read-only — they are managed by Basis Theory and cannot be set or modified via the API.

AttributeTypeDescription
statusstringNetwork-level status. See Service Status Values.
status_reason_code, status_reason, status_reason_labelstring(Optional) Only populated when status is failed. status_reason_code is a machine-readable reason code, status_reason is the reason detail, and status_reason_label is the human-readable label resolved from status_reason_code.

Service Status Values

StatusDescription
inactiveService not enabled for this merchant.
onboardingOnboarding data submitted; awaiting upstream provider activation.
activeService is fully configured and operational.
failedAn error was found in the onboarding data submitted. The reason code and description are returned on the corresponding card_network_status.{network} entry.