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 struct MandateRevokeFlowData {
pub merchant_id: common_utils::id_type::MerchantId,
pub customer_id: common_utils::id_type::CustomerId,
pub payment_id: Option<String>,
} | crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs | hyperswitch_domain_models | struct_definition | 45 | rust | MandateRevokeFlowData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn external_vault_proxy_create_domain_model(
payment_intent: &super::PaymentIntent,
cell_id: id_type::CellId,
storage_scheme: storage_enums::MerchantStorageScheme,
request: &api_models::payments::ExternalVaultProxyPaymentsRequest,
encrypted_data: DecryptedPaymentAttempt... | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | function_signature | 777 | rust | null | null | null | null | external_vault_proxy_create_domain_model | null | null | null | null | null | null | null |
File: crates/router/src/core/profile_acquirer.rs
Public functions: 2
use api_models::profile_acquirer;
use common_utils::types::keymanager::KeyManagerState;
use error_stack::ResultExt;
use crate::{
core::errors::{self, utils::StorageErrorExt, RouterResponse},
services::api,
types::domain,
SessionStat... | crates/router/src/core/profile_acquirer.rs | router | full_file | 1,732 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl UserAuthenticationMethodNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<UserAuthenticationMethod> {
generics::generic_insert(conn, self).await
}
} | crates/diesel_models/src/query/user_authentication_method.rs | diesel_models | impl_block | 43 | rust | null | UserAuthenticationMethodNew | null | impl UserAuthenticationMethodNew | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Globepay {} | crates/hyperswitch_connectors/src/connectors/globepay.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Globepay | api::PaymentVoid for | impl api::PaymentVoid for for Globepay | null | null | null | null | null | null | null | null |
},
serde_qs::Error::ParseInt(_) => Self::SerdeQsError {
error_message: "Failed to parse integer in request".to_owned(),
param: None,
},
serde_qs::Error::Utf8(_) => Self::SerdeQsError {
error_message: "Failed to convert utf8 ... | crates/router/src/compatibility/stripe/errors.rs#chunk1 | router | chunk | 236 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl FraudCheck for Signifyd {} | crates/hyperswitch_connectors/src/connectors/signifyd.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Signifyd | FraudCheck for | impl FraudCheck for for Signifyd | null | null | null | null | null | null | null | null |
impl EuclidDirFilter for ThreeDSDecisionRule {
const ALLOWED: &'static [DirKeyKind] = &[
DirKeyKind::CardNetwork,
DirKeyKind::PaymentAmount,
DirKeyKind::PaymentCurrency,
DirKeyKind::IssuerName,
DirKeyKind::IssuerCountry,
DirKeyKind::CustomerDevicePlatform,
Dir... | crates/common_types/src/three_ds_decision_rule_engine.rs | common_types | impl_block | 117 | rust | null | ThreeDSDecisionRule | EuclidDirFilter for | impl EuclidDirFilter for for ThreeDSDecisionRule | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Juspaythreedsserver {
fn id(&self) -> &'static str {
"juspaythreedsserver"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Base
// TODO! Check connector documentation, on which unit they are processing the currency.
// I... | crates/hyperswitch_connectors/src/connectors/juspaythreedsserver.rs | hyperswitch_connectors | impl_block | 498 | rust | null | Juspaythreedsserver | ConnectorCommon for | impl ConnectorCommon for for Juspaythreedsserver | null | null | null | null | null | null | null | null |
pub struct MerchantRiskIndicator {
/// Indicates the shipping method chosen for the transaction.
///
/// Merchants must choose the Shipping Indicator code that most accurately describes the cardholder's specific transaction.
/// If one or more items are included in the sale, use the Shipping Indicator c... | crates/hyperswitch_connectors/src/connectors/netcetera/netcetera_types.rs | hyperswitch_connectors | struct_definition | 952 | rust | MerchantRiskIndicator | null | null | null | null | null | null | null | null | null | null | null |
/// Get payment id in the format of irrelevant_payment_id_in_{flow}
pub fn get_irrelevant_id(flow: &str) -> Self {
let alphanumeric_id =
AlphaNumericId::new_unchecked(format!("irrelevant_payment_id_in_{flow}"));
let id = LengthId::new_unchecked(alphanumeric_id);
Self(id)
} | crates/common_utils/src/id_type/payment.rs | common_utils | function_signature | 74 | rust | null | null | null | null | get_irrelevant_id | null | null | null | null | null | null | null |
Web Documentation: Reconciliation V1 | Hyperswitch
# Type: Web Doc
The Reconciliation module in Hyperswitch automates financial reconciliation, providing businesses with greater accuracy and control over their financial processes. It simplifies transaction matching for financial operations (FinOps) teams, ensuring sea... | https://docs.hyperswitch.io/about-hyperswitch/payments-modules/reconciliation | null | web_doc_file | 1,031 | doc | null | null | null | null | null | web | null | null | null | https://docs.hyperswitch.io/about-hyperswitch/payments-modules/reconciliation | Reconciliation V1 | Hyperswitch | null |
impl Nordea {
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
}
}
pub fn generate_digest(&self, payload: &[u8]) -> String {
let payload_digest = digest::digest(&digest::SHA256, payload);
format!("sha-256={}", consts::BASE64... | crates/hyperswitch_connectors/src/connectors/nordea.rs | hyperswitch_connectors | impl_block | 1,155 | rust | null | Nordea | null | impl Nordea | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.ConnectorFeatureMatrixResponse
{
"type": "object",
"required": [
"name",
"display_name",
"description",
"category",
"integration_status"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the connector"
},
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 298 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"ConnectorFeatureMatrixResponse"
] | null | null | null | null |
File: crates/common_utils/src/id_type/merchant.rs
Public functions: 25
//! Contains the id type for merchant account
//!
//! Ids for merchant account are derived from the merchant name
//! If there are any special characters, they are removed
use std::fmt::Display;
use crate::{
date_time,
errors::{CustomRes... | crates/common_utils/src/id_type/merchant.rs | common_utils | full_file | 1,823 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn payments_connector_session(
state: web::Data<app::AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<payment_types::PaymentsSessionRequest>,
path: web::Path<common_utils::id_type::GlobalPaymentId>,
) -> impl Responder {
use hyperswitch_domain_models::payments::PaymentIntent... | crates/router/src/routes/payments.rs | router | function_signature | 434 | rust | null | null | null | null | payments_connector_session | null | null | null | null | null | null | null |
impl UploadFile for Checkout {} | crates/hyperswitch_connectors/src/connectors/checkout.rs | hyperswitch_connectors | impl_block | 6 | rust | null | Checkout | UploadFile for | impl UploadFile for for Checkout | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/query/routing_algorithm.rs
Public functions: 7
use async_bb8_diesel::AsyncRunQueryDsl;
use diesel::{associations::HasTable, BoolExpressionMethods, ExpressionMethods, QueryDsl};
use error_stack::{report, ResultExt};
use time::PrimitiveDateTime;
use crate::{
enums,
errors::Databa... | crates/diesel_models/src/query/routing_algorithm.rs | diesel_models | full_file | 1,708 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn apple_pay_certificates_migration(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<
api_models::apple_pay_certificates_migration::ApplePayCertificatesMigrationRequest,
>,
) -> HttpResponse {
let flow = Flow::ApplePayCertificatesMigration;
Box::pin(api::s... | crates/router/src/routes/apple_pay_certificates_migration.rs | router | function_signature | 145 | rust | null | null | null | null | apple_pay_certificates_migration | null | null | null | null | null | null | null |
pub struct PaymentUpdateIntent; | crates/router/src/core/payments/operations/payment_update_intent.rs | router | struct_definition | 6 | rust | PaymentUpdateIntent | null | null | null | null | null | null | null | null | null | null | null |
pub struct AirwallexProductData {
name: String,
quantity: u16,
unit_price: MinorUnit,
} | crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs | hyperswitch_connectors | struct_definition | 28 | rust | AirwallexProductData | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundSync for Worldline {} | crates/hyperswitch_connectors/src/connectors/worldline.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Worldline | api::RefundSync for | impl api::RefundSync for for Worldline | null | null | null | null | null | null | null | null |
impl PaymentVoid for Plaid {} | crates/hyperswitch_connectors/src/connectors/plaid.rs | hyperswitch_connectors | impl_block | 7 | rust | null | Plaid | PaymentVoid for | impl PaymentVoid for for Plaid | null | null | null | null | null | null | null | null |
pub async fn find_by_global_id(
conn: &PgPooledConn,
id: &common_utils::id_type::GlobalPaymentId,
) -> StorageResult<Self> {
generics::generic_find_by_id::<<Self as HasTable>::Table, _, _>(conn, id.to_owned()).await
} | crates/diesel_models/src/query/payment_intent.rs | diesel_models | function_signature | 68 | rust | null | null | null | null | find_by_global_id | null | null | null | null | null | null | null |
pub async fn create_link_token(
_state: SessionState,
_merchant_context: domain::MerchantContext,
_payload: api_models::pm_auth::LinkTokenCreateRequest,
_headers: Option<hyperswitch_domain_models::payments::HeaderPayload>,
) -> RouterResponse<api_models::pm_auth::LinkTokenCreateResponse> {
todo!()
} | crates/router/src/core/pm_auth.rs | router | function_signature | 78 | rust | null | null | null | null | create_link_token | null | null | null | null | null | null | null |
impl api::RefundSync for Adyen {} | crates/hyperswitch_connectors/src/connectors/adyen.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Adyen | api::RefundSync for | impl api::RefundSync for for Adyen | null | null | null | null | null | null | null | null |
impl api::PaymentCapture for UnifiedAuthenticationService {} | crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs | hyperswitch_connectors | impl_block | 10 | rust | null | UnifiedAuthenticationService | api::PaymentCapture for | impl api::PaymentCapture for for UnifiedAuthenticationService | null | null | null | null | null | null | null | null |
impl Volt {
pub fn new() -> &'static Self {
&Self {
amount_converter: &MinorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/volt.rs | hyperswitch_connectors | impl_block | 32 | rust | null | Volt | null | impl Volt | null | null | null | null | null | null | null | null |
pub async fn find_by_global_customer_id_merchant_id_status(
conn: &PgPooledConn,
customer_id: &common_utils::id_type::GlobalCustomerId,
merchant_id: &common_utils::id_type::MerchantId,
status: storage_enums::PaymentMethodStatus,
limit: Option<i64>,
) -> StorageResult<Vec<Self... | crates/diesel_models/src/query/payment_method.rs | diesel_models | function_signature | 163 | rust | null | null | null | null | find_by_global_customer_id_merchant_id_status | null | null | null | null | null | null | null |
pub(super) async fn filter_by_constraints(
db: &dyn StorageInterface,
constraints: &api::PayoutListConstraints,
merchant_id: &id_type::MerchantId,
storage_scheme: storage::enums::MerchantStorageScheme,
) -> CustomResult<Vec<storage::Payouts>, errors::StorageError> {
let result = db
.filter_p... | crates/router/src/core/payouts/helpers.rs | router | function_signature | 105 | rust | null | null | null | null | filter_by_constraints | null | null | null | null | null | null | null |
impl Responder {
let flow = AnalyticsFlow::GetConnectorEvents;
Box::pin(api::server_wrap(
flow,
state,
&req,
json_payload.into_inner(),
|state, auth: AuthenticationData, req, _| async move {
utils::check_if_profile_id_is_present... | crates/router/src/analytics.rs | router | impl_block | 169 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub struct NoonApplePayData {
payment_data: NoonApplePaymentData,
payment_method: NoonApplePayPaymentMethod,
transaction_identifier: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/noon/transformers.rs | hyperswitch_connectors | struct_definition | 34 | rust | NoonApplePayData | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v2/merchant-connector-account/connector-account--retrieve.mdx
# Type: Doc File
---
openapi: get /v2/connector-accounts/{id}
--- | api-reference/v2/merchant-connector-account/connector-account--retrieve.mdx | null | doc_file | 41 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct UpdateSuccessRateWindowEventResponse {
pub status: UpdationStatusEventResponse,
} | crates/router/src/core/payments/routing/utils.rs | router | struct_definition | 21 | rust | UpdateSuccessRateWindowEventResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn profile_delete() {} | crates/openapi/src/routes/profile.rs | openapi | function_signature | 7 | rust | null | null | null | null | profile_delete | null | null | null | null | null | null | null |
File: crates/analytics/src/refunds/distribution.rs
Public structs: 1
use api_models::analytics::{
refunds::{
RefundDimensions, RefundDistributions, RefundFilters, RefundMetricsBucketIdentifier,
RefundType,
},
Granularity, RefundDistributionBody, TimeRange,
};
use diesel_models::enums as st... | crates/analytics/src/refunds/distribution.rs | analytics | full_file | 737 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/utils/user/sample_data.rs
Public functions: 1
use api_models::{
enums::Connector::{DummyConnector4, DummyConnector7},
user::sample_data::SampleDataRequest,
};
use common_utils::{
id_type,
types::{AmountConvertor, ConnectorTransactionId, MinorUnit, StringMinorUnitForConnector},
... | crates/router/src/utils/user/sample_data.rs | router | full_file | 4,066 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct RoutingData {
pub routed_through: Option<String>,
pub merchant_connector_id: Option<id_type::MerchantConnectorAccountId>,
pub routing_info: PaymentRoutingInfo,
pub algorithm: Option<routing::StraightThroughAlgorithm>,
} | crates/hyperswitch_domain_models/src/routing.rs | hyperswitch_domain_models | struct_definition | 52 | rust | RoutingData | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PaymentsResponse
{
"type": "object",
"required": [
"payment_id",
"merchant_id",
"status",
"amount",
"net_amount",
"amount_capturable",
"currency",
"payment_method",
"attempt_count"
],
"properties": {
"payment_id": {
"type": "st... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 5,285 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PaymentsResponse"
] | null | null | null | null |
pub struct ThreeDsMethodData {
pub three_ds_method_notification_url: String,
pub server_transaction_id: String,
} | crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | ThreeDsMethodData | null | null | null | null | null | null | null | null | null | null | null |
impl AnalyticsDataSource for SqlxClient {
type Row = PgRow;
async fn load_results<T>(&self, query: &str) -> CustomResult<Vec<T>, QueryExecutionError>
where
Self: LoadRow<T>,
{
sqlx::query(&format!("{query};"))
.fetch_all(&self.pool)
.await
.change_con... | crates/analytics/src/sqlx.rs | analytics | impl_block | 143 | rust | null | SqlxClient | AnalyticsDataSource for | impl AnalyticsDataSource for for SqlxClient | null | null | null | null | null | null | null | null |
impl PayoutAttempt {
pub async fn update_with_attempt_id(
self,
conn: &PgPooledConn,
payout_attempt_update: PayoutAttemptUpdate,
) -> StorageResult<Self> {
match generics::generic_update_with_unique_predicate_get_result::<
<Self as HasTable>::Table,
_,
... | crates/diesel_models/src/query/payout_attempt.rs | diesel_models | impl_block | 1,602 | rust | null | PayoutAttempt | null | impl PayoutAttempt | null | null | null | null | null | null | null | null |
pub struct DeutschebankThreeDSInitializeRequest {
means_of_payment: DeutschebankThreeDSInitializeRequestMeansOfPayment,
tds_20_data: DeutschebankThreeDSInitializeRequestTds20Data,
amount_total: DeutschebankThreeDSInitializeRequestAmountTotal,
} | crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs | hyperswitch_connectors | struct_definition | 58 | rust | DeutschebankThreeDSInitializeRequest | null | null | null | null | null | null | null | null | null | null | null |
impl super::KafkaMessage for RevenueRecovery<'_> {
fn key(&self) -> String {
self.merchant_id.get_string_repr().to_string()
}
fn event_type(&self) -> crate::events::EventType {
crate::events::EventType::RevenueRecovery
}
} | crates/router/src/services/kafka/revenue_recovery.rs | router | impl_block | 64 | rust | null | RevenueRecovery | super::KafkaMessage for | impl super::KafkaMessage for for RevenueRecovery | null | null | null | null | null | null | null | null |
pub struct SignifydPaymentsSaleRequest {
order_id: String,
purchase: Purchase,
decision_delivery: DecisionDelivery,
coverage_requests: Option<CoverageRequests>,
} | crates/hyperswitch_connectors/src/connectors/signifyd/transformers/api.rs | hyperswitch_connectors | struct_definition | 38 | rust | SignifydPaymentsSaleRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn log_payment_attempt_delete(
&self,
delete_old_attempt: &PaymentAttempt,
tenant_id: TenantID,
) -> MQResult<()> {
self.log_event(&KafkaEvent::old(
&KafkaPaymentAttempt::from_storage(delete_old_attempt),
tenant_id.clone(),
self.ckh_datab... | crates/router/src/services/kafka.rs | router | function_signature | 102 | rust | null | null | null | null | log_payment_attempt_delete | null | null | null | null | null | null | null |
pub fn new(company_name: String) -> UserResult<Self> {
let company_name = company_name.trim();
let is_empty_or_whitespace = company_name.is_empty();
let is_too_long =
company_name.graphemes(true).count() > consts::user::MAX_COMPANY_NAME_LENGTH;
let is_all_valid_characters = ... | crates/router/src/types/domain/user.rs | router | function_signature | 141 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
File: crates/analytics/src/enums.rs
pub use common_utils::types::authentication::AuthInfo;
| crates/analytics/src/enums.rs | analytics | full_file | 22 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl JWTFlow {
async fn is_required(
&self,
_user: &UserFromStorage,
_state: &SessionState,
) -> UserResult<bool> {
Ok(true)
}
pub async fn generate_jwt(
self,
state: &SessionState,
next_flow: &NextFlow,
user_role: &UserRole,
) -> User... | crates/router/src/types/domain/user/decision_manager.rs | router | impl_block | 834 | rust | null | JWTFlow | null | impl JWTFlow | null | null | null | null | null | null | null | null |
pub struct FraudResult {
pub avs_result: Option<String>,
pub card_validation_result: Option<String>,
pub authentication_result: Option<String>,
pub advanced_a_v_s_result: Option<String>,
pub advanced_fraud_results: Option<AdvancedFraudResults>,
} | crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs | hyperswitch_connectors | struct_definition | 57 | rust | FraudResult | null | null | null | null | null | null | null | null | null | null | null |
pub struct Messages {
#[serde(rename = "Version")]
version: VersionData,
#[serde(rename = "Signature")]
signature: String,
#[serde(rename = "SignatureVersion")]
signature_version: String,
} | crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs | hyperswitch_connectors | struct_definition | 47 | rust | Messages | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundSync for Elavon {} | crates/hyperswitch_connectors/src/connectors/elavon.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Elavon | api::RefundSync for | impl api::RefundSync for for Elavon | null | null | null | null | null | null | null | null |
pub struct CardholderAccount {
/// Indicates the type of account.
/// This is required if 3DS Requestor is asking Cardholder which Account Type they are using before making
/// the purchase. This field is required in some markets. Otherwise, it is optional.
pub acct_type: Option<AccountType>,
/// Ex... | crates/hyperswitch_connectors/src/connectors/netcetera/netcetera_types.rs | hyperswitch_connectors | struct_definition | 698 | rust | CardholderAccount | null | null | null | null | null | null | null | null | null | null | null |
pub trait AuthServiceExchangeToken:
super::ConnectorIntegration<ExchangeToken, ExchangeTokenRequest, ExchangeTokenResponse>
{
} | crates/pm_auth/src/types/api/auth_service.rs | pm_auth | trait_definition | 25 | rust | null | null | AuthServiceExchangeToken | null | null | null | null | null | null | null | null | null |
pub struct RawGooglePayToken {
pub signature: Secret<String>,
pub protocol_version: String,
pub signed_message: Secret<String>,
pub intermediate_signing_key: IntermediateSigningKey,
} | crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs | hyperswitch_connectors | struct_definition | 41 | rust | RawGooglePayToken | null | null | null | null | null | null | null | null | null | null | null |
Documentation: crates/external_services/README.md
# Type: Doc File
# External Services
This crate includes interactions with external systems, which may be shared
across crates within this workspace.
| crates/external_services/README.md | null | doc_file | 40 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardNetworkTypes {
/// The card network enabled
#[schema(value_type = Option<CardNetwork>, example = "Visa")]
pub card_network: api_enums::CardNetwork,
/// surcharge details for this card network
pub surcharge_details: Option<SurchargeDetailsResponse>,
/// The list of eligible conne... | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 103 | rust | CardNetworkTypes | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorConfig {
fn new() -> Result<Self, String> {
let config_str = if cfg!(feature = "production") {
include_str!("../toml/production.toml")
} else if cfg!(feature = "sandbox") {
include_str!("../toml/sandbox.toml")
} else {
include_str!("../toml/d... | crates/connector_configs/src/connector.rs | connector_configs | impl_block | 2,622 | rust | null | ConnectorConfig | null | impl ConnectorConfig | null | null | null | null | null | null | null | null |
pub fn validate(&self) -> Result<(), ApplicationError> {
common_utils::fp_utils::when(self.stream_name.is_default_or_empty(), || {
Err(ApplicationError::InvalidConfigurationValueError(
"drainer stream name must not be empty".into(),
))
})
} | crates/router/src/configs/validations.rs | router | function_signature | 60 | rust | null | null | null | null | validate | null | null | null | null | null | null | null |
pub async fn merchant_account_update(
state: SessionState,
merchant_id: &id_type::MerchantId,
_profile_id: Option<id_type::ProfileId>,
req: api::MerchantAccountUpdate,
) -> RouterResponse<api::MerchantAccountResponse> {
let db = state.store.as_ref();
let key_manager_state = &(&state).into();
... | crates/router/src/core/admin.rs | router | function_signature | 289 | rust | null | null | null | null | merchant_account_update | null | null | null | null | null | null | null |
pub struct ConnectorVolumeSplit {
pub connector: RoutableConnectorChoice,
pub split: u8,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 23 | rust | ConnectorVolumeSplit | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/connector/utils.rs
Public functions: 13
Public structs: 1
use std::{
collections::{HashMap, HashSet},
str::FromStr,
sync::LazyLock,
};
#[cfg(feature = "payouts")]
use api_models::payouts::{self, PayoutVendorAccountDetails};
use api_models::{
enums::{CanadaStatesAbbreviation, ... | crates/router/src/connector/utils.rs#chunk0 | router | chunk | 8,183 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl auth_service::AuthService for Plaid {} | crates/pm_auth/src/connector/plaid.rs | pm_auth | impl_block | 9 | rust | null | Plaid | auth_service::AuthService for | impl auth_service::AuthService for for Plaid | null | null | null | null | null | null | null | null |
pub async fn signup_with_merchant_id(
state: SessionState,
request: user_api::SignUpWithMerchantIdRequest,
auth_id: Option<String>,
theme_id: Option<String>,
) -> UserResponse<user_api::SignUpWithMerchantIdResponse> {
let new_user = domain::NewUser::try_from(request.clone())?;
new_user
.... | crates/router/src/core/user.rs | router | function_signature | 399 | rust | null | null | null | null | signup_with_merchant_id | null | null | null | null | null | null | null |
pub struct GlobepayRouterData<T> {
pub amount: MinorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/globepay/transformers.rs | hyperswitch_connectors | struct_definition | 25 | rust | GlobepayRouterData | null | null | null | null | null | null | null | null | null | null | null |
impl EuclidAnalysable for ConnectorSelection {
fn get_dir_value_for_analysis(
&self,
rule_name: String,
) -> Vec<(euclid::frontend::dir::DirValue, euclid::types::Metadata)> {
self.get_connector_list()
.into_iter()
.map(|connector_choice| {
let conn... | crates/api_models/src/routing.rs | api_models | impl_block | 186 | rust | null | ConnectorSelection | EuclidAnalysable for | impl EuclidAnalysable for for ConnectorSelection | null | null | null | null | null | null | null | null |
pub struct PaymentCount; | crates/api_models/src/analytics/payments.rs | api_models | struct_definition | 5 | rust | PaymentCount | null | null | null | null | null | null | null | null | null | null | null |
pub struct StaxPaymentsRequest {
payment_method_id: Secret<String>,
total: f64,
is_refundable: bool,
pre_auth: bool,
meta: StaxPaymentsRequestMetaData,
idempotency_id: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/stax/transformers.rs | hyperswitch_connectors | struct_definition | 56 | rust | StaxPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct NmiWebhookObject {
pub transaction_id: String,
pub order_id: String,
pub condition: String,
pub action: NmiActionBody,
} | crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs | hyperswitch_connectors | struct_definition | 38 | rust | NmiWebhookObject | null | null | null | null | null | null | null | null | null | null | null |
pub struct RevenueRecoveryPaymentData {
pub merchant_account: merchant_account::MerchantAccount,
pub profile: business_profile::Profile,
pub key_store: merchant_key_store::MerchantKeyStore,
pub billing_mca: merchant_connector_account::MerchantConnectorAccount,
pub retry_algorithm: enums::RevenueReco... | crates/router/src/types/storage/revenue_recovery.rs | router | struct_definition | 69 | rust | RevenueRecoveryPaymentData | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_jwt_from_cookies(cookies: &str) -> RouterResult<String> {
Cookie::split_parse(cookies)
.find_map(|cookie| {
cookie
.ok()
.filter(|parsed_cookie| parsed_cookie.name() == JWT_TOKEN_COOKIE_NAME)
.map(|parsed_cookie| parsed_cookie.value().to... | crates/router/src/services/authentication/cookies.rs | router | function_signature | 102 | rust | null | null | null | null | get_jwt_from_cookies | null | null | null | null | null | null | null |
pub struct UserAuthenticationMethodNew {
pub id: String,
pub auth_id: String,
pub owner_id: String,
pub owner_type: enums::Owner,
pub auth_type: enums::UserAuthType,
pub private_config: Option<Encryption>,
pub public_config: Option<serde_json::Value>,
pub allow_signup: bool,
pub crea... | crates/diesel_models/src/user_authentication_method.rs | diesel_models | struct_definition | 100 | rust | UserAuthenticationMethodNew | null | null | null | null | null | null | null | null | null | null | null |
pub async fn upload_file_to_theme_storage(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<String>,
MultipartForm(payload) | crates/router/src/routes/user/theme.rs | router | function_signature | 37 | rust | null | null | null | null | upload_file_to_theme_storage | null | null | null | null | null | null | null |
pub async fn profile_acquirer_update(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<(
common_utils::id_type::ProfileId,
common_utils::id_type::ProfileAcquirerId,
) | crates/router/src/routes/profile_acquirer.rs | router | function_signature | 54 | rust | null | null | null | null | profile_acquirer_update | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Placetopay {} | crates/hyperswitch_connectors/src/connectors/placetopay.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Placetopay | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Placetopay | null | null | null | null | null | null | null | null |
pub struct WellsfargoPaymentInitiator {
#[serde(rename = "type")]
initiator_type: Option<WellsfargoPaymentInitiatorTypes>,
credential_stored_on_file: Option<bool>,
stored_credential_used: Option<bool>,
} | crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs | hyperswitch_connectors | struct_definition | 51 | rust | WellsfargoPaymentInitiator | null | null | null | null | null | null | null | null | null | null | null |
impl std::ops::Deref for Handler {
type Target = HandlerInner;
fn deref(&self) -> &Self::Target {
&self.inner
}
} | crates/drainer/src/handler.rs | drainer | impl_block | 38 | rust | null | Handler | std::ops::Deref for | impl std::ops::Deref for for Handler | null | null | null | null | null | null | null | null |
pub fn generate_authorization_signature(
&self,
auth: fiservemea::FiservemeaAuthType,
request_id: &str,
payload: &str,
timestamp: i128,
) -> CustomResult<String, errors::ConnectorError> {
let fiservemea::FiservemeaAuthType {
api_key,
secret_key... | crates/hyperswitch_connectors/src/connectors/fiservemea.rs | hyperswitch_connectors | function_signature | 176 | rust | null | null | null | null | generate_authorization_signature | null | null | null | null | null | null | null |
pub async fn delete_by_address_id(
conn: &PgPooledConn,
address_id: &str,
) -> StorageResult<bool> {
generics::generic_delete::<<Self as HasTable>::Table, _>(
conn,
dsl::address_id.eq(address_id.to_owned()),
)
.await
} | crates/diesel_models/src/query/address.rs | diesel_models | function_signature | 71 | rust | null | null | null | null | delete_by_address_id | null | null | null | null | null | null | null |
impl api::PayoutFulfill for Nomupay {} | crates/hyperswitch_connectors/src/connectors/nomupay.rs | hyperswitch_connectors | impl_block | 12 | rust | null | Nomupay | api::PayoutFulfill for | impl api::PayoutFulfill for for Nomupay | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::AuthenticationSync;
let api_auth = auth::ApiKeyAuth::default();
let (_merchant_id, authentication_id) = path.into_inner();
let payload = AuthenticationSyncRequest {
authentication_id,
..json_payload.into_inner()
};
let (auth, auth_flow) =
... | crates/router/src/routes/authentication.rs | router | impl_block | 240 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
impl ConnectorRedirectResponse for Bambora {
fn get_flow_type(
&self,
_query_params: &str,
_json_payload: Option<serde_json::Value>,
action: enums::PaymentAction,
) -> CustomResult<enums::CallConnectorAction, errors::ConnectorError> {
match action {
enums::Pay... | crates/hyperswitch_connectors/src/connectors/bambora.rs | hyperswitch_connectors | impl_block | 119 | rust | null | Bambora | ConnectorRedirectResponse for | impl ConnectorRedirectResponse for for Bambora | null | null | null | null | null | null | null | null |
"indiana" => Ok(Self::IN),
"iowa" => Ok(Self::IA),
"kansas" => Ok(Self::KS),
"kentucky" => Ok(Self::KY),
"louisiana" => Ok(Self::LA),
"maine" => Ok(Self::ME),
"marshall islands" =>... | crates/hyperswitch_connectors/src/utils.rs#chunk3 | hyperswitch_connectors | chunk | 8,174 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/// This struct represents the cryptogram data for Apple Pay transactions
pub struct ApplePayCryptogramData {
/// The online payment cryptogram
#[schema(value_type = String, example = "A1B2C3D4E5F6G7H8")]
pub online_payment_cryptogram: Secret<String>,
/// The ECI (Electronic Commerce Indicator) value
... | crates/common_types/src/payments.rs | common_types | struct_definition | 104 | rust | ApplePayCryptogramData | null | null | null | null | null | null | null | null | null | null | null |
impl api::Refund for Adyen {} | crates/hyperswitch_connectors/src/connectors/adyen.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Adyen | api::Refund for | impl api::Refund for for Adyen | null | null | null | null | null | null | null | null |
pub async fn store_payout_method_data_in_locker(
state: &routes::SessionState,
token_id: Option<String>,
payout_method: &api::PayoutMethodData,
customer_id: Option<id_type::CustomerId>,
merchant_key_store: &domain::MerchantKeyStore,
) -> RouterResult<String> {
let val... | crates/router/src/core/payment_methods/vault.rs | router | function_signature | 257 | rust | null | null | null | null | store_payout_method_data_in_locker | null | null | null | null | null | null | null |
pub struct CardDetails {
last_digits: String,
} | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | struct_definition | 12 | rust | CardDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct NmiMerchantDefinedField {
#[serde(flatten)]
inner: std::collections::BTreeMap<String, Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs | hyperswitch_connectors | struct_definition | 30 | rust | NmiMerchantDefinedField | null | null | null | null | null | null | null | null | null | null | null |
impl GetPaymentMethodType for WalletData {
fn get_payment_method_type(&self) -> api_enums::PaymentMethodType {
match self {
Self::AliPayQr(_) | Self::AliPayRedirect(_) => api_enums::PaymentMethodType::AliPay,
Self::AliPayHkRedirect(_) => api_enums::PaymentMethodType::AliPayHk,
... | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | impl_block | 632 | rust | null | WalletData | GetPaymentMethodType for | impl GetPaymentMethodType for for WalletData | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Paybox {} | crates/hyperswitch_connectors/src/connectors/paybox.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Paybox | api::PaymentVoid for | impl api::PaymentVoid for for Paybox | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.ToggleKVResponse
{
"type": "object",
"required": [
"merchant_id",
"kv_enabled"
],
"properties": {
"merchant_id": {
"type": "string",
"description": "The identifier for the Merchant Account",
"example": "y3oqhf46pyzuxjbcn2giaqnb44",
"maxL... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 140 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"ToggleKVResponse"
] | null | null | null | null |
pub async fn get_recon_token(state: web::Data<AppState>, req: HttpRequest) -> HttpResponse {
let flow = Flow::ReconTokenRequest;
Box::pin(api::server_wrap(
flow,
state,
&req,
(),
|state, user, _, _| recon::generate_recon_token(state, user),
&authentication::JWTAut... | crates/router/src/routes/recon.rs | router | function_signature | 111 | rust | null | null | null | null | get_recon_token | null | null | null | null | null | null | null |
pub struct NexinetsAsyncDetails {
pub success_url: Option<String>,
pub cancel_url: Option<String>,
pub failure_url: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs | hyperswitch_connectors | struct_definition | 33 | rust | NexinetsAsyncDetails | null | null | null | null | null | null | null | null | null | null | null |
pub async fn profile_update(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<common_utils::id_type::ProfileId>,
json_payload: web::Json<api_models::admin::ProfileUpdate>,
) -> HttpResponse {
let flow = Flow::ProfileUpdate;
let profile_id = path.into_inner();
let payload = json_... | crates/router/src/routes/profiles.rs | router | function_signature | 285 | rust | null | null | null | null | profile_update | null | null | null | null | null | null | null |
impl Responder {
let flow = AnalyticsFlow::GenerateRefundReport;
Box::pin(api::server_wrap(
flow,
state.clone(),
&req,
json_payload.into_inner(),
|state, (auth, user_id): auth::AuthenticationDataWithUserId, payload, _| async move {
... | crates/router/src/analytics.rs | router | impl_block | 326 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub struct SantanderPSyncBoletoRequest {
payer_document_number: Secret<i64>,
} | crates/hyperswitch_connectors/src/connectors/santander/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | SantanderPSyncBoletoRequest | null | null | null | null | null | null | null | null | null | null | null |
impl Default for Server {
fn default() -> Self {
Self {
host: "127.0.0.1".to_string(),
port: 8080,
workers: 1,
}
}
} | crates/drainer/src/settings.rs | drainer | impl_block | 52 | rust | null | Server | Default for | impl Default for for Server | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Worldline {} | crates/hyperswitch_connectors/src/connectors/worldline.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Worldline | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Worldline | null | null | null | null | null | null | null | null |
pub enum NmiStatus {
Abandoned,
Cancelled,
Pendingsettlement,
Pending,
Failed,
Complete,
InProgress,
Unknown,
}
impl<F, T> TryFrom<ResponseRouterData<F, SyncResponse, T, PaymentsResponseData>>
for RouterData<F, T, PaymentsResponseData>
{
type Error = Error;
fn try_from(
... | crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs#chunk1 | hyperswitch_connectors | chunk | 2,500 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn find_by_merchant_id_connector_refund_id_connector(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
connector_refund_id: &str,
connector: &str,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
... | crates/diesel_models/src/query/refund.rs | diesel_models | function_signature | 137 | rust | null | null | null | null | find_by_merchant_id_connector_refund_id_connector | null | null | null | null | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.