post https://sandbox.onebrick.io/v2/payments/general/b2c/sub-accounts//regenerate-api-key
Regenerates the API key for a given subaccount. The old key pair will be invalidated. Only B2C account with owner role can regenerate API key.
Request Header
Key Parameters | Data Type | Description |
---|---|---|
publicAccessToken | String | One time access-token generated using this API |
X-Signature | String | A HMAC-SHA512 signature generated using your API secret. This is used to verify the integrity and authenticity of the request. The signature is created based on the request payload and the X-Timestamp. |
X-Timestamp | DateTime | The timestamp of the request in ISO 8601 format. This is used to validate the freshness of the request. Format: YYYY-MM-DDTHH:MM:SS.SSS±HH:MM Example: 2025-05-27T10:17:54.964+07:00 |
Request path parameters
Key Parameters | Data Type | Description |
---|---|---|
subAccountCode | String | A unique alphanumeric code (max. 5 characters) used to identify the subaccount |
Response parameters
Key Parameters | Data Type | Description |
---|---|---|
apiKey | Object | Object containing the generated API credentials |
clientKey | String | Encrypted public API key for the subaccount |
clientSecret | String | Encrypted secret key used to authenticate API requests |
Error Response
Please check the B2C Subaccount Onboarding Product Documentation for the error response