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
pub async fn config_should_call_gsm_payout( db: &dyn StorageInterface, merchant_id: &common_utils::id_type::MerchantId, retry_type: PayoutRetryType, ) -> bool { let key = merchant_id.get_should_call_gsm_payout_key(retry_type); let config = db .find_config_by_key_unwrap_or(key.as_str(), Some(...
crates/router/src/core/payouts/retry.rs
router
function_signature
131
rust
null
null
null
null
config_should_call_gsm_payout
null
null
null
null
null
null
null
pub struct SubscriptionNew { subscription_id: String, status: String, billing_processor: Option<String>, payment_method_id: Option<String>, merchant_connector_id: Option<common_utils::id_type::MerchantConnectorAccountId>, client_secret: Option<String>, connector_subscription_id: Option<Strin...
crates/diesel_models/src/subscription.rs
diesel_models
struct_definition
130
rust
SubscriptionNew
null
null
null
null
null
null
null
null
null
null
null
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Dispute> { generics::generic_insert(conn, self).await }
crates/diesel_models/src/query/dispute.rs
diesel_models
function_signature
35
rust
null
null
null
null
insert
null
null
null
null
null
null
null
pub struct ClientProcessorInformation { network_transaction_id: Option<String>, avs: Option<Avs>, card_verification: Option<CardVerification>, }
crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs
hyperswitch_connectors
struct_definition
32
rust
ClientProcessorInformation
null
null
null
null
null
null
null
null
null
null
null
pub struct BillingConnectorInvoiceSync;
crates/hyperswitch_domain_models/src/router_flow_types/revenue_recovery.rs
hyperswitch_domain_models
struct_definition
7
rust
BillingConnectorInvoiceSync
null
null
null
null
null
null
null
null
null
null
null
pub struct EnhancedAuthResponse { pub network_response: Option<NetworkResponse>, }
crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs
hyperswitch_connectors
struct_definition
17
rust
EnhancedAuthResponse
null
null
null
null
null
null
null
null
null
null
null
pub struct MetadataValue { pub key: String, pub value: String, }
crates/euclid/src/frontend/ast.rs
euclid
struct_definition
18
rust
MetadataValue
null
null
null
null
null
null
null
null
null
null
null
File: crates/external_services/src/http_client/request.rs use std::str::FromStr; use common_utils::request::Headers; pub use common_utils::{errors::CustomResult, request::ContentType}; use error_stack::ResultExt; use hyperswitch_interfaces::errors::HttpClientError; pub use masking::{Mask, Maskable}; use router_env::{...
crates/external_services/src/http_client/request.rs
external_services
full_file
351
null
null
null
null
null
null
null
null
null
null
null
null
null
impl<const T: u8> PaymentSession for DummyConnector<T> {}
crates/hyperswitch_connectors/src/connectors/dummyconnector.rs
hyperswitch_connectors
impl_block
15
rust
null
DummyConnector
PaymentSession for
impl PaymentSession for for DummyConnector
null
null
null
null
null
null
null
null
pub async fn call_decider_for_payment_processor_tokens_select_closet_time( state: &SessionState, processor_tokens: &HashMap<String, PaymentProcessorTokenWithRetryInfo>, payment_intent: &PaymentIntent, connector_customer_id: &str, ) -> CustomResult<Option<time::PrimitiveDateTime>, errors::ProcessTrackerE...
crates/router/src/workflows/revenue_recovery.rs
router
function_signature
500
rust
null
null
null
null
call_decider_for_payment_processor_tokens_select_closet_time
null
null
null
null
null
null
null
pub async fn update_merchant_account( state: web::Data<AppState>, req: HttpRequest, mid: web::Path<common_utils::id_type::MerchantId>, json_payload: web::Json<admin::MerchantAccountUpdate>, ) -> HttpResponse { let flow = Flow::MerchantsAccountUpdate; let merchant_id = mid.into_inner(); Box::...
crates/router/src/routes/admin.rs
router
function_signature
193
rust
null
null
null
null
update_merchant_account
null
null
null
null
null
null
null
impl ValidateStatusForOperation for PaymentUpdateIntent { /// Validate if the current operation can be performed on the current status of the payment intent fn validate_status_for_operation( &self, intent_status: common_enums::IntentStatus, ) -> Result<(), errors::ApiErrorResponse> { ...
crates/router/src/core/payments/operations/payment_update_intent.rs
router
impl_block
347
rust
null
PaymentUpdateIntent
ValidateStatusForOperation for
impl ValidateStatusForOperation for for PaymentUpdateIntent
null
null
null
null
null
null
null
null
impl api::Payment for Cryptopay {}
crates/hyperswitch_connectors/src/connectors/cryptopay.rs
hyperswitch_connectors
impl_block
9
rust
null
Cryptopay
api::Payment for
impl api::Payment for for Cryptopay
null
null
null
null
null
null
null
null
/// Schedule the task for refund retry /// /// Returns bool which indicates whether this was the last refund retry or not pub async fn retry_refund_sync_task( db: &dyn db::StorageInterface, connector: String, merchant_id: common_utils::id_type::MerchantId, pt: storage::ProcessTracker, ) -> Result<bool, ...
crates/router/src/core/refunds.rs
router
function_signature
186
rust
null
null
null
null
retry_refund_sync_task
null
null
null
null
null
null
null
pub struct NmiVaultResponse { pub response: Response, pub responsetext: String, pub customer_vault_id: Option<Secret<String>>, pub response_code: String, pub transactionid: String, }
crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs
hyperswitch_connectors
struct_definition
49
rust
NmiVaultResponse
null
null
null
null
null
null
null
null
null
null
null
pub struct GatewayStatusMappingUpdate { pub status: Option<String>, pub router_error: Option<Option<String>>, pub decision: Option<String>, pub step_up_possible: Option<bool>, pub unified_code: Option<String>, pub unified_message: Option<String>, pub error_category: Option<ErrorCategory>, ...
crates/diesel_models/src/gsm.rs
diesel_models
struct_definition
106
rust
GatewayStatusMappingUpdate
null
null
null
null
null
null
null
null
null
null
null
File: crates/external_services/src/no_encryption/implementers.rs //! Trait implementations for No encryption client use common_utils::errors::CustomResult; use error_stack::ResultExt; use hyperswitch_interfaces::{ encryption_interface::{EncryptionError, EncryptionManagementInterface}, secrets_interface::{Secr...
crates/external_services/src/no_encryption/implementers.rs
external_services
full_file
266
null
null
null
null
null
null
null
null
null
null
null
null
null
impl Responder { let flow = Flow::Verification; let merchant_id = &params.merchant_id; let mca_id = &params.merchant_connector_account_id; Box::pin(api::server_wrap( flow, state, &req, merchant_id.clone(), |state, _: auth::AuthenticationData, _, _| { ...
crates/router/src/routes/verification.rs
router
impl_block
183
rust
null
Responder
null
impl Responder
null
null
null
null
null
null
null
null
impl api::PaymentSession for Globepay {}
crates/hyperswitch_connectors/src/connectors/globepay.rs
hyperswitch_connectors
impl_block
10
rust
null
Globepay
api::PaymentSession for
impl api::PaymentSession for for Globepay
null
null
null
null
null
null
null
null
File: crates/storage_impl/src/redis/kv_store.rs Public functions: 2 use std::{fmt::Debug, sync::Arc}; use common_utils::errors::CustomResult; use diesel_models::enums::MerchantStorageScheme; use error_stack::report; use redis_interface::errors::RedisError; use router_derive::TryGetEnumVariant; use router_env::logger...
crates/storage_impl/src/redis/kv_store.rs
storage_impl
full_file
2,610
null
null
null
null
null
null
null
null
null
null
null
null
null
impl MerchantConnectorInfo { pub fn new( connector_label: String, merchant_connector_id: id_type::MerchantConnectorAccountId, ) -> Self { Self { connector_label, merchant_connector_id, } } }
crates/api_models/src/admin.rs
api_models
impl_block
50
rust
null
MerchantConnectorInfo
null
impl MerchantConnectorInfo
null
null
null
null
null
null
null
null
impl api::PaymentCapture for Wellsfargo {}
crates/hyperswitch_connectors/src/connectors/wellsfargo.rs
hyperswitch_connectors
impl_block
10
rust
null
Wellsfargo
api::PaymentCapture for
impl api::PaymentCapture for for Wellsfargo
null
null
null
null
null
null
null
null
pub async fn migrate_cards_info( state: web::Data<AppState>, req: HttpRequest, MultipartForm(form)
crates/router/src/routes/cards_info.rs
router
function_signature
27
rust
null
null
null
null
migrate_cards_info
null
null
null
null
null
null
null
pub fn get_filter_type_clause(&self) -> Option<String> { self.having.as_ref().map(|vec| { vec.iter() .map(|(l, op, r)| filter_type_to_sql(l, *op, r)) .collect::<Vec<String>>() .join(" AND ") }) }
crates/analytics/src/query.rs
analytics
function_signature
70
rust
null
null
null
null
get_filter_type_clause
null
null
null
null
null
null
null
pub struct Cards;
crates/router/src/routes/app.rs
router
struct_definition
4
rust
Cards
null
null
null
null
null
null
null
null
null
null
null
- **connector:** - [Stax] Use connector_response_reference_id as reference to merchant ([#2415](https://github.com/juspay/hyperswitch/pull/2415)) ([`099b241`](https://github.com/juspay/hyperswitch/commit/099b241096c69879a805ca81b1c5a23118e10b52)) - [PowerTranz] Use connector_response_reference_id as reference to m...
CHANGELOG.md#chunk50
null
doc_chunk
8,101
doc
null
null
null
null
null
null
null
null
null
null
null
null
pub struct DebitRoutingRequestData { pub co_badged_card_networks_info: Vec<common_enums::CardNetwork>, pub issuer_country: common_enums::CountryAlpha2, pub is_regulated: bool, pub regulated_name: Option<common_enums::RegulatedName>, pub card_type: common_enums::CardType, }
crates/api_models/src/open_router.rs
api_models
struct_definition
76
rust
DebitRoutingRequestData
null
null
null
null
null
null
null
null
null
null
null
pub fn get_merchant_details_as_secret( &self, ) -> CustomResult<Option<pii::SecretSerdeValue>, errors::ParsingError> { self.merchant_details .as_ref() .map(|merchant_details| merchant_details.encode_to_value().map(Secret::new)) .transpose() }
crates/api_models/src/admin.rs
api_models
function_signature
69
rust
null
null
null
null
get_merchant_details_as_secret
null
null
null
null
null
null
null
impl api::Payment for Wellsfargo {}
crates/hyperswitch_connectors/src/connectors/wellsfargo.rs
hyperswitch_connectors
impl_block
9
rust
null
Wellsfargo
api::Payment for
impl api::Payment for for Wellsfargo
null
null
null
null
null
null
null
null
pub struct ThemeData { settings: Settings, urls: Option<Urls>, }
crates/api_models/src/user/theme.rs
api_models
struct_definition
17
rust
ThemeData
null
null
null
null
null
null
null
null
null
null
null
impl api::RefundExecute for Paytm {}
crates/hyperswitch_connectors/src/connectors/paytm.rs
hyperswitch_connectors
impl_block
10
rust
null
Paytm
api::RefundExecute for
impl api::RefundExecute for for Paytm
null
null
null
null
null
null
null
null
pub async fn update( self, conn: &PgPooledConn, merchant_account: MerchantAccountUpdateInternal, ) -> StorageResult<Self> { match generics::generic_update_by_id::<<Self as HasTable>::Table, _, _, _>( conn, self.get_id().to_owned(), merchant_account...
crates/diesel_models/src/query/merchant_account.rs
diesel_models
function_signature
119
rust
null
null
null
null
update
null
null
null
null
null
null
null
pub async fn trigger_payouts_webhook( state: &SessionState, merchant_context: &domain::MerchantContext, payout_response: &api_models::payouts::PayoutCreateResponse, ) -> RouterResult<()> { let key_manager_state = &(state).into(); let profile_id = &payout_response.profile_id; let business_profile...
crates/router/src/utils.rs
router
function_signature
455
rust
null
null
null
null
trigger_payouts_webhook
null
null
null
null
null
null
null
impl Default for EliminationRoutingConfig { fn default() -> Self { Self { params: Some(vec![DynamicRoutingConfigParams::PaymentMethod]), elimination_analyser_config: Some(EliminationAnalyserConfig { bucket_size: Some(5), bucket_leak_interval_in_secs: S...
crates/api_models/src/routing.rs
api_models
impl_block
82
rust
null
EliminationRoutingConfig
Default for
impl Default for for EliminationRoutingConfig
null
null
null
null
null
null
null
null
pub struct SignifydFrmMetadata { pub total_shipping_cost: Option<i64>, pub fulfillment_method: Option<FulfillmentMethod>, pub coverage_request: Option<CoverageRequests>, pub order_channel: OrderChannel, }
crates/hyperswitch_connectors/src/connectors/signifyd/transformers/api.rs
hyperswitch_connectors
struct_definition
51
rust
SignifydFrmMetadata
null
null
null
null
null
null
null
null
null
null
null
File: crates/hyperswitch_domain_models/src/payouts/payout_attempt.rs Public structs: 4 use api_models::enums::PayoutConnectors; use common_enums as storage_enums; use common_utils::{ id_type, payout_method_utils, types::{UnifiedCode, UnifiedMessage}, }; use serde::{Deserialize, Serialize}; use storage_enums::...
crates/hyperswitch_domain_models/src/payouts/payout_attempt.rs
hyperswitch_domain_models
full_file
1,834
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct SquareRefundResponseDetails { status: RefundStatus, id: String, }
crates/hyperswitch_connectors/src/connectors/square/transformers.rs
hyperswitch_connectors
struct_definition
21
rust
SquareRefundResponseDetails
null
null
null
null
null
null
null
null
null
null
null
pub fn create_identity_from_certificate_and_key( encoded_certificate: masking::Secret<String>, encoded_certificate_key: masking::Secret<String>, ) -> Result<reqwest::Identity, error_stack::Report<HttpClientError>> { let decoded_certificate = BASE64_ENGINE .decode(encoded_certificate.expose()) ...
crates/external_services/src/http_client/client.rs
external_services
function_signature
197
rust
null
null
null
null
create_identity_from_certificate_and_key
null
null
null
null
null
null
null
pub async fn refunds_create( state: web::Data<AppState>, req: HttpRequest, json_payload: web::Json<refunds::RefundsCreateRequest>, ) -> HttpResponse { let flow = Flow::RefundsCreate; let global_refund_id = common_utils::id_type::GlobalRefundId::generate(&state.conf.cell_information.id); ...
crates/router/src/routes/refunds.rs
router
function_signature
343
rust
null
null
null
null
refunds_create
null
null
null
null
null
null
null
File: crates/router/src/types/storage/authentication.rs pub use diesel_models::authentication::{Authentication, AuthenticationNew, AuthenticationUpdate};
crates/router/src/types/storage/authentication.rs
router
full_file
25
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct SquareWebhookBody { #[serde(rename = "type")] pub webhook_type: String, pub data: SquareWebhookData, }
crates/hyperswitch_connectors/src/connectors/square/transformers.rs
hyperswitch_connectors
struct_definition
32
rust
SquareWebhookBody
null
null
null
null
null
null
null
null
null
null
null
impl api::PaymentSession for Tokenio {}
crates/hyperswitch_connectors/src/connectors/tokenio.rs
hyperswitch_connectors
impl_block
9
rust
null
Tokenio
api::PaymentSession for
impl api::PaymentSession for for Tokenio
null
null
null
null
null
null
null
null
File: crates/router/src/db/api_keys.rs use error_stack::report; use router_env::{instrument, tracing}; #[cfg(feature = "accounts_cache")] use storage_impl::redis::cache::{self, CacheKind, ACCOUNTS_CACHE}; use super::{MockDb, Store}; use crate::{ connection, core::errors::{self, CustomResult}, types::stora...
crates/router/src/db/api_keys.rs
router
full_file
4,265
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct TrustpayAuthUpdateRequest { pub grant_type: String, }
crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs
hyperswitch_connectors
struct_definition
16
rust
TrustpayAuthUpdateRequest
null
null
null
null
null
null
null
null
null
null
null
pub async fn insert_user_in_blacklist(state: &SessionState, user_id: &str) -> UserResult<()> { let user_blacklist_key = format!("{USER_BLACKLIST_PREFIX}{user_id}"); let expiry = expiry_to_i64(JWT_TOKEN_TIME_IN_SECS).change_context(UserErrors::InternalServerError)?; let redis_conn = get_redis_connect...
crates/router/src/services/authentication/blacklist.rs
router
function_signature
139
rust
null
null
null
null
insert_user_in_blacklist
null
null
null
null
null
null
null
pub async fn update( self, conn: &PgPooledConn, process: ProcessTrackerUpdate, ) -> StorageResult<Self> { match generics::generic_update_by_id::<<Self as HasTable>::Table, _, _, _>( conn, self.id.clone(), ProcessTrackerUpdateInternal::from(process)...
crates/diesel_models/src/query/process_tracker.rs
diesel_models
function_signature
119
rust
null
null
null
null
update
null
null
null
null
null
null
null
pub fn get_metadata_as_secret( &self, ) -> CustomResult<Option<pii::SecretSerdeValue>, errors::ParsingError> { self.metadata .as_ref() .map(|metadata| metadata.encode_to_value().map(Secret::new)) .transpose() }
crates/api_models/src/admin.rs
api_models
function_signature
63
rust
null
null
null
null
get_metadata_as_secret
null
null
null
null
null
null
null
impl std::fmt::Debug for RequestContent { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.write_str(match self { Self::Json(_) => "JsonRequestBody", Self::FormUrlEncoded(_) => "FormUrlEncodedRequestBody", Self::FormData(_) => "FormDataRequestBody", ...
crates/common_utils/src/request.rs
common_utils
impl_block
103
rust
null
RequestContent
std::fmt::Debug for
impl std::fmt::Debug for for RequestContent
null
null
null
null
null
null
null
null
pub fn construct_router_data<F: Clone, Req, Res>( state: &SessionState, authentication_connector_name: String, payment_method: PaymentMethod, merchant_id: common_utils::id_type::MerchantId, address: types::PaymentAddress, request_data: Req, merchant_connector_account: &payments_helpers::Merc...
crates/router/src/core/authentication/transformers.rs
router
function_signature
622
rust
null
null
null
null
construct_router_data
null
null
null
null
null
null
null
pub struct BlackhawknetworkAuthType { pub(super) client_id: Secret<String>, pub(super) client_secret: Secret<String>, pub(super) product_line_id: Secret<String>, }
crates/hyperswitch_connectors/src/connectors/blackhawknetwork/transformers.rs
hyperswitch_connectors
struct_definition
40
rust
BlackhawknetworkAuthType
null
null
null
null
null
null
null
null
null
null
null
/// Verifies that the client configuration is usable pub fn validate(&self) -> Result<(), &'static str> { match self { #[cfg(feature = "aws_kms")] Self::AwsKms { aws_kms } => aws_kms.validate(), Self::NoEncryption => Ok(()), } }
crates/external_services/src/managers/encryption_management.rs
external_services
function_signature
69
rust
null
null
null
null
validate
null
null
null
null
null
null
null
pub async fn find_last_successful_attempt_by_payment_id_merchant_id( conn: &PgPooledConn, payment_id: &common_utils::id_type::PaymentId, merchant_id: &common_utils::id_type::MerchantId, ) -> StorageResult<Self> { // perform ordering on the application level instead of database level ...
crates/diesel_models/src/query/payment_attempt.rs
diesel_models
function_signature
187
rust
null
null
null
null
find_last_successful_attempt_by_payment_id_merchant_id
null
null
null
null
null
null
null
File: crates/hyperswitch_domain_models/src/router_flow_types/refunds.rs Public structs: 2 #[derive(Debug, Clone)] pub struct Execute; #[derive(Debug, Clone)] pub struct RSync;
crates/hyperswitch_domain_models/src/router_flow_types/refunds.rs
hyperswitch_domain_models
full_file
44
null
null
null
null
null
null
null
null
null
null
null
null
null
pub fn new( tenant_id: id_type::TenantId, request_id: Option<RequestId>, payment_id: String, profile_id: id_type::ProfileId, merchant_id: id_type::MerchantId, flow: String, request: Option<Req>, parse_response: bool, log_event: bool, ) -> Self ...
crates/router/src/core/payments/routing/utils.rs
router
function_signature
124
rust
null
null
null
null
new
null
null
null
null
null
null
null
pub async fn migrate_payment_method( _state: &state::PaymentMethodsState, _req: pm_api::PaymentMethodMigrate, _merchant_id: &id_type::MerchantId, _merchant_context: &merchant_context::MerchantContext, _controller: &dyn PaymentMethodsController, ) -> CustomResult<ApplicationResponse<pm_api::PaymentMe...
crates/payment_methods/src/core/migration/payment_methods.rs
payment_methods
function_signature
91
rust
null
null
null
null
migrate_payment_method
null
null
null
null
null
null
null
pub struct MerchantAccountSetter { pub merchant_id: common_utils::id_type::MerchantId, pub return_url: Option<String>, pub enable_payment_response_hash: bool, pub payment_response_hash_key: Option<String>, pub redirect_to_merchant_with_http_post: bool, pub merchant_name: Option<Encryption>, ...
crates/diesel_models/src/merchant_account.rs
diesel_models
struct_definition
375
rust
MerchantAccountSetter
null
null
null
null
null
null
null
null
null
null
null
pub struct ChargebackUpdateRequest { #[serde(rename = "@xmlns")] xmlns: String, activity_type: ActivityType, }
crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs
hyperswitch_connectors
struct_definition
28
rust
ChargebackUpdateRequest
null
null
null
null
null
null
null
null
null
null
null
pub async fn can_user_access_theme( user: &UserFromToken, user_entity_type: &EntityType, theme: &Theme, ) -> UserResult<()> { if user_entity_type < &theme.entity_type { return Err(UserErrors::ThemeNotFound.into()); } match theme.entity_type { EntityType::Tenant => { ...
crates/router/src/utils/user/theme.rs
router
function_signature
392
rust
null
null
null
null
can_user_access_theme
null
null
null
null
null
null
null
/// If the country code is invalid, it returns a `ValidationError` with the appropriate error message. pub fn validate_and_get_country_from_merchant_country_code( &self, ) -> errors::CustomResult<common_enums::Country, errors::ValidationError> { let country_code = self.get_country_code(); ...
crates/common_types/src/payments.rs
common_types
function_signature
195
rust
null
null
null
null
validate_and_get_country_from_merchant_country_code
null
null
null
null
null
null
null
pub async fn find_by_merchant_id_preprocessing_id( conn: &PgPooledConn, merchant_id: &common_utils::id_type::MerchantId, preprocessing_id: &str, ) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::merchant_id ...
crates/diesel_models/src/query/payment_attempt.rs
diesel_models
function_signature
112
rust
null
null
null
null
find_by_merchant_id_preprocessing_id
null
null
null
null
null
null
null
pub struct NetworkTokenizationBuilder<'a, S: State> { /// Current state state: std::marker::PhantomData<S>, /// Customer details pub customer: Option<&'a api::CustomerDetails>, /// Card details pub card: Option<domain::CardDetail>, /// CVC pub card_cvc: Option<Secret<String>>, //...
crates/router/src/core/payment_methods/tokenize.rs
router
struct_definition
231
rust
NetworkTokenizationBuilder
null
null
null
null
null
null
null
null
null
null
null
impl std::ops::DerefMut for PaymentsTokenReference { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } }
crates/hyperswitch_domain_models/src/mandates.rs
hyperswitch_domain_models
impl_block
39
rust
null
PaymentsTokenReference
std::ops::DerefMut for
impl std::ops::DerefMut for for PaymentsTokenReference
null
null
null
null
null
null
null
null
key_manager_state: &KeyManagerState, merchant_key_store: &domain::MerchantKeyStore, algorithm_id: id_type::RoutingId, transaction_type: &storage::enums::TransactionType, ) -> RouterResult<()> { let routing_cache_key = self.clone().get_routing_config_cache_key(); let ...
crates/router/src/core/admin.rs#chunk4
router
chunk
4,575
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct RefundResponse { refund: PayuRefundResponseData, }
crates/hyperswitch_connectors/src/connectors/payu/transformers.rs
hyperswitch_connectors
struct_definition
17
rust
RefundResponse
null
null
null
null
null
null
null
null
null
null
null
pub fn get_webhook_url_from_profile(&self) -> CustomResult<String, ValidationError> { self.webhook_details .clone() .and_then(|details| details.webhook_url) .get_required_value("webhook_details.webhook_url") .map(ExposeInterface::expose) }
crates/hyperswitch_domain_models/src/business_profile.rs
hyperswitch_domain_models
function_signature
66
rust
null
null
null
null
get_webhook_url_from_profile
null
null
null
null
null
null
null
pub struct OrganizationUpdateInternal { org_name: Option<String>, organization_name: Option<String>, organization_details: Option<pii::SecretSerdeValue>, metadata: Option<pii::SecretSerdeValue>, modified_at: time::PrimitiveDateTime, platform_merchant_id: Option<id_type::MerchantId>, }
crates/diesel_models/src/organization.rs
diesel_models
struct_definition
69
rust
OrganizationUpdateInternal
null
null
null
null
null
null
null
null
null
null
null
pub fn update(&mut self, new: Self) { if let Some(new_cons) = new.constants { self.constants = Some(new_cons) } if let Some(new_time_scale) = new.time_scale { self.time_scale = Some(new_time_scale) } }
crates/api_models/src/routing.rs
api_models
function_signature
60
rust
null
null
null
null
update
null
null
null
null
null
null
null
File: crates/euclid_wasm/src/utils.rs use wasm_bindgen::prelude::*; pub trait JsResultExt<T> { fn err_to_js(self) -> Result<T, JsValue>; } impl<T, E> JsResultExt<T> for Result<T, E> where E: serde::Serialize, { fn err_to_js(self) -> Result<T, JsValue> { match self { Ok(t) => Ok(t), ...
crates/euclid_wasm/src/utils.rs
euclid_wasm
full_file
120
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct XenditCaptureResponse { pub id: String, pub status: PaymentStatus, pub actions: Option<Vec<Action>>, pub payment_method: PaymentMethodInfo, pub failure_code: Option<String>, pub reference_id: Secret<String>, }
crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs
hyperswitch_connectors
struct_definition
54
rust
XenditCaptureResponse
null
null
null
null
null
null
null
null
null
null
null
pub async fn are_all_tokens_hard_declined( state: &SessionState, connector_customer_id: &str, ) -> CustomResult<bool, errors::StorageError> { let tokens_map = Self::get_connector_customer_payment_processor_tokens(state, connector_customer_id) .await?; let ...
crates/router/src/types/storage/revenue_recovery_redis_operation.rs
router
function_signature
139
rust
null
null
null
null
are_all_tokens_hard_declined
null
null
null
null
null
null
null
Web Documentation: Setup MCP Server | Hyperswitch # Type: Web Doc This MCP server is only meant for product exploration while using sandbox environment. DO NOT USE Hyperswitch API Key from the PRODUCTION ENVIRONMENT. Prerequisites : Ensure you have an MCP client installed (Cursor, Claude Desktop, Cline, etc.) Step 1: ...
https://docs.hyperswitch.io/about-hyperswitch/ai-resources/setup-mcp-server
null
web_doc_file
386
doc
null
null
null
null
null
web
null
null
null
https://docs.hyperswitch.io/about-hyperswitch/ai-resources/setup-mcp-server
Setup MCP Server | Hyperswitch
null
/// Get the unique identifier of MerchantAccount pub fn get_id(&self) -> &common_utils::id_type::MerchantId { &self.merchant_id }
crates/hyperswitch_domain_models/src/merchant_account.rs
hyperswitch_domain_models
function_signature
37
rust
null
null
null
null
get_id
null
null
null
null
null
null
null
/// This function transforms the decision_engine response in a way that's usable for further flows: /// It places evaluated_output connectors first, followed by remaining output connectors (no duplicates). pub fn transform_de_output_for_router( de_output: Vec<ConnectorInfo>, de_evaluated_output: Vec<RoutableCon...
crates/router/src/core/payments/routing/utils.rs
router
function_signature
281
rust
null
null
null
null
transform_de_output_for_router
null
null
null
null
null
null
null
pub async fn get_frm_metrics( &self, metric: &FrmMetrics, dimensions: &[FrmDimensions], merchant_id: &common_utils::id_type::MerchantId, filters: &FrmFilters, granularity: Option<Granularity>, time_range: &TimeRange, ) -> types::MetricsResult<Vec<(FrmMetricsBu...
crates/analytics/src/lib.rs
analytics
function_signature
583
rust
null
null
null
null
get_frm_metrics
null
null
null
null
null
null
null
impl ConnectorCommon for Bitpay { fn id(&self) -> &'static str { "bitpay" } fn get_currency_unit(&self) -> api::CurrencyUnit { api::CurrencyUnit::Minor } fn common_get_content_type(&self) -> &'static str { "application/json" } fn base_url<'a>(&self, connectors: &'a...
crates/hyperswitch_connectors/src/connectors/bitpay.rs
hyperswitch_connectors
impl_block
388
rust
null
Bitpay
ConnectorCommon for
impl ConnectorCommon for for Bitpay
null
null
null
null
null
null
null
null
File: crates/external_services/src/email/smtp.rs Public functions: 3 Public structs: 2 use std::time::Duration; use common_utils::{errors::CustomResult, pii}; use error_stack::ResultExt; use lettre::{ address::AddressError, error, message::{header::ContentType, Mailbox}, transport::smtp::{self, auth...
crates/external_services/src/email/smtp.rs
external_services
full_file
1,466
null
null
null
null
null
null
null
null
null
null
null
null
null
impl crate::events::ApiEventMetric for ClientSecretId { fn get_api_event_type(&self) -> Option<crate::events::ApiEventsType> { Some(crate::events::ApiEventsType::ClientSecret { key_id: self.clone(), }) } }
crates/common_utils/src/id_type/client_secret.rs
common_utils
impl_block
59
rust
null
ClientSecretId
crate::events::ApiEventMetric for
impl crate::events::ApiEventMetric for for ClientSecretId
null
null
null
null
null
null
null
null
pub trait GetPaymentMethodDetails { fn get_name(&self) -> &'static str; fn get_image_link(&self, base_url: &str) -> String; }
crates/router/src/routes/dummy_connector/types.rs
router
trait_definition
37
rust
null
null
GetPaymentMethodDetails
null
null
null
null
null
null
null
null
null
pub struct Relay { pub id: common_utils::id_type::RelayId, pub connector_resource_id: String, pub connector_id: common_utils::id_type::MerchantConnectorAccountId, pub profile_id: common_utils::id_type::ProfileId, pub merchant_id: common_utils::id_type::MerchantId, pub relay_type: storage_enums::...
crates/diesel_models/src/relay.rs
diesel_models
struct_definition
202
rust
Relay
null
null
null
null
null
null
null
null
null
null
null
impl Default for Proxy { fn default() -> Self { Self { http_url: Default::default(), https_url: Default::default(), idle_pool_connection_timeout: Some(90), bypass_proxy_hosts: Default::default(), } } }
crates/hyperswitch_interfaces/src/types.rs
hyperswitch_interfaces
impl_block
56
rust
null
Proxy
Default for
impl Default for for Proxy
null
null
null
null
null
null
null
null
impl ConnectorSpecifications for Stripe { fn get_connector_about(&self) -> Option<&'static ConnectorInfo> { Some(&STRIPE_CONNECTOR_INFO) } fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> { Some(&*STRIPE_SUPPORTED_PAYMENT_METHODS) } fn get_support...
crates/hyperswitch_connectors/src/connectors/stripe.rs
hyperswitch_connectors
impl_block
109
rust
null
Stripe
ConnectorSpecifications for
impl ConnectorSpecifications for for Stripe
null
null
null
null
null
null
null
null
Web Documentation: Payment Features | Hyperswitch # Type: Web Doc HyperSwitch SDKs provide client-side payment capabilities across web and mobile platforms. Our frontend SDKs handle secure payment collection, user authentication, and seamless checkout experiences while maintaining PCI compliance. Core SDK Features Pay...
https://docs.hyperswitch.io/explore-hyperswitch/merchant-controls/payment-features
null
web_doc_file
350
doc
null
null
null
null
null
web
null
null
null
https://docs.hyperswitch.io/explore-hyperswitch/merchant-controls/payment-features
Payment Features | Hyperswitch
null
impl behaviour::Conversion for Customer { type DstType = diesel_models::customers::Customer; type NewDstType = diesel_models::customers::CustomerNew; async fn convert(self) -> CustomResult<Self::DstType, ValidationError> { Ok(diesel_models::customers::Customer { customer_id: self.custome...
crates/hyperswitch_domain_models/src/customer.rs
hyperswitch_domain_models
impl_block
825
rust
null
Customer
behaviour::Conversion for
impl behaviour::Conversion for for Customer
null
null
null
null
null
null
null
null
pub struct RefundResponseData { //Some field related to foreign exchange and split payment can be added as and when implemented pub id: String, pub payment: String, pub amount: i64, pub currency: enums::Currency, pub status: RefundStatus, pub created_at: Option<i64>, pub failure_reason: ...
crates/hyperswitch_connectors/src/connectors/rapyd/transformers.rs
hyperswitch_connectors
struct_definition
81
rust
RefundResponseData
null
null
null
null
null
null
null
null
null
null
null
pub struct SantanderRouterData<T> { pub amount: StringMajorUnit, pub router_data: T, }
crates/hyperswitch_connectors/src/connectors/santander/transformers.rs
hyperswitch_connectors
struct_definition
25
rust
SantanderRouterData
null
null
null
null
null
null
null
null
null
null
null
pub struct FraudCheck { pub frm_id: String, pub payment_id: common_utils::id_type::PaymentId, pub merchant_id: common_utils::id_type::MerchantId, pub attempt_id: String, pub created_at: PrimitiveDateTime, pub frm_name: String, pub frm_transaction_id: Option<String>, pub frm_transaction_t...
crates/diesel_models/src/fraud_check.rs
diesel_models
struct_definition
224
rust
FraudCheck
null
null
null
null
null
null
null
null
null
null
null
impl ConnectorValidation for Deutschebank { fn validate_mandate_payment( &self, pm_type: Option<enums::PaymentMethodType>, pm_data: hyperswitch_domain_models::payment_method_data::PaymentMethodData, ) -> CustomResult<(), errors::ConnectorError> { let mandate_supported_pmd = ...
crates/hyperswitch_connectors/src/connectors/deutschebank.rs
hyperswitch_connectors
impl_block
113
rust
null
Deutschebank
ConnectorValidation for
impl ConnectorValidation for for Deutschebank
null
null
null
null
null
null
null
null
impl ConnectorCommon for Shift4 { fn id(&self) -> &'static str { "shift4" } fn common_get_content_type(&self) -> &'static str { "application/json" } fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str { connectors.shift4.base_url.as_ref() } fn get_auth_he...
crates/hyperswitch_connectors/src/connectors/shift4.rs
hyperswitch_connectors
impl_block
380
rust
null
Shift4
ConnectorCommon for
impl ConnectorCommon for for Shift4
null
null
null
null
null
null
null
null
pub fn get_error_reason( error_info: Option<String>, detailed_error_info: Option<String>, avs_error_info: Option<String>, ) -> Option<String> { match (error_info, detailed_error_info, avs_error_info) { (Some(message), Some(details), Some(avs_message)) => Some(format!( "{message}, det...
crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs
hyperswitch_connectors
function_signature
237
rust
null
null
null
null
get_error_reason
null
null
null
null
null
null
null
impl api::RefundExecute for HyperswitchVault {}
crates/hyperswitch_connectors/src/connectors/hyperswitch_vault.rs
hyperswitch_connectors
impl_block
12
rust
null
HyperswitchVault
api::RefundExecute for
impl api::RefundExecute for for HyperswitchVault
null
null
null
null
null
null
null
null
pub async fn get_authorization_info( state: web::Data<AppState>, http_req: HttpRequest, ) -> HttpResponse { let flow = Flow::GetAuthorizationInfo; Box::pin(api::server_wrap( flow, state.clone(), &http_req, (), |state, _: (), _, _| async move { user_rol...
crates/router/src/routes/user_role.rs
router
function_signature
125
rust
null
null
null
null
get_authorization_info
null
null
null
null
null
null
null
impl<V> ConstraintGraph<V> where V: ValueNode, { fn get_predecessor_edges_by_domain( &self, node_id: NodeId, domains: Option<&[DomainId]>, ) -> Result<Vec<&Edge>, GraphError<V>> { let node = self.nodes.get(node_id).ok_or(GraphError::NodeNotFound)?; let mut final_list ...
crates/hyperswitch_constraint_graph/src/graph.rs
hyperswitch_constraint_graph
impl_block
4,098
rust
null
ConstraintGraph
null
impl ConstraintGraph
null
null
null
null
null
null
null
null
File: crates/router/src/core/verify_connector.rs Public functions: 1 use api_models::{enums::Connector, verify_connector::VerifyConnectorRequest}; use error_stack::ResultExt; use crate::{ connector, core::errors, services, types::{ api::{ self, verify_connector::{self ...
crates/router/src/core/verify_connector.rs
router
full_file
423
null
null
null
null
null
null
null
null
null
null
null
null
null
impl Capture { pub async fn find_by_capture_id(conn: &PgPooledConn, capture_id: &str) -> StorageResult<Self> { generics::generic_find_one::<<Self as HasTable>::Table, _, _>( conn, dsl::capture_id.eq(capture_id.to_owned()), ) .await } pub async fn update_with_...
crates/diesel_models/src/query/capture.rs
diesel_models
impl_block
379
rust
null
Capture
null
impl Capture
null
null
null
null
null
null
null
null
pub fn add_custom_filter_clause( &mut self, lhs: impl ToSql<T>, rhs: impl ToSql<T>, comparison: FilterTypes, ) -> QueryResult<()> { let filter = Filter::Plain( lhs.to_sql(&self.table_engine) .change_context(QueryBuildingError::SqlSerializeError) ...
crates/analytics/src/query.rs
analytics
function_signature
135
rust
null
null
null
null
add_custom_filter_clause
null
null
null
null
null
null
null
impl fmt::Display for BokuPaymentType { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Self::Dana => write!(f, "Dana"), Self::Momo => write!(f, "Momo"), Self::Gcash => write!(f, "Gcash"), Self::GoPay => write!(f, "GoPay"), ...
crates/hyperswitch_connectors/src/connectors/boku/transformers.rs
hyperswitch_connectors
impl_block
114
rust
null
BokuPaymentType
fmt::Display for
impl fmt::Display for for BokuPaymentType
null
null
null
null
null
null
null
null
File: crates/router/src/core/mandate.rs Public functions: 6 pub mod helpers; pub mod utils; use api_models::payments; use common_types::payments as common_payments_types; use common_utils::{ext_traits::Encode, id_type}; use diesel_models::enums as storage_enums; use error_stack::{report, ResultExt}; use futures::futu...
crates/router/src/core/mandate.rs
router
full_file
3,389
null
null
null
null
null
null
null
null
null
null
null
null
null
pub fn new() -> Self { Self { card_migrated: None, network_token_migrated: None, connector_mandate_details_migrated: None, network_transaction_migrated: None, } }
crates/payment_methods/src/core/migration.rs
payment_methods
function_signature
48
rust
null
null
null
null
new
null
null
null
null
null
null
null
impl api::RefundSync for Billwerk {}
crates/hyperswitch_connectors/src/connectors/billwerk.rs
hyperswitch_connectors
impl_block
10
rust
null
Billwerk
api::RefundSync for
impl api::RefundSync for for Billwerk
null
null
null
null
null
null
null
null
pub struct CustombillingPaymentsRequest { amount: StringMinorUnit, card: CustombillingCard, }
crates/hyperswitch_connectors/src/connectors/custombilling/transformers.rs
hyperswitch_connectors
struct_definition
22
rust
CustombillingPaymentsRequest
null
null
null
null
null
null
null
null
null
null
null