text
string
file_path
string
module
string
type
string
tokens
int64
language
string
struct_name
string
type_name
string
trait_name
string
impl_type
string
function_name
string
source
string
section
string
keys
list
macro_type
string
url
string
title
string
chunk_index
int64
Documentation: api-reference/intelligent-router-api-reference/elimination/update-elimination-bucket.mdx # Type: Doc File --- openapi: post /elimination.EliminationAnalyser/UpdateEliminationBucket ---
api-reference/intelligent-router-api-reference/elimination/update-elimination-bucket.mdx
null
doc_file
47
doc
null
null
null
null
null
null
null
null
null
null
null
null
impl api::PaymentAuthorize for Hyperwallet {}
crates/hyperswitch_connectors/src/connectors/hyperwallet.rs
hyperswitch_connectors
impl_block
9
rust
null
Hyperwallet
api::PaymentAuthorize for
impl api::PaymentAuthorize for for Hyperwallet
null
null
null
null
null
null
null
null
pub struct PaymentProcessingMetaData { payment_processing_model: String, }
crates/hyperswitch_connectors/src/connectors/amazonpay/transformers.rs
hyperswitch_connectors
struct_definition
14
rust
PaymentProcessingMetaData
null
null
null
null
null
null
null
null
null
null
null
pub async fn get_token_data_for_payment_method( state: SessionState, merchant_account: domain::MerchantAccount, key_store: domain::MerchantKeyStore, profile: domain::Profile, request: payment_methods::GetTokenDataRequest, payment_method_id: id_type::GlobalPaymentMethodId, ) -> RouterResponse<api...
crates/router/src/core/payment_methods.rs
router
function_signature
203
rust
null
null
null
null
get_token_data_for_payment_method
null
null
null
null
null
null
null
impl api::PaymentAuthorize for Itaubank {}
crates/hyperswitch_connectors/src/connectors/itaubank.rs
hyperswitch_connectors
impl_block
10
rust
null
Itaubank
api::PaymentAuthorize for
impl api::PaymentAuthorize for for Itaubank
null
null
null
null
null
null
null
null
/// Extracts the inner value from the wrapper pub fn into_inner(self) -> T { self.0 }
crates/diesel_models/src/lib.rs
diesel_models
function_signature
27
rust
null
null
null
null
into_inner
null
null
null
null
null
null
null
Documentation: api-reference/intelligent-router-api-reference/contract-routing/invalidate-contract-information-for-an-entity.mdx # Type: Doc File --- openapi: post /contract_routing.ContractScoreCalculator/InvalidateContract ---
api-reference/intelligent-router-api-reference/contract-routing/invalidate-contract-information-for-an-entity.mdx
null
doc_file
46
doc
null
null
null
null
null
null
null
null
null
null
null
null
pub struct BankOfAmericaAuthorizationOptions { initiator: Option<BankOfAmericaPaymentInitiator>, merchant_intitiated_transaction: Option<MerchantInitiatedTransaction>, }
crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs
hyperswitch_connectors
struct_definition
35
rust
BankOfAmericaAuthorizationOptions
null
null
null
null
null
null
null
null
null
null
null
pub struct AuthServiceQueryParam { pub client_secret: Option<String>, }
crates/pm_auth/src/types.rs
pm_auth
struct_definition
14
rust
AuthServiceQueryParam
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.RoutingDictionaryRecord { "type": "object", "required": [ "id", "profile_id", "name", "kind", "description", "created_at", "modified_at" ], "properties": { "id": { "type": "string" }, "profile_id": { "type": "string" ...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
255
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "RoutingDictionaryRecord" ]
null
null
null
null
pub async fn migrate_payment_methods( state: &state::PaymentMethodsState, payment_methods: Vec<pm_api::PaymentMethodRecord>, merchant_id: &common_utils::id_type::MerchantId, merchant_context: &merchant_context::MerchantContext, mca_ids: Option<Vec<common_utils::id_type::MerchantConnectorAccountId>>,...
crates/payment_methods/src/core/migration.rs
payment_methods
function_signature
330
rust
null
null
null
null
migrate_payment_methods
null
null
null
null
null
null
null
impl<'a, T: KafkaMessage> KafkaEvent<'a, T> { fn new(event: &'a T, tenant_id: TenantID, clickhouse_database: Option<String>) -> Self { Self { event, sign_flag: 1, tenant_id, clickhouse_database, } } fn old(event: &'a T, tenant_id: TenantID, cli...
crates/router/src/services/kafka.rs
router
impl_block
120
rust
null
KafkaEvent
null
impl KafkaEvent
null
null
null
null
null
null
null
null
impl Riskified { pub fn new() -> &'static Self { &Self { #[cfg(feature = "frm")] amount_converter: &StringMajorUnitForConnector, } } #[cfg(feature = "frm")] pub fn generate_authorization_signature( &self, auth: &riskified::RiskifiedAuthType, ...
crates/hyperswitch_connectors/src/connectors/riskified.rs
hyperswitch_connectors
impl_block
159
rust
null
Riskified
null
impl Riskified
null
null
null
null
null
null
null
null
pub struct CardDetailsPaymentMethod { pub last4_digits: Option<String>, pub issuer_country: Option<String>, pub expiry_month: Option<Secret<String>>, pub expiry_year: Option<Secret<String>>, pub nick_name: Option<Secret<String>>, pub card_holder_name: Option<Secret<String>>, pub card_isin: O...
crates/hyperswitch_domain_models/src/payment_method_data.rs
hyperswitch_domain_models
struct_definition
146
rust
CardDetailsPaymentMethod
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.AirwallexData { "type": "object", "properties": { "payload": { "type": "string", "description": "payload required by airwallex", "nullable": true } } }
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
62
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "AirwallexData" ]
null
null
null
null
File: crates/openapi/src/routes/relay.rs Public functions: 2 /// Relay - Create /// /// Creates a relay request. #[utoipa::path( post, path = "/relay", request_body( content = RelayRequest, examples(( "Create a relay request" = ( value = json!({ ...
crates/openapi/src/routes/relay.rs
openapi
full_file
460
null
null
null
null
null
null
null
null
null
null
null
null
null
pub fn transform_card( payment_method_type: PaymentMethodType, card_provider: Vec<api_models::enums::CardNetwork>, ) -> payment_methods::RequestPaymentMethodTypes { payment_methods::RequestPaymentMethodTypes { payment_method_type, card_networks: Some(card_provider), ...
crates/connector_configs/src/transformer.rs
connector_configs
function_signature
133
rust
null
null
null
null
transform_card
null
null
null
null
null
null
null
impl api::MandateSetup for Rapyd {}
crates/hyperswitch_connectors/src/connectors/rapyd.rs
hyperswitch_connectors
impl_block
12
rust
null
Rapyd
api::MandateSetup for
impl api::MandateSetup for for Rapyd
null
null
null
null
null
null
null
null
pub struct CardNetworkTokenResponsePayload { pub card_brand: api_enums::CardNetwork, pub card_fingerprint: Option<Secret<String>>, pub card_reference: String, pub correlation_id: String, pub customer_id: String, pub par: String, pub token: CardNumber, pub token_expiry_month: Secret<Strin...
crates/router/src/types/payment_methods.rs
router
struct_definition
107
rust
CardNetworkTokenResponsePayload
null
null
null
null
null
null
null
null
null
null
null
File: crates/router/tests/connectors/prophetpay.rs use masking::Secret; use router::types::{self, domain, storage::enums}; use test_utils::connector_auth; use crate::utils::{self, ConnectorActions}; #[derive(Clone, Copy)] struct ProphetpayTest; impl ConnectorActions for ProphetpayTest {} impl utils::Connector for Pr...
crates/router/tests/connectors/prophetpay.rs
router
full_file
2,929
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct ProcessDisputePTData { pub connector_name: String, pub dispute_payload: types::DisputeSyncResponse, pub merchant_id: common_utils::id_type::MerchantId, }
crates/router/src/types/api/disputes.rs
router
struct_definition
42
rust
ProcessDisputePTData
null
null
null
null
null
null
null
null
null
null
null
pub async fn vault_payment_method_internal( state: &SessionState, pmd: &domain::PaymentMethodVaultingData, merchant_context: &domain::MerchantContext, existing_vault_id: Option<domain::VaultId>, customer_id: &id_type::GlobalCustomerId, ) -> RouterResult<pm_types::AddVaultResponse> { let db = &*s...
crates/router/src/core/payment_methods.rs
router
function_signature
395
rust
null
null
null
null
vault_payment_method_internal
null
null
null
null
null
null
null
File: crates/hyperswitch_connectors/src/connectors/worldline.rs Public functions: 2 Public structs: 1 pub mod transformers; use std::{fmt::Debug, sync::LazyLock}; use base64::Engine; use common_enums::enums; use common_utils::{ consts, crypto, errors::CustomResult, ext_traits::{ByteSliceExt, OptionExt}...
crates/hyperswitch_connectors/src/connectors/worldline.rs
hyperswitch_connectors
full_file
7,274
null
null
null
null
null
null
null
null
null
null
null
null
null
impl GpayTokenizationData { /// Get the encrypted Google Pay payment data, returning an error if it does not exist pub fn get_encrypted_google_pay_payment_data_mandatory( &self, ) -> Result<&GpayEcryptedTokenizationData, errors::ValidationError> { match self { Self::Encrypted(enc...
crates/common_types/src/payments.rs
common_types
impl_block
276
rust
null
GpayTokenizationData
null
impl GpayTokenizationData
null
null
null
null
null
null
null
null
pub struct PaypalBatchPayoutWebhooks { pub batch_header: PaypalBatchResponse, }
crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs
hyperswitch_connectors
struct_definition
19
rust
PaypalBatchPayoutWebhooks
null
null
null
null
null
null
null
null
null
null
null
pub struct XenditRedirectionResponse { pub status: PaymentStatus, }
crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs
hyperswitch_connectors
struct_definition
17
rust
XenditRedirectionResponse
null
null
null
null
null
null
null
null
null
null
null
pub fn new( id: id_type::OrganizationId, organization_type: common_enums::OrganizationType, organization_name: Option<String>, ) -> Self { Self { org_id: id.clone(), org_name: organization_name.clone(), id, organization_name, ...
crates/diesel_models/src/organization.rs
diesel_models
function_signature
123
rust
null
null
null
null
new
null
null
null
null
null
null
null
pub struct TrustpaymentsPaymentsResponse { status: TrustpaymentsPaymentStatus, id: String, }
crates/hyperswitch_connectors/src/connectors/trustpayments/transformers.rs
hyperswitch_connectors
struct_definition
21
rust
TrustpaymentsPaymentsResponse
null
null
null
null
null
null
null
null
null
null
null
pub async fn config_delete(state: SessionState, key: String) -> RouterResponse<api::Config> { let store = state.store.as_ref(); let config = store .delete_config_by_key(&key) .await .to_not_found_response(errors::ApiErrorResponse::ConfigNotFound)?; Ok(ApplicationResponse::Json(config...
crates/router/src/core/configs.rs
router
function_signature
77
rust
null
null
null
null
config_delete
null
null
null
null
null
null
null
impl Payment for Signifyd {}
crates/hyperswitch_connectors/src/connectors/signifyd.rs
hyperswitch_connectors
impl_block
7
rust
null
Signifyd
Payment for
impl Payment for for Signifyd
null
null
null
null
null
null
null
null
pub struct AuthorizeSessionTokenData { pub amount_to_capture: Option<i64>, pub currency: storage_enums::Currency, pub connector_transaction_id: String, pub amount: Option<i64>, }
crates/hyperswitch_domain_models/src/router_request_types.rs
hyperswitch_domain_models
struct_definition
47
rust
AuthorizeSessionTokenData
null
null
null
null
null
null
null
null
null
null
null
pub async fn delete_by_merchant_id_file_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, file_id: &str, ) -> StorageResult<bool> { generics::generic_delete::<<Self as HasTable>::Table, _>( conn, dsl::merchant_id .eq(mer...
crates/diesel_models/src/query/file.rs
diesel_models
function_signature
106
rust
null
null
null
null
delete_by_merchant_id_file_id
null
null
null
null
null
null
null
pub(crate) fn get_google_pay_session<F, T>( instance_id: String, secrets: &SdkSecretInfo, google_pay_init_result: TrustpayGooglePayResponse, item: ResponseRouterData<F, TrustpayCreateIntentResponse, T, PaymentsResponseData>, ) -> Result<RouterData<F, T, PaymentsResponseData>, error_stack::Report<errors:...
crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs
hyperswitch_connectors
function_signature
385
rust
null
null
null
null
get_google_pay_session
null
null
null
null
null
null
null
pub async fn find_optional_by_merchant_id_payout_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, payout_id: &common_utils::id_type::PayoutId, ) -> StorageResult<Option<Self>> { generics::generic_find_one_optional::<<Self as HasTable>::Table, _, _>( ...
crates/diesel_models/src/query/payouts.rs
diesel_models
function_signature
122
rust
null
null
null
null
find_optional_by_merchant_id_payout_id
null
null
null
null
null
null
null
impl RefundExecute for Wellsfargo {} impl RefundSync for Wellsfargo {} impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Wellsfargo { fn get_headers( &self, req: &RefundExecuteRouterData, connectors: &Connectors, ) -> CustomResult<Vec<(String, Maskable<String>)>, ...
crates/hyperswitch_connectors/src/connectors/wellsfargo.rs#chunk1
hyperswitch_connectors
chunk
3,042
null
null
null
null
null
null
null
null
null
null
null
null
null
pub async fn get_single_merchant_id_and_profile_id( state: &SessionState, user_role: &UserRole, ) -> UserResult<(id_type::MerchantId, id_type::ProfileId)> { let org_id = get_single_org_id(state, user_role).await?; let merchant_id = get_single_merchant_id(state, user_role, &org_id).await?; let profil...
crates/router/src/utils/user_role.rs
router
function_signature
111
rust
null
null
null
null
get_single_merchant_id_and_profile_id
null
null
null
null
null
null
null
pub struct PayoutLinkDetails { pub publishable_key: Secret<String>, pub client_secret: Secret<String>, pub payout_link_id: String, pub payout_id: id_type::PayoutId, pub customer_id: id_type::CustomerId, #[serde(with = "common_utils::custom_serde::iso8601")] pub session_expiry: PrimitiveDateT...
crates/api_models/src/payouts.rs
api_models
struct_definition
196
rust
PayoutLinkDetails
null
null
null
null
null
null
null
null
null
null
null
pub async fn delete_payment_method_data_from_vault_external( state: &routes::SessionState, merchant_account: &domain::MerchantAccount, merchant_connector_account: domain::MerchantConnectorAccountTypeDetails, vault_id: domain::VaultId, customer_id: &id_type::GlobalCustomerId, ) -> RouterResult<pm_typ...
crates/router/src/core/payment_methods/vault.rs
router
function_signature
451
rust
null
null
null
null
delete_payment_method_data_from_vault_external
null
null
null
null
null
null
null
pub struct Payouts;
crates/router/src/routes/app.rs
router
struct_definition
6
rust
Payouts
null
null
null
null
null
null
null
null
null
null
null
pub struct ClientRiskInformation { rules: Option<Vec<ClientRiskInformationRules>>, profile: Option<Profile>, score: Option<Score>, info_codes: Option<InfoCodes>, }
crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs
hyperswitch_connectors
struct_definition
40
rust
ClientRiskInformation
null
null
null
null
null
null
null
null
null
null
null
File: crates/hyperswitch_connectors/src/connectors/shift4.rs Public functions: 1 Public structs: 1 pub mod transformers; use std::sync::LazyLock; use api_models::webhooks::IncomingWebhookEvent; use common_enums::enums; use common_utils::{ errors::CustomResult, ext_traits::{ByteSliceExt, BytesExt}, reque...
crates/hyperswitch_connectors/src/connectors/shift4.rs
hyperswitch_connectors
full_file
7,099
null
null
null
null
null
null
null
null
null
null
null
null
null
File: crates/analytics/src/clickhouse.rs Public structs: 2 use std::sync::Arc; use actix_web::http::StatusCode; use common_utils::errors::ParsingError; use error_stack::{report, Report, ResultExt}; use router_env::logger; use time::PrimitiveDateTime; use super::{ active_payments::metrics::ActivePaymentsMetricRo...
crates/analytics/src/clickhouse.rs
analytics
full_file
5,158
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct AlwaysRequestExtendedAuthorization(bool);
crates/common_types/src/primitive_wrappers.rs
common_types
struct_definition
8
rust
AlwaysRequestExtendedAuthorization
null
null
null
null
null
null
null
null
null
null
null
pub async fn perform_authentication( state: &SessionState, merchant_id: common_utils::id_type::MerchantId, authentication_connector: String, payment_method_data: domain::PaymentMethodData, payment_method: common_enums::PaymentMethod, billing_address: hyperswitch_domain_models::address::Address, ...
crates/router/src/core/authentication.rs
router
function_signature
559
rust
null
null
null
null
perform_authentication
null
null
null
null
null
null
null
pub struct BluecodeCard { number: cards::CardNumber, expiry_month: Secret<String>, expiry_year: Secret<String>, cvc: Secret<String>, complete: bool, }
crates/hyperswitch_connectors/src/connectors/bluecode/transformers.rs
hyperswitch_connectors
struct_definition
41
rust
BluecodeCard
null
null
null
null
null
null
null
null
null
null
null
pub fn update_storage_scheme(&mut self, storage_scheme: common_enums::MerchantStorageScheme) { self.updated_by = Some(storage_scheme.to_string()); }
crates/diesel_models/src/customers.rs
diesel_models
function_signature
34
rust
null
null
null
null
update_storage_scheme
null
null
null
null
null
null
null
pub trait ValidateRequest<F, R, D> { fn validate_request<'b>( &'b self, request: &R, merchant_context: &domain::MerchantContext, ) -> RouterResult<(BoxedOperation<'b, F, R, D>, ValidateResult)>; }
crates/router/src/core/payments/operations.rs
router
trait_definition
62
rust
null
null
ValidateRequest
null
null
null
null
null
null
null
null
null
pub struct PaymentInsightsInformation { response_insights: Option<ResponseInsights>, rule_results: Option<RuleResults>, }
crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs
hyperswitch_connectors
struct_definition
27
rust
PaymentInsightsInformation
null
null
null
null
null
null
null
null
null
null
null
pub fn get_optional_email(&self) -> Option<pii::Email> { self.email.clone() }
crates/api_models/src/customers.rs
api_models
function_signature
23
rust
null
null
null
null
get_optional_email
null
null
null
null
null
null
null
File: crates/router/src/core/payments/operations/payment_session.rs Public structs: 1 use std::marker::PhantomData; use api_models::{admin::PaymentMethodsEnabled, enums::FrmSuggestion}; use async_trait::async_trait; use common_utils::ext_traits::{AsyncExt, ValueExt}; use error_stack::ResultExt; use router_derive::Pa...
crates/router/src/core/payments/operations/payment_session.rs
router
full_file
3,787
null
null
null
null
null
null
null
null
null
null
null
null
null
impl api::ConnectorAccessToken for Novalnet {}
crates/hyperswitch_connectors/src/connectors/novalnet.rs
hyperswitch_connectors
impl_block
10
rust
null
Novalnet
api::ConnectorAccessToken for
impl api::ConnectorAccessToken for for Novalnet
null
null
null
null
null
null
null
null
pub struct CheckoutThreeDS { enabled: bool, force_3ds: bool, eci: Option<String>, cryptogram: Option<Secret<String>>, xid: Option<String>, version: Option<String>, }
crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs
hyperswitch_connectors
struct_definition
49
rust
CheckoutThreeDS
null
null
null
null
null
null
null
null
null
null
null
pub struct RefundsGenericRequestWithResourceId<T: serde::Serialize> { pub global_refund_id: common_utils::id_type::GlobalRefundId, pub payment_id: Option<common_utils::id_type::GlobalPaymentId>, #[serde(flatten)] pub payload: T, }
crates/router/src/routes/refunds.rs
router
struct_definition
64
rust
RefundsGenericRequestWithResourceId
null
null
null
null
null
null
null
null
null
null
null
impl IncomingWebhook for Square { fn get_webhook_source_verification_algorithm( &self, _request: &IncomingWebhookRequestDetails<'_>, ) -> CustomResult<Box<dyn common_utils::crypto::VerifySignature + Send>, errors::ConnectorError> { Ok(Box::new(common_utils::crypto::HmacSha256)) }...
crates/hyperswitch_connectors/src/connectors/square.rs
hyperswitch_connectors
impl_block
814
rust
null
Square
IncomingWebhook for
impl IncomingWebhook for for Square
null
null
null
null
null
null
null
null
pub fn two_digits(&self) -> String { format!("{:02}", self.peek()) }
crates/cards/src/lib.rs
cards
function_signature
22
rust
null
null
null
null
two_digits
null
null
null
null
null
null
null
impl api::PaymentCapture for Paypal {}
crates/hyperswitch_connectors/src/connectors/paypal.rs
hyperswitch_connectors
impl_block
8
rust
null
Paypal
api::PaymentCapture for
impl api::PaymentCapture for for Paypal
null
null
null
null
null
null
null
null
pub async fn update_payment_method( state: SessionState, merchant_context: domain::MerchantContext, profile: domain::Profile, req: api::PaymentMethodUpdate, payment_method_id: &id_type::GlobalPaymentMethodId, ) -> RouterResponse<api::PaymentMethodResponse> { let response = update_payment...
crates/router/src/core/payment_methods.rs
router
function_signature
105
rust
null
null
null
null
update_payment_method
null
null
null
null
null
null
null
pub async fn create_user_theme( state: web::Data<AppState>, req: HttpRequest, payload: web::Json<theme_api::CreateUserThemeRequest>, ) -> HttpResponse { let flow = Flow::CreateUserTheme; let payload = payload.into_inner(); Box::pin(api::server_wrap( flow, state, &req, ...
crates/router/src/routes/user/theme.rs
router
function_signature
148
rust
null
null
null
null
create_user_theme
null
null
null
null
null
null
null
pub fn new_for_sync( captures: Vec<storage::Capture>, expand_captures: Option<bool>, ) -> RouterResult<Self> { let latest_capture = captures .last() .ok_or(errors::ApiErrorResponse::InternalServerError) .attach_printable("Cannot create MultipleCaptureData ...
crates/router/src/core/payments/types.rs
router
function_signature
141
rust
null
null
null
null
new_for_sync
null
null
null
null
null
null
null
impl DummyConnectorRefundResponse { pub fn new( status: DummyConnectorStatus, id: String, currency: Currency, created: PrimitiveDateTime, payment_amount: i64, refund_amount: i64, ) -> Self { Self { status, id, currency, ...
crates/router/src/routes/dummy_connector/types.rs
router
impl_block
84
rust
null
DummyConnectorRefundResponse
null
impl DummyConnectorRefundResponse
null
null
null
null
null
null
null
null
pub struct BanksVector { #[serde(deserialize_with = "deserialize_hashset")] pub banks: HashSet<common_enums::enums::BankNames>, }
crates/payment_methods/src/configs/settings.rs
payment_methods
struct_definition
33
rust
BanksVector
null
null
null
null
null
null
null
null
null
null
null
pub fn check_for_custom_headers(headers: Option<Vec<String>>, path: &str) -> Option<String> { if let Some(headers) = &headers { for header in headers { if let Some((key, value)) = header.split_once(':') { let content_to_insert = format!(r#"pm.request.headers.a...
crates/test_utils/src/newman_runner.rs
test_utils
function_signature
158
rust
null
null
null
null
check_for_custom_headers
null
null
null
null
null
null
null
Documentation: crates/pm_auth/README.md # Type: Doc File # Payment Method Auth Services An open banking services for payment method auth validation
crates/pm_auth/README.md
null
doc_file
31
doc
null
null
null
null
null
null
null
null
null
null
null
null
Web Documentation: Multi-Tenancy | Hyperswitch # Type: Web Doc What is Multi-Tenancy? Multi-tenancy refers to an architecture where a single instance of the software and its infrastructure serves multiple tenants. Multi-tenancy in Hyperswitch enables each of it's tenants to have customised offering of the Hyperswitch ...
https://docs.hyperswitch.io/explore-hyperswitch/account-management/multi-tenancy-with-hyperswitch
null
web_doc_file
563
doc
null
null
null
null
null
web
null
null
null
https://docs.hyperswitch.io/explore-hyperswitch/account-management/multi-tenancy-with-hyperswitch
Multi-Tenancy | Hyperswitch
null
pub struct EntityInfo { tenant_id: id_type::TenantId, org_id: Option<id_type::OrganizationId>, merchant_id: Option<id_type::MerchantId>, profile_id: Option<id_type::ProfileId>, entity_id: String, entity_type: EntityType, }
crates/router/src/types/domain/user.rs
router
struct_definition
64
rust
EntityInfo
null
null
null
null
null
null
null
null
null
null
null
impl Proxy { pub fn server(state: AppState) -> Scope { web::scope("/v2/proxy") .app_data(web::Data::new(state)) .service(web::resource("").route(web::post().to(proxy::proxy))) } }
crates/router/src/routes/app.rs
router
impl_block
55
rust
null
Proxy
null
impl Proxy
null
null
null
null
null
null
null
null
pub(super) struct PIISerializer { pub inner: JsonValueSerializer, }
crates/masking/src/serde.rs
masking
struct_definition
18
rust
PIISerializer
null
null
null
null
null
null
null
null
null
null
null
pub struct NmiRouterData<T> { pub amount: FloatMajorUnit, pub router_data: T, }
crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs
hyperswitch_connectors
struct_definition
25
rust
NmiRouterData
null
null
null
null
null
null
null
null
null
null
null
pub struct TokenioPaymentsRequest { pub initiation: PaymentInitiation, }
crates/hyperswitch_connectors/src/connectors/tokenio/transformers.rs
hyperswitch_connectors
struct_definition
16
rust
TokenioPaymentsRequest
null
null
null
null
null
null
null
null
null
null
null
File: crates/hyperswitch_interfaces/src/api/authentication_v2.rs use hyperswitch_domain_models::{ router_data_v2::ExternalAuthenticationFlowData, router_flow_types::authentication::{ Authentication, PostAuthentication, PreAuthentication, PreAuthenticationVersionCall, }, router_request_types::au...
crates/hyperswitch_interfaces/src/api/authentication_v2.rs
hyperswitch_interfaces
full_file
348
null
null
null
null
null
null
null
null
null
null
null
null
null
File: crates/analytics/src/auth_events/metrics/authentication_exemption_approved_count.rs use std::collections::HashSet; use api_models::analytics::{ auth_events::{AuthEventDimensions, AuthEventFilters, AuthEventMetricsBucketIdentifier}, Granularity, TimeRange, }; use common_utils::errors::ReportSwitchExt; us...
crates/analytics/src/auth_events/metrics/authentication_exemption_approved_count.rs
analytics
full_file
1,053
null
null
null
null
null
null
null
null
null
null
null
null
null
pub fn compare_password(&self, candidate: &Secret<String>) -> UserResult<()> { if let Some(password) = self.0.password.as_ref() { match password::is_correct_password(candidate, password) { Ok(true) => Ok(()), Ok(false) => Err(UserErrors::InvalidCredentials.into()), ...
crates/router/src/types/domain/user.rs
router
function_signature
93
rust
null
null
null
null
compare_password
null
null
null
null
null
null
null
pub fn get_user_id(&self) -> &str { match self { Self::Hypersense { user_id, .. } => user_id, } }
crates/api_models/src/external_service_auth.rs
api_models
function_signature
37
rust
null
null
null
null
get_user_id
null
null
null
null
null
null
null
File: crates/router/src/types/storage/merchant_key_store.rs pub use diesel_models::merchant_key_store::MerchantKeyStore;
crates/router/src/types/storage/merchant_key_store.rs
router
full_file
26
null
null
null
null
null
null
null
null
null
null
null
null
null
impl Default for ContractBasedRoutingConfig { fn default() -> Self { Self { config: Some(ContractBasedRoutingConfigBody { constants: Some(vec![0.7, 0.35]), time_scale: Some(ContractBasedTimeScale::Day), }), label_info: None, } }...
crates/api_models/src/routing.rs
api_models
impl_block
71
rust
null
ContractBasedRoutingConfig
Default for
impl Default for for ContractBasedRoutingConfig
null
null
null
null
null
null
null
null
pub fn from_bytes(bytes: &[u8]) -> Self { // First try to parse as JSON if let Ok(json_response) = serde_json::from_slice::<Self>(bytes) { json_response } else { // If JSON parsing fails, treat as plain text let text = String::from_utf8_lossy(bytes).to_string(...
crates/hyperswitch_connectors/src/connectors/tokenio/transformers.rs
hyperswitch_connectors
function_signature
87
rust
null
null
null
null
from_bytes
null
null
null
null
null
null
null
impl super::sdk_events::events::SdkEventsFilterAnalytics for ClickhouseClient {}
crates/analytics/src/clickhouse.rs
analytics
impl_block
17
rust
null
ClickhouseClient
super::sdk_events::events::SdkEventsFilterAnalytics for
impl super::sdk_events::events::SdkEventsFilterAnalytics for for ClickhouseClient
null
null
null
null
null
null
null
null
pub struct CycleCheck(FxHashMap<NodeId, (Strength, RelationResolution)>);
crates/hyperswitch_constraint_graph/src/types.rs
hyperswitch_constraint_graph
struct_definition
17
rust
CycleCheck
null
null
null
null
null
null
null
null
null
null
null
pub fn deserialize_to_response<T>(data: Option<&DashboardMetadata>) -> UserResult<Option<T>> where T: serde::de::DeserializeOwned, { data.map(|metadata| serde_json::from_value(metadata.data_value.clone().expose())) .transpose() .change_context(UserErrors::InternalServerError) .attach_pri...
crates/router/src/utils/user/dashboard_metadata.rs
router
function_signature
79
rust
null
null
null
null
deserialize_to_response
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.PayoutRetrieveRequest { "type": "object", "required": [ "payout_id" ], "properties": { "payout_id": { "type": "string", "description": "Unique identifier for the payout. This ensures idempotency for multiple payouts\nthat have been done by a single merc...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
244
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "PayoutRetrieveRequest" ]
null
null
null
null
File: crates/hyperswitch_constraint_graph/src/error.rs Public functions: 1 use std::sync::{Arc, Weak}; use crate::types::{Metadata, NodeValue, Relation, RelationResolution, ValueNode}; #[derive(Debug, Clone, serde::Serialize)] #[serde(tag = "type", content = "predecessor", rename_all = "snake_case")] pub enum Value...
crates/hyperswitch_constraint_graph/src/error.rs
hyperswitch_constraint_graph
full_file
606
null
null
null
null
null
null
null
null
null
null
null
null
null
File: crates/api_models/src/user/theme.rs Public structs: 8 use actix_multipart::form::{bytes::Bytes, text::Text, MultipartForm}; use common_enums::EntityType; use common_utils::{ id_type, types::user::{EmailThemeConfig, ThemeLineage}, }; use masking::Secret; use serde::{Deserialize, Serialize}; #[derive(Deb...
crates/api_models/src/user/theme.rs
api_models
full_file
916
null
null
null
null
null
null
null
null
null
null
null
null
null
impl api::Payment for Bambora {}
crates/hyperswitch_connectors/src/connectors/bambora.rs
hyperswitch_connectors
impl_block
9
rust
null
Bambora
api::Payment for
impl api::Payment for for Bambora
null
null
null
null
null
null
null
null
impl Getnet { pub fn new() -> &'static Self { &Self { amount_converter: &FloatMajorUnitForConnector, } } }
crates/hyperswitch_connectors/src/connectors/getnet.rs
hyperswitch_connectors
impl_block
34
rust
null
Getnet
null
impl Getnet
null
null
null
null
null
null
null
null
impl CreateProfile { /// Create a new profile action from the given information /// If primary business details exist, then create profiles from them /// If primary business details are empty, then create default profile fn new(primary_business_details: Option<Vec<admin_types::PrimaryBusinessDetails>>) ...
crates/router/src/core/admin.rs
router
impl_block
739
rust
null
CreateProfile
null
impl CreateProfile
null
null
null
null
null
null
null
null
impl Connector { #[cfg(feature = "payouts")] pub fn supports_instant_payout(self, payout_method: Option<PayoutType>) -> bool { matches!( (self, payout_method), (Self::Paypal, Some(PayoutType::Wallet)) | (_, Some(PayoutType::Card)) | (Self::Adyenpla...
crates/common_enums/src/connector_enums.rs
common_enums
impl_block
1,935
rust
null
Connector
null
impl Connector
null
null
null
null
null
null
null
null
pub struct ErrorDetailItem { pub field: String, pub message: String, }
crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs
hyperswitch_connectors
struct_definition
19
rust
ErrorDetailItem
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.BankTransferTypes { "type": "object", "required": [ "eligible_connectors" ], "properties": { "eligible_connectors": { "type": "array", "items": { "type": "string" }, "description": "The list of eligible connectors for a given payment...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
104
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "BankTransferTypes" ]
null
null
null
null
/// Generate Api Key Id from prefix pub fn generate_key_id(prefix: &'static str) -> Self { Self(crate::generate_ref_id_with_default_length(prefix)) }
crates/common_utils/src/id_type/api_key.rs
common_utils
function_signature
37
rust
null
null
null
null
generate_key_id
null
null
null
null
null
null
null
impl api::PaymentSession for Paytm {}
crates/hyperswitch_connectors/src/connectors/paytm.rs
hyperswitch_connectors
impl_block
9
rust
null
Paytm
api::PaymentSession for
impl api::PaymentSession for for Paytm
null
null
null
null
null
null
null
null
impl api::PaymentSession for Zsl {}
crates/hyperswitch_connectors/src/connectors/zsl.rs
hyperswitch_connectors
impl_block
9
rust
null
Zsl
api::PaymentSession for
impl api::PaymentSession for for Zsl
null
null
null
null
null
null
null
null
pub struct Bambora { amount_convertor: &'static (dyn AmountConvertor<Output = FloatMajorUnit> + Sync), }
crates/hyperswitch_connectors/src/connectors/bambora.rs
hyperswitch_connectors
struct_definition
29
rust
Bambora
null
null
null
null
null
null
null
null
null
null
null
pub async fn validate_and_create_refund( state: &SessionState, merchant_context: &domain::MerchantContext, payment_attempt: &storage::PaymentAttempt, payment_intent: &storage::PaymentIntent, refund_amount: MinorUnit, req: refunds::RefundRequest, creds_identifier: Option<String>, ) -> RouterR...
crates/router/src/core/refunds.rs
router
function_signature
1,312
rust
null
null
null
null
validate_and_create_refund
null
null
null
null
null
null
null
pub struct CybersourceAuthValidateRequest { payment_information: PaymentInformation, client_reference_information: ClientReferenceInformation, consumer_authentication_information: CybersourceConsumerAuthInformationValidateRequest, order_information: OrderInformation, }
crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs
hyperswitch_connectors
struct_definition
47
rust
CybersourceAuthValidateRequest
null
null
null
null
null
null
null
null
null
null
null
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Customer> { generics::generic_insert(conn, self).await }
crates/diesel_models/src/query/customers.rs
diesel_models
function_signature
33
rust
null
null
null
null
insert
null
null
null
null
null
null
null
File: crates/router/tests/connectors/bluesnap.rs use std::str::FromStr; use common_utils::pii::Email; use hyperswitch_domain_models::address::{Address, AddressDetails}; use masking::Secret; use router::types::{self, domain, storage::enums, ConnectorAuthType, PaymentAddress}; use crate::{ connector_auth, util...
crates/router/tests/connectors/bluesnap.rs
router
full_file
3,562
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct DisputeEvidenceBlock { /// Evidence type pub evidence_type: EvidenceType, /// File metadata pub file_metadata_response: files::FileMetadataResponse, }
crates/api_models/src/disputes.rs
api_models
struct_definition
38
rust
DisputeEvidenceBlock
null
null
null
null
null
null
null
null
null
null
null
/// fn set_error pub fn set_error(&mut self, error: serde_json::Value) { self.error = Some(error.to_string()); }
crates/hyperswitch_interfaces/src/events/routing_api_logs.rs
hyperswitch_interfaces
function_signature
33
rust
null
null
null
null
set_error
null
null
null
null
null
null
null
pub struct SilverflowErrorResponse { pub error: SilverflowError, }
crates/hyperswitch_connectors/src/connectors/silverflow/transformers.rs
hyperswitch_connectors
struct_definition
15
rust
SilverflowErrorResponse
null
null
null
null
null
null
null
null
null
null
null
impl api::PayoutRecipient for Ebanx {}
crates/hyperswitch_connectors/src/connectors/ebanx.rs
hyperswitch_connectors
impl_block
11
rust
null
Ebanx
api::PayoutRecipient for
impl api::PayoutRecipient for for Ebanx
null
null
null
null
null
null
null
null