Manage B2C client subaccounts, public key setup, and API key rotation for multi-tenant Brick integrations. These endpoints help platforms isolate client credentials and operate subaccounts under a primary Brick workspace.
[B2C Client] Setup Public Key
Upload the public key Brick should use to encrypt B2C client credentials generated for subaccounts. Call this before creating B2C subaccounts so the returned client secret material can be handled safely by your platform. The request requires Brick authentication headers and the response confirms that the encryption key is ready for subsequent subaccount provisioning.
[B2C Client] Setup Public Key › Request Body
publicKeyFile containing your public Key in .pem format. Max size 100KB.
[B2C Client] Setup Public Key › Responses
200
statusdataerror[B2C Client] Create Subaccount
Create a B2C subaccount under your Brick workspace for a client, tenant, merchant, or business unit. Send the required customer and account details with the B2C authentication headers; Brick returns subaccount identifiers and encrypted credentials that can be stored in your platform. Use this endpoint when you need credential separation across end customers while keeping central operational control.
[B2C Client] Create Subaccount › Request Body
nameThe name of the business or individual consumer
subAccountCodeA unique alphanumeric code (max. 5 characters) used to identify the subaccount
emailContact email address for the subaccount
addressBusiness or residential address associated with the subaccount
picture(Optional) Logo image file (max. 2 MB) to visually represent the subaccount
[B2C Client] Create Subaccount › Responses
200
[B2C Client] Regenerate API Key
Regenerate the API key pair for an existing B2C subaccount when credentials need to be rotated, compromised, or reissued. The previous key pair is invalidated after regeneration, so update downstream services before switching traffic. Only authorized B2C owner roles should call this endpoint, and the response should be treated as sensitive credential material.
path Parameters
subAccountCode[B2C Client] Regenerate API Key › Responses
200
statusmessage