{"record":{"id":"9f390b375959826d","repo":"juspay/hyperswitch","slug":"affirm-requires-bodykey-auth-type","errorCode":null,"errorMessage":"Affirm requires BodyKey auth type","messagePattern":"Affirm requires BodyKey auth type","errorType":"exception","errorClass":"ApiErrorResponse::InternalServerError","httpStatus":500,"severity":"error","filePath":"crates/router/src/core/unified_connector_service/connector_config.rs","lineNumber":1223,"sourceCode":"            },\n            Connector::Bamboraapac => match auth {\n                ConnectorAuthType::SignatureKey {\n                    api_key,\n                    key1,\n                    api_secret,\n                } => Ok(Self::Bamboraapac {\n                    username: api_key.clone(),\n                    password: api_secret.clone(),\n                    account_number: key1.clone(),\n                }),\n                _ => Err(err(\"Bamboraapac requires SignatureKey auth type\")),\n            },\n            Connector::Affirm => match auth {\n                ConnectorAuthType::BodyKey { api_key, key1 } => Ok(Self::Affirm {\n                    public_key: api_key.clone(),\n                    private_key: key1.clone(),\n                }),\n                _ => Err(err(\"Affirm requires BodyKey auth type\")),\n            },\n            Connector::Barclaycard => match auth {\n                ConnectorAuthType::SignatureKey {\n                    api_key,\n                    key1,\n                    api_secret,\n                } => Ok(Self::Barclaycard {\n                    api_key: api_key.clone(),\n                    merchant_account: key1.clone(),\n                    api_secret: api_secret.clone(),\n                }),\n                _ => Err(err(\"Barclaycard requires SignatureKey auth type\")),\n            },\n            Connector::Tesouro => match auth {\n                ConnectorAuthType::SignatureKey {\n                    api_key,\n                    key1,\n                    api_secret,","sourceCodeStart":1205,"sourceCodeEnd":1241,"githubUrl":"https://github.com/juspay/hyperswitch/blob/3093f22cc46b46415cca152ea0b234277b251ecd/crates/router/src/core/unified_connector_service/connector_config.rs#L1205-L1241","documentation":"Error \"Affirm requires BodyKey auth type\" thrown in juspay/hyperswitch.","triggerScenarios":"Thrown at crates/router/src/core/unified_connector_service/connector_config.rs:1168 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure the merchant connector account for Affirm with the BodyKey connector_auth_type","Recreate/update the connector account credentials to match the BodyKey schema"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3093f22cc46b46415cca152ea0b234277b251ecd","analyzedAt":"2026-08-19T10:36:43.745Z","contentChangedAt":"2026-08-19T10:36:43.745Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}