initSecureFields
function initSecureFields(sdkConfiguration): Promise<SecureFieldsClient>;
Initializes the Secure Fields SDK with the provided tenant ID and configuration.
Parameters
| Parameter | Type | Description |
|---|---|---|
sdkConfiguration | { apiKey?: string; config: SecureFieldsConfig; tenantId: string; vault_vendor?: "purse" | "pci_proxy"; } | - |
sdkConfiguration.apiKey? | string | Api key provided by Purse for gateway access |
sdkConfiguration.config | SecureFieldsConfig | Configuration for the secure fields. See SecureFieldsConfig for supported options. |
sdkConfiguration.tenantId | string | Your tenant ID provided by Purse. * |
sdkConfiguration.vault_vendor? | "purse" | "pci_proxy" | - |
Returns
Promise<SecureFieldsClient>
A promise that resolves to an instance of the SDK identified for the tenantId.
Throws
SdkError Throws an error if initialization parameters are invalid. Possible errors include:
| Error Code |
|---|
| INIT_FAILED |
| TENANT_ID_REQUIRED |
| FIELD_CONFIG_REQUIRED |
| FIELD_TARGET_INVALID |
| NOT_SUPPORTED_FIELD |