repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/configs.rs | crates/router/src/configs.rs | use hyperswitch_interfaces::secrets_interface::secret_state::RawSecret;
pub(crate) mod defaults;
pub mod secrets_transformers;
pub mod settings;
mod validations;
pub type Settings = settings::Settings<RawSecret>;
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/routes.rs | crates/router/src/routes.rs | pub mod admin;
pub mod api_keys;
pub mod app;
#[cfg(feature = "v1")]
pub mod apple_pay_certificates_migration;
pub mod authentication;
#[cfg(all(feature = "olap", feature = "v1"))]
pub mod blocklist;
pub mod cache;
pub mod cards_info;
pub mod configs;
#[cfg(feature = "olap")]
pub mod connector_onboarding;
#[cfg(any(fea... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/locale.rs | crates/router/src/locale.rs | use rust_i18n::i18n;
i18n!("locales", fallback = "en");
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/analytics.rs | crates/router/src/analytics.rs | pub use analytics::*;
pub mod routes {
use std::{
collections::{HashMap, HashSet},
sync::Arc,
};
use actix_web::{web, Responder, Scope};
use analytics::{
api_event::api_events_core, connector_events::connector_events_core, enums::AuthInfo,
errors::AnalyticsError, lambda... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/kafka.rs | crates/router/src/services/kafka.rs | use std::{collections::HashMap, sync::Arc};
use common_utils::{errors::CustomResult, types::TenantConfig};
use error_stack::{report, ResultExt};
use events::{EventsError, Message, MessagingInterface};
use num_traits::ToPrimitive;
use rdkafka::{
config::FromClientConfig,
message::{Header, OwnedHeaders},
pro... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/email.rs | crates/router/src/services/email.rs | pub mod types;
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/jwt.rs | crates/router/src/services/jwt.rs | use common_utils::errors::CustomResult;
use error_stack::ResultExt;
use jsonwebtoken::{encode, EncodingKey, Header};
use masking::PeekInterface;
use crate::{configs::Settings, core::errors::UserErrors};
pub fn generate_exp(
exp_duration: std::time::Duration,
) -> CustomResult<std::time::Duration, UserErrors> {
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/logger.rs | crates/router/src/services/logger.rs | //! Logger of the system.
pub use crate::logger::*;
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/encryption.rs | crates/router/src/services/encryption.rs | use std::str;
use error_stack::{report, ResultExt};
use josekit::{jwe, jws};
use serde::{Deserialize, Serialize};
use crate::{
core::errors::{self, CustomResult},
utils,
};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct JwsBody {
pub header: String,
pub payload: String,
pub signature:... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/pm_auth.rs | crates/router/src/services/pm_auth.rs | use pm_auth::{
consts,
core::errors::ConnectorError,
types::{self as pm_auth_types, api::BoxedConnectorIntegration, PaymentAuthRouterData},
};
use crate::{
core::errors::{self},
logger,
routes::SessionState,
services::{self},
};
pub async fn execute_connector_processing_step<'b, T, Req, Re... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/card_testing_guard.rs | crates/router/src/services/card_testing_guard.rs | use std::sync::Arc;
use error_stack::ResultExt;
use redis_interface::RedisConnectionPool;
use crate::{
core::errors::{ApiErrorResponse, RouterResult},
routes::app::SessionStateInfo,
};
fn get_redis_connection<A: SessionStateInfo>(state: &A) -> RouterResult<Arc<RedisConnectionPool>> {
state
.store... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/api.rs | crates/router/src/services/api.rs | pub mod client;
pub mod generic_link_response;
pub mod request;
use std::{
collections::{HashMap, HashSet},
fmt::Debug,
future::Future,
str,
sync::Arc,
time::{Duration, Instant},
};
use actix_http::header::HeaderMap;
use actix_web::{
body,
http::header::{HeaderName, HeaderValue},
we... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/openidconnect.rs | crates/router/src/services/openidconnect.rs | use common_utils::errors::ErrorSwitch;
use error_stack::ResultExt;
use external_services::http_client::client;
use masking::{ExposeInterface, Secret};
use oidc::TokenResponse;
use openidconnect::{self as oidc, core as oidc_core};
use redis_interface::RedisConnectionPool;
use storage_impl::errors::ApiClientError;
use c... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/authentication.rs | crates/router/src/services/authentication.rs | use std::{marker::PhantomData, str::FromStr};
use actix_web::http::header::HeaderMap;
#[cfg(feature = "v2")]
use api_models::payment_methods::PaymentMethodIntentConfirm;
#[cfg(feature = "v1")]
use api_models::payment_methods::{PaymentMethodCreate, PaymentMethodListRequest};
use api_models::payments;
#[cfg(feature = "p... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/authorization.rs | crates/router/src/services/authorization.rs | use std::sync::Arc;
use common_utils::id_type;
use error_stack::ResultExt;
use redis_interface::RedisConnectionPool;
use router_env::logger;
use super::authentication::AuthToken;
use crate::{
consts,
core::errors::{ApiErrorResponse, RouterResult, StorageErrorExt},
routes::app::SessionStateInfo,
};
#[cfg(... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/connector_integration_interface.rs | crates/router/src/services/connector_integration_interface.rs | pub use hyperswitch_interfaces::{
authentication::ExternalAuthenticationPayload, connector_integration_interface::*,
connector_integration_v2::ConnectorIntegrationV2, webhooks::IncomingWebhookFlowError,
};
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/oidc_provider.rs | crates/router/src/services/oidc_provider.rs | use api_models::oidc::{
Jwk, JwksResponse, KeyType, KeyUse, OidcDiscoveryResponse, SigningAlgorithm,
};
use error_stack::ResultExt;
use once_cell::sync::OnceCell;
use crate::{
core::errors::{ApiErrorResponse, RouterResponse},
routes::app::SessionState,
services::api::ApplicationResponse,
utils::use... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/authorization/permission_groups.rs | crates/router/src/services/authorization/permission_groups.rs | use std::{collections::HashMap, ops::Not};
use common_enums::{EntityType, ParentGroup, PermissionGroup, PermissionScope, Resource};
use strum::IntoEnumIterator;
use super::permissions;
pub trait PermissionGroupExt {
fn scope(&self) -> PermissionScope;
fn parent(&self) -> ParentGroup;
fn resources(&self) ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/authorization/permissions.rs | crates/router/src/services/authorization/permissions.rs | use common_enums::{EntityType, PermissionScope, Resource};
use router_derive::generate_permissions;
generate_permissions! {
permissions: [
Payment: {
scopes: [Read, Write],
entities: [Profile, Merchant]
},
Refund: {
scopes: [Read, Write],
enti... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/authorization/info.rs | crates/router/src/services/authorization/info.rs | use std::ops::Not;
use api_models::user_role::GroupInfo;
use common_enums::{ParentGroup, PermissionGroup};
use strum::IntoEnumIterator;
// TODO: To be deprecated
pub fn get_group_authorization_info() -> Option<Vec<GroupInfo>> {
let groups = PermissionGroup::iter()
.filter_map(get_group_info_from_permissio... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/authorization/roles.rs | crates/router/src/services/authorization/roles.rs | #[cfg(feature = "recon")]
use std::collections::HashMap;
use std::collections::HashSet;
#[cfg(feature = "recon")]
use api_models::enums::ReconPermissionScope;
use common_enums::{EntityType, PermissionGroup, Resource, RoleScope};
use common_utils::{errors::CustomResult, id_type};
#[cfg(feature = "recon")]
use super::p... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/authorization/roles/predefined_roles.rs | crates/router/src/services/authorization/roles/predefined_roles.rs | use std::{collections::HashMap, sync::LazyLock};
use common_enums::{EntityType, PermissionGroup, RoleScope};
use super::RoleInfo;
use crate::consts;
pub static PREDEFINED_ROLES: LazyLock<HashMap<&'static str, RoleInfo>> = LazyLock::new(|| {
let mut roles = HashMap::new();
// Internal Roles
roles.insert(... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/authentication/detached.rs | crates/router/src/services/authentication/detached.rs | use std::{borrow::Cow, string::ToString};
use actix_web::http::header::HeaderMap;
use common_utils::{
crypto::VerifySignature,
id_type::{ApiKeyId, MerchantId},
};
use error_stack::ResultExt;
use hyperswitch_domain_models::errors::api_error_response::ApiErrorResponse;
use crate::core::errors::RouterResult;
co... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/authentication/cookies.rs | crates/router/src/services/authentication/cookies.rs | use cookie::Cookie;
#[cfg(feature = "olap")]
use cookie::{
time::{Duration, OffsetDateTime},
SameSite,
};
use error_stack::{report, ResultExt};
#[cfg(feature = "olap")]
use masking::Mask;
#[cfg(feature = "olap")]
use masking::{ExposeInterface, Secret};
use crate::{
consts::JWT_TOKEN_COOKIE_NAME,
core::... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/authentication/decision.rs | crates/router/src/services/authentication/decision.rs | use common_utils::{errors::CustomResult, request::RequestContent};
use masking::{ErasedMaskSerialize, Secret};
use serde::Serialize;
use storage_impl::errors::ApiClientError;
use crate::{
core::metrics,
routes::{app::settings::DecisionConfig, SessionState},
};
// # Consts
//
const DECISION_ENDPOINT: &str = "... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/authentication/blacklist.rs | crates/router/src/services/authentication/blacklist.rs | use std::sync::Arc;
#[cfg(feature = "olap")]
use common_utils::date_time;
use error_stack::ResultExt;
use redis_interface::RedisConnectionPool;
use super::AuthToken;
#[cfg(feature = "olap")]
use super::{SinglePurposeOrLoginToken, SinglePurposeToken};
#[cfg(feature = "email")]
use crate::consts::{EMAIL_TOKEN_BLACKLIST... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/api/client.rs | crates/router/src/services/api/client.rs | use std::time::Duration;
use common_utils::errors::ReportSwitchExt;
use error_stack::ResultExt;
pub use external_services::http_client::{self, client};
use http::{HeaderValue, Method};
pub use hyperswitch_interfaces::{
api_client::{ApiClient, ApiClientWrapper, RequestBuilder},
types::Proxy,
};
use masking::Pee... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/api/request.rs | crates/router/src/services/api/request.rs | pub use common_utils::request::ContentType;
pub use masking::{Mask, Maskable};
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/api/generic_link_response.rs | crates/router/src/services/api/generic_link_response.rs | use common_utils::errors::CustomResult;
use error_stack::ResultExt;
use hyperswitch_domain_models::api::{
GenericExpiredLinkData, GenericLinkFormData, GenericLinkStatusData, GenericLinksData,
};
use tera::{Context, Tera};
use super::build_secure_payment_link_html;
use crate::core::errors;
pub mod context;
pub fn ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/api/generic_link_response/context.rs | crates/router/src/services/api/generic_link_response/context.rs | use common_utils::consts::DEFAULT_LOCALE;
use rust_i18n::t;
use tera::Context;
fn get_language(locale_str: &str) -> String {
let lowercase_str = locale_str.to_lowercase();
let primary_locale = lowercase_str.split(',').next().unwrap_or("").trim();
if primary_locale.is_empty() {
return DEFAULT_LOCAL... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/email/types.rs | crates/router/src/services/email/types.rs | use api_models::user::dashboard_metadata::ProdIntent;
use common_enums::{EntityType, MerchantProductType};
use common_utils::{errors::CustomResult, pii, types::user::EmailThemeConfig};
use error_stack::ResultExt;
use external_services::email::{EmailContents, EmailData, EmailError};
use masking::{ExposeInterface, PeekIn... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/kafka/payment_attempt.rs | crates/router/src/services/kafka/payment_attempt.rs | #[cfg(feature = "v2")]
use common_types::payments;
#[cfg(feature = "v2")]
use common_utils::types;
use common_utils::{id_type, types::MinorUnit};
use diesel_models::enums as storage_enums;
#[cfg(feature = "v2")]
use diesel_models::payment_attempt;
#[cfg(feature = "v2")]
use hyperswitch_domain_models::{
address, pay... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/kafka/fraud_check.rs | crates/router/src/services/kafka/fraud_check.rs | // use diesel_models::enums as storage_enums;
use diesel_models::{
enums as storage_enums,
enums::{FraudCheckLastStep, FraudCheckStatus, FraudCheckType},
fraud_check::FraudCheck,
};
use time::OffsetDateTime;
#[derive(serde::Serialize, Debug)]
pub struct KafkaFraudCheck<'a> {
pub frm_id: &'a String,
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/kafka/payment_intent_event.rs | crates/router/src/services/kafka/payment_intent_event.rs | #[cfg(feature = "v2")]
use ::common_types::{
payments,
primitive_wrappers::{EnablePartialAuthorizationBool, RequestExtendedAuthorizationBool},
};
#[cfg(feature = "v2")]
use common_enums::{self, RequestIncrementalAuthorization};
use common_utils::{
crypto::Encryptable, hashing::HashedString, id_type, pii, ty... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/kafka/dispute_event.rs | crates/router/src/services/kafka/dispute_event.rs | use common_utils::{
ext_traits::StringExt,
types::{AmountConvertor, MinorUnit, StringMinorUnitForConnector},
};
use diesel_models::enums as storage_enums;
use masking::Secret;
use time::OffsetDateTime;
use crate::types::storage::dispute::Dispute;
#[serde_with::skip_serializing_none]
#[derive(serde::Serialize,... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/kafka/payment_attempt_event.rs | crates/router/src/services/kafka/payment_attempt_event.rs | #[cfg(feature = "v2")]
use common_types::payments;
#[cfg(feature = "v2")]
use common_utils::types;
use common_utils::{id_type, types::MinorUnit};
use diesel_models::enums as storage_enums;
#[cfg(feature = "v2")]
use diesel_models::payment_attempt;
#[cfg(feature = "v2")]
use hyperswitch_domain_models::{
address, pay... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/kafka/revenue_recovery.rs | crates/router/src/services/kafka/revenue_recovery.rs | use common_utils::{id_type, types::MinorUnit};
use masking::Secret;
use time::OffsetDateTime;
#[derive(serde::Serialize, Debug)]
pub struct RevenueRecovery<'a> {
pub merchant_id: &'a id_type::MerchantId,
pub invoice_amount: MinorUnit,
pub invoice_currency: &'a common_enums::Currency,
#[serde(default, wi... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/kafka/dispute.rs | crates/router/src/services/kafka/dispute.rs | use common_utils::{
ext_traits::StringExt,
id_type,
types::{AmountConvertor, MinorUnit, StringMinorUnitForConnector},
};
use diesel_models::enums as storage_enums;
use masking::Secret;
use time::OffsetDateTime;
use crate::types::storage::dispute::Dispute;
#[derive(serde::Serialize, Debug)]
pub struct Kafk... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/kafka/payment_intent.rs | crates/router/src/services/kafka/payment_intent.rs | #[cfg(feature = "v2")]
use ::common_types::{
payments,
primitive_wrappers::{EnablePartialAuthorizationBool, RequestExtendedAuthorizationBool},
};
#[cfg(feature = "v2")]
use common_enums::RequestIncrementalAuthorization;
use common_utils::{
crypto::Encryptable, hashing::HashedString, id_type, pii, types as c... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/kafka/authentication_event.rs | crates/router/src/services/kafka/authentication_event.rs | use diesel_models::enums as storage_enums;
use time::OffsetDateTime;
#[serde_with::skip_serializing_none]
#[derive(serde::Serialize, Debug)]
pub struct KafkaAuthenticationEvent<'a> {
pub authentication_id: &'a common_utils::id_type::AuthenticationId,
pub merchant_id: &'a common_utils::id_type::MerchantId,
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/kafka/refund_event.rs | crates/router/src/services/kafka/refund_event.rs | #[cfg(feature = "v2")]
use common_utils::pii;
#[cfg(feature = "v2")]
use common_utils::types::{self, ChargeRefunds};
use common_utils::{
id_type,
types::{ConnectorTransactionIdTrait, MinorUnit},
};
use diesel_models::{enums as storage_enums, refund::Refund};
use time::OffsetDateTime;
use crate::events;
#[cfg(... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/kafka/fraud_check_event.rs | crates/router/src/services/kafka/fraud_check_event.rs | use diesel_models::{
enums as storage_enums,
enums::{FraudCheckLastStep, FraudCheckStatus, FraudCheckType},
fraud_check::FraudCheck,
};
use time::OffsetDateTime;
#[derive(serde::Serialize, Debug)]
pub struct KafkaFraudCheckEvent<'a> {
pub frm_id: &'a String,
pub payment_id: &'a common_utils::id_typ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/kafka/payout.rs | crates/router/src/services/kafka/payout.rs | use common_utils::{id_type, pii, types::MinorUnit};
use diesel_models::enums as storage_enums;
use hyperswitch_domain_models::payouts::{payout_attempt::PayoutAttempt, payouts::Payouts};
use time::OffsetDateTime;
#[derive(serde::Serialize, Debug)]
pub struct KafkaPayout<'a> {
pub payout_id: &'a id_type::PayoutId,
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/kafka/authentication.rs | crates/router/src/services/kafka/authentication.rs | use api_models::payments::DeviceChannel;
use common_enums::MerchantCategoryCode;
use diesel_models::enums as storage_enums;
use time::OffsetDateTime;
#[derive(serde::Serialize, Debug)]
pub struct KafkaAuthentication<'a> {
pub authentication_id: &'a common_utils::id_type::AuthenticationId,
pub merchant_id: &'a ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/services/kafka/refund.rs | crates/router/src/services/kafka/refund.rs | #[cfg(feature = "v2")]
use common_utils::pii;
#[cfg(feature = "v2")]
use common_utils::types::{self, ChargeRefunds};
use common_utils::{
id_type,
types::{ConnectorTransactionIdTrait, MinorUnit},
};
use diesel_models::{enums as storage_enums, refund::Refund};
use time::OffsetDateTime;
use crate::events;
#[cfg(... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/workflows/process_dispute.rs | crates/router/src/workflows/process_dispute.rs | use common_utils::ext_traits::{StringExt, ValueExt};
use diesel_models::process_tracker::business_status;
use error_stack::ResultExt;
use router_env::logger;
use scheduler::{
consumer::{self, types::process_data, workflows::ProcessTrackerWorkflow},
errors as sch_errors, utils as scheduler_utils,
};
#[cfg(featu... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/workflows/payment_sync.rs | crates/router/src/workflows/payment_sync.rs | #[cfg(feature = "v2")]
use common_utils::ext_traits::AsyncExt;
use common_utils::ext_traits::{OptionExt, StringExt, ValueExt};
use diesel_models::process_tracker::business_status;
use error_stack::ResultExt;
use router_env::logger;
use scheduler::{
consumer::{self, types::process_data, workflows::ProcessTrackerWork... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/workflows/refund_router.rs | crates/router/src/workflows/refund_router.rs | use scheduler::consumer::workflows::ProcessTrackerWorkflow;
#[cfg(feature = "v1")]
use crate::core::refunds as refund_flow;
use crate::{errors, logger::error, routes::SessionState, types::storage};
pub struct RefundWorkflowRouter;
#[async_trait::async_trait]
impl ProcessTrackerWorkflow<SessionState> for RefundWorkfl... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/workflows/invoice_sync.rs | crates/router/src/workflows/invoice_sync.rs | use async_trait::async_trait;
use common_enums::connector_enums::InvoiceStatus;
use common_utils::{errors::CustomResult, ext_traits::ValueExt};
use router_env::logger;
use scheduler::{
consumer::{self, workflows::ProcessTrackerWorkflow},
errors,
};
use crate::{routes::SessionState, types::storage, utils};
con... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/workflows/revenue_recovery.rs | crates/router/src/workflows/revenue_recovery.rs | #[cfg(feature = "v2")]
use std::collections::HashMap;
#[cfg(feature = "v2")]
use api_models::{
enums::{CardNetwork, RevenueRecoveryAlgorithmType},
payments::PaymentsGetIntentRequest,
};
use common_utils::errors::CustomResult;
#[cfg(feature = "v2")]
use common_utils::{
ext_traits::AsyncExt,
ext_traits::... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/workflows/api_key_expiry.rs | crates/router/src/workflows/api_key_expiry.rs | use common_utils::{errors::ValidationError, ext_traits::ValueExt, types::user::ThemeLineage};
use diesel_models::{
enums as storage_enums, process_tracker::business_status, ApiKeyExpiryTrackingData,
};
use router_env::logger;
use scheduler::{workflows::ProcessTrackerWorkflow, SchedulerSessionState};
use crate::{
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/workflows/attach_payout_account_workflow.rs | crates/router/src/workflows/attach_payout_account_workflow.rs | use common_utils::{
consts::DEFAULT_LOCALE,
ext_traits::{OptionExt, ValueExt},
};
use scheduler::{
consumer::{self, workflows::ProcessTrackerWorkflow},
errors,
};
use crate::{
core::payouts,
errors as core_errors,
routes::SessionState,
types::{api, domain, storage},
};
pub struct Attac... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/workflows/tokenized_data.rs | crates/router/src/workflows/tokenized_data.rs | use scheduler::consumer::workflows::ProcessTrackerWorkflow;
#[cfg(feature = "v1")]
use crate::core::payment_methods::vault;
use crate::{errors, logger::error, routes::SessionState, types::storage};
pub struct DeleteTokenizeDataWorkflow;
#[async_trait::async_trait]
impl ProcessTrackerWorkflow<SessionState> for Delete... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/workflows/outgoing_webhook_retry.rs | crates/router/src/workflows/outgoing_webhook_retry.rs | #[cfg(feature = "payouts")]
use api_models::payouts as payout_models;
use api_models::{
enums::EventType,
webhook_events::OutgoingWebhookRequestContent,
webhooks::{OutgoingWebhook, OutgoingWebhookContent},
};
use common_utils::{
consts::DEFAULT_LOCALE,
ext_traits::{StringExt, ValueExt},
id_type,... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/workflows/dispute_list.rs | crates/router/src/workflows/dispute_list.rs | use std::ops::Deref;
use common_utils::ext_traits::{StringExt, ValueExt};
use diesel_models::process_tracker::business_status;
use error_stack::ResultExt;
use router_env::{logger, tracing::Instrument};
use scheduler::{
consumer::{self, types::process_data, workflows::ProcessTrackerWorkflow},
errors as sch_erro... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/workflows/payment_method_status_update.rs | crates/router/src/workflows/payment_method_status_update.rs | use common_utils::ext_traits::ValueExt;
use error_stack::ResultExt;
use scheduler::{
consumer::types::process_data, utils as pt_utils, workflows::ProcessTrackerWorkflow,
};
use crate::{
errors,
logger::error,
routes::SessionState,
types::storage::{self, PaymentMethodStatusTrackingData},
};
pub stru... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/consts/user.rs | crates/router/src/consts/user.rs | use common_utils::consts::MAX_ALLOWED_MERCHANT_NAME_LENGTH;
pub const MAX_NAME_LENGTH: usize = 70;
/// The max length of company name and merchant should be same
/// because we are deriving the merchant name from company name
pub const MAX_COMPANY_NAME_LENGTH: usize = MAX_ALLOWED_MERCHANT_NAME_LENGTH;
pub const RECO... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/consts/opensearch.rs | crates/router/src/consts/opensearch.rs | use api_models::analytics::search::SearchIndex;
pub const fn get_search_indexes() -> [SearchIndex; 9] {
[
SearchIndex::PaymentAttempts,
SearchIndex::PaymentIntents,
SearchIndex::Refunds,
SearchIndex::Disputes,
SearchIndex::Payouts,
SearchIndex::SessionizerPaymentAtte... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/consts/user_role.rs | crates/router/src/consts/user_role.rs | // User Roles
pub const ROLE_ID_MERCHANT_ADMIN: &str = "merchant_admin";
pub const ROLE_ID_MERCHANT_VIEW_ONLY: &str = "merchant_view_only";
pub const ROLE_ID_MERCHANT_IAM_ADMIN: &str = "merchant_iam_admin";
pub const ROLE_ID_MERCHANT_DEVELOPER: &str = "merchant_developer";
pub const ROLE_ID_MERCHANT_OPERATOR: &str = "m... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/consts/oidc.rs | crates/router/src/consts/oidc.rs | pub const REDIS_AUTH_CODE_PREFIX: &str = "OIDC_AUTH_CODE_";
pub const AUTH_CODE_TTL_IN_SECS: i64 = 60 * 5; // 5 minutes
pub const ID_TOKEN_TTL_IN_SECS: u64 = 60 * 60; // 1 hour
pub const AUTH_CODE_LENGTH: usize = 32;
pub const TOKEN_TYPE_BEARER: &str = "Bearer";
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/api_keys.rs | 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::storage,
};
#[async_trait::async_trait]
pub ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/locker_mock_up.rs | crates/router/src/db/locker_mock_up.rs | use error_stack::report;
use router_env::{instrument, tracing};
use super::{MockDb, Store};
use crate::{
connection,
core::errors::{self, CustomResult},
types::storage,
};
#[async_trait::async_trait]
pub trait LockerMockUpInterface {
async fn find_locker_by_card_id(
&self,
card_id: &st... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/user.rs | crates/router/src/db/user.rs | use diesel_models::user as storage;
use error_stack::report;
use masking::Secret;
use router_env::{instrument, tracing};
use super::{domain, MockDb};
use crate::{
connection,
core::errors::{self, CustomResult},
services::Store,
};
pub mod sample_data;
pub mod theme;
#[async_trait::async_trait]
pub trait U... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/blocklist_fingerprint.rs | crates/router/src/db/blocklist_fingerprint.rs | use error_stack::report;
use router_env::{instrument, tracing};
use storage_impl::MockDb;
use super::Store;
use crate::{
connection,
core::errors::{self, CustomResult},
db::kafka_store::KafkaStore,
types::storage,
};
#[async_trait::async_trait]
pub trait BlocklistFingerprintInterface {
async fn in... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/blocklist.rs | crates/router/src/db/blocklist.rs | use error_stack::report;
use router_env::{instrument, tracing};
use storage_impl::MockDb;
use super::Store;
use crate::{
connection,
core::errors::{self, CustomResult},
db::kafka_store::KafkaStore,
types::storage,
};
#[async_trait::async_trait]
pub trait BlocklistInterface {
async fn insert_blockl... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/fraud_check.rs | crates/router/src/db/fraud_check.rs | use diesel_models::fraud_check::{self as storage, FraudCheck, FraudCheckUpdate};
use error_stack::report;
use router_env::{instrument, tracing};
use super::MockDb;
use crate::{
connection,
core::errors::{self, CustomResult},
services::Store,
};
#[async_trait::async_trait]
pub trait FraudCheckInterface {
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/callback_mapper.rs | crates/router/src/db/callback_mapper.rs | use error_stack::report;
use hyperswitch_domain_models::callback_mapper as domain;
use router_env::{instrument, tracing};
use storage_impl::{DataModelExt, MockDb};
use super::Store;
use crate::{
connection,
core::errors::{self, CustomResult},
types::storage,
};
#[async_trait::async_trait]
pub trait Callba... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/dynamic_routing_stats.rs | crates/router/src/db/dynamic_routing_stats.rs | use error_stack::report;
use router_env::{instrument, tracing};
use storage_impl::MockDb;
use super::Store;
use crate::{
connection,
core::errors::{self, CustomResult},
db::kafka_store::KafkaStore,
types::storage,
};
#[async_trait::async_trait]
pub trait DynamicRoutingStatsInterface {
async fn ins... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/address.rs | crates/router/src/db/address.rs | use common_utils::id_type;
use diesel_models::{address::AddressUpdateInternal, enums::MerchantStorageScheme};
use error_stack::ResultExt;
use super::MockDb;
use crate::{
core::errors::{self, CustomResult},
types::{
domain::{
self,
behaviour::{Conversion, ReverseConversion},
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/customers.rs | crates/router/src/db/customers.rs | pub use hyperswitch_domain_models::customer::{CustomerInterface, CustomerListConstraints};
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/user_authentication_method.rs | crates/router/src/db/user_authentication_method.rs | use diesel_models::user_authentication_method as storage;
use error_stack::report;
use router_env::{instrument, tracing};
use super::MockDb;
use crate::{
connection,
core::errors::{self, CustomResult},
services::Store,
};
#[async_trait::async_trait]
pub trait UserAuthenticationMethodInterface {
async ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/capture.rs | crates/router/src/db/capture.rs | use router_env::{instrument, tracing};
use super::MockDb;
use crate::{
core::errors::{self, CustomResult},
types::storage::{self as types, enums},
};
#[async_trait::async_trait]
pub trait CaptureInterface {
async fn insert_capture(
&self,
capture: types::CaptureNew,
storage_scheme:... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/payment_link.rs | crates/router/src/db/payment_link.rs | use error_stack::report;
use router_env::{instrument, tracing};
use crate::{
connection,
core::errors::{self, CustomResult},
db::MockDb,
services::Store,
types::storage::{self, PaymentLinkDbExt},
};
#[async_trait::async_trait]
pub trait PaymentLinkInterface {
async fn find_payment_link_by_paym... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/dispute.rs | crates/router/src/db/dispute.rs | use std::collections::HashMap;
use error_stack::report;
use hyperswitch_domain_models::disputes;
use router_env::{instrument, tracing};
use super::{MockDb, Store};
use crate::{
connection,
core::errors::{self, CustomResult},
types::storage::{self, DisputeDbExt},
};
#[async_trait::async_trait]
pub trait D... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/ephemeral_key.rs | crates/router/src/db/ephemeral_key.rs | #[cfg(feature = "v2")]
use common_utils::id_type;
use time::ext::NumericalDuration;
#[cfg(feature = "v2")]
use crate::types::storage::ephemeral_key::{ClientSecretType, ClientSecretTypeNew};
use crate::{
core::errors::{self, CustomResult},
db::MockDb,
types::storage::ephemeral_key::{EphemeralKey, EphemeralK... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/organization.rs | crates/router/src/db/organization.rs | use common_utils::{errors::CustomResult, id_type};
use diesel_models::{organization as storage, organization::OrganizationBridge};
use error_stack::report;
use router_env::{instrument, tracing};
use crate::{connection, core::errors, services::Store};
#[async_trait::async_trait]
pub trait OrganizationInterface {
a... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/merchant_account.rs | crates/router/src/db/merchant_account.rs | pub use hyperswitch_domain_models::merchant_account::{self, MerchantAccountInterface};
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/user_key_store.rs | crates/router/src/db/user_key_store.rs | use common_utils::{errors::CustomResult, types::keymanager};
use error_stack::{report, ResultExt};
use masking::Secret;
use router_env::{instrument, tracing};
use storage_impl::MockDb;
use crate::{
connection,
core::errors,
services::Store,
types::domain::{
self,
behaviour::{Conversion,... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/generic_link.rs | crates/router/src/db/generic_link.rs | use error_stack::report;
use router_env::{instrument, tracing};
use crate::{
connection,
core::errors::{self, CustomResult},
db::MockDb,
services::Store,
types::storage,
};
#[async_trait::async_trait]
pub trait GenericLinkInterface {
async fn find_generic_link_by_link_id(
&self,
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/user_role.rs | crates/router/src/db/user_role.rs | use common_enums::EntityType;
use common_utils::id_type;
use diesel_models::{
enums::{self, UserStatus},
user_role as storage,
};
use error_stack::{report, ResultExt};
use router_env::{instrument, tracing};
use super::MockDb;
use crate::{
connection,
core::errors::{self, CustomResult},
services::St... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/relay.rs | crates/router/src/db/relay.rs | use diesel_models;
use error_stack::{report, ResultExt};
use hyperswitch_domain_models::behaviour::{Conversion, ReverseConversion};
use storage_impl::MockDb;
use super::domain;
use crate::{
connection,
core::errors::{self, CustomResult},
db::kafka_store::KafkaStore,
services::Store,
};
#[async_trait::... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/file.rs | crates/router/src/db/file.rs | use error_stack::report;
use router_env::{instrument, tracing};
use super::{MockDb, Store};
use crate::{
connection,
core::errors::{self, CustomResult},
types::storage,
};
#[async_trait::async_trait]
pub trait FileMetadataInterface {
async fn insert_file_metadata(
&self,
file: storage:... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/merchant_connector_account.rs | crates/router/src/db/merchant_connector_account.rs | use common_utils::ext_traits::{ByteSliceExt, Encode};
use error_stack::ResultExt;
pub use hyperswitch_domain_models::merchant_connector_account::MerchantConnectorAccountInterface;
use router_env::{instrument, tracing};
use storage_impl::redis::kv_store::RedisConnInterface;
use super::{MockDb, Store};
use crate::{
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/blocklist_lookup.rs | crates/router/src/db/blocklist_lookup.rs | use error_stack::report;
use router_env::{instrument, tracing};
use storage_impl::MockDb;
use super::Store;
use crate::{
connection,
core::errors::{self, CustomResult},
db::kafka_store::KafkaStore,
types::storage,
};
#[async_trait::async_trait]
pub trait BlocklistLookupInterface {
async fn insert_... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/health_check.rs | crates/router/src/db/health_check.rs | use async_bb8_diesel::{AsyncConnection, AsyncRunQueryDsl};
use diesel_models::ConfigNew;
use error_stack::ResultExt;
use router_env::{instrument, logger, tracing};
use super::{MockDb, Store};
use crate::{
connection,
core::errors::{self, CustomResult},
types::storage,
};
#[async_trait::async_trait]
pub tr... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/unified_translations.rs | crates/router/src/db/unified_translations.rs | use diesel_models::unified_translations as storage;
use error_stack::report;
use super::MockDb;
use crate::{
connection,
core::errors::{self, CustomResult},
services::Store,
};
#[async_trait::async_trait]
pub trait UnifiedTranslationsInterface {
async fn add_unfied_translation(
&self,
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/kafka_store.rs | crates/router/src/db/kafka_store.rs | use std::{collections::HashSet, sync::Arc};
use ::payment_methods::state::PaymentMethodsStorageInterface;
use common_enums::enums::MerchantStorageScheme;
use common_utils::{
errors::CustomResult,
id_type,
types::{keymanager::KeyManagerState, user::ThemeLineage, TenantConfig},
};
#[cfg(feature = "v2")]
use ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/payment_method_session.rs | crates/router/src/db/payment_method_session.rs | #[cfg(feature = "v2")]
use crate::core::errors::{self, CustomResult};
use crate::db::MockDb;
#[cfg(feature = "v2")]
#[async_trait::async_trait]
pub trait PaymentMethodsSessionInterface {
async fn insert_payment_methods_session(
&self,
key_store: &hyperswitch_domain_models::merchant_key_store::Merch... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/gsm.rs | crates/router/src/db/gsm.rs | use diesel_models::gsm as storage;
use error_stack::{report, ResultExt};
use router_env::{instrument, tracing};
use super::MockDb;
use crate::{
connection,
core::errors::{self, CustomResult},
services::Store,
};
#[async_trait::async_trait]
pub trait GsmInterface {
async fn add_gsm_rule(
&self,... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/authentication.rs | crates/router/src/db/authentication.rs | use common_utils::{ext_traits::AsyncExt, types::keymanager::KeyManagerState};
use error_stack::{report, ResultExt};
use hyperswitch_domain_models::{
behaviour::{Conversion, ReverseConversion},
merchant_key_store::MerchantKeyStore,
};
use router_env::{instrument, tracing};
use storage_impl::StorageError;
use su... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/business_profile.rs | crates/router/src/db/business_profile.rs | pub use hyperswitch_domain_models::{
business_profile::{self, ProfileInterface},
errors::api_error_response,
};
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/mandate.rs | crates/router/src/db/mandate.rs | use common_utils::id_type;
use super::MockDb;
use crate::{
core::errors::{self, CustomResult},
types::storage::{self as storage_types, enums::MerchantStorageScheme},
};
#[async_trait::async_trait]
pub trait MandateInterface {
async fn find_mandate_by_merchant_id_mandate_id(
&self,
merchant... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/role.rs | crates/router/src/db/role.rs | use common_utils::id_type;
use diesel_models::{
enums::{EntityType, RoleScope},
role as storage,
};
use error_stack::report;
use router_env::{instrument, tracing};
use super::MockDb;
use crate::{
connection,
core::errors::{self, CustomResult},
services::Store,
};
#[async_trait::async_trait]
pub tr... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/events.rs | crates/router/src/db/events.rs | use std::collections::HashSet;
use common_utils::ext_traits::AsyncExt;
use error_stack::{report, ResultExt};
use futures::future::try_join_all;
use router_env::{instrument, tracing};
use super::{MockDb, Store};
use crate::{
connection,
core::errors::{self, CustomResult},
types::{
domain::{
... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/authorization.rs | crates/router/src/db/authorization.rs | use diesel_models::authorization::AuthorizationUpdateInternal;
use error_stack::report;
use router_env::{instrument, tracing};
use super::{MockDb, Store};
use crate::{
connection,
core::errors::{self, CustomResult},
types::storage,
};
#[async_trait::async_trait]
pub trait AuthorizationInterface {
asyn... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/dashboard_metadata.rs | crates/router/src/db/dashboard_metadata.rs | use common_utils::id_type;
use diesel_models::{enums, user::dashboard_metadata as storage};
use error_stack::{report, ResultExt};
use router_env::{instrument, tracing};
use storage_impl::MockDb;
use crate::{
connection,
core::errors::{self, CustomResult},
services::Store,
};
#[async_trait::async_trait]
pu... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/refund.rs | crates/router/src/db/refund.rs | #[cfg(feature = "olap")]
use std::collections::{HashMap, HashSet};
#[cfg(feature = "olap")]
use common_utils::types::{ConnectorTransactionIdTrait, MinorUnit};
use diesel_models::{errors::DatabaseError, refund as diesel_refund};
use hyperswitch_domain_models::refunds;
use super::MockDb;
use crate::{
core::errors::... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | true |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/routing_algorithm.rs | crates/router/src/db/routing_algorithm.rs | use diesel_models::routing_algorithm as routing_storage;
use error_stack::report;
use router_env::{instrument, tracing};
use storage_impl::mock_db::MockDb;
use crate::{
connection,
core::errors::{self, CustomResult},
services::Store,
};
type StorageResult<T> = CustomResult<T, errors::StorageError>;
#[asy... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/configs.rs | crates/router/src/db/configs.rs | pub use hyperswitch_domain_models::{
configs::{self, ConfigInterface},
errors::api_error_response,
};
| rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
juspay/hyperswitch | https://github.com/juspay/hyperswitch/blob/4201e04a8f0f1d46b57f24868f4f943a9be50bda/crates/router/src/db/hyperswitch_ai_interaction.rs | crates/router/src/db/hyperswitch_ai_interaction.rs | use diesel_models::hyperswitch_ai_interaction as storage;
use error_stack::report;
use router_env::{instrument, tracing};
use super::MockDb;
use crate::{
connection,
core::errors::{self, CustomResult},
services::Store,
};
#[async_trait::async_trait]
pub trait HyperswitchAiInteractionInterface {
async ... | rust | Apache-2.0 | 4201e04a8f0f1d46b57f24868f4f943a9be50bda | 2026-01-04T15:31:59.475325Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.