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 fn to_merchant_connector_info(&self, connector_label: &String) -> MerchantConnectorInfo { MerchantConnectorInfo { connector_label: connector_label.to_string(), merchant_connector_id: self.merchant_connector_id.clone(), } }
crates/api_models/src/admin.rs
api_models
function_signature
51
rust
null
null
null
null
to_merchant_connector_info
null
null
null
null
null
null
null
File: 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(|| { ...
crates/router/src/services/authorization/roles/predefined_roles.rs
router
full_file
3,281
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct TokenizeCreditCardData { payment_method: TokenizePaymentMethodData, }
crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs
hyperswitch_connectors
struct_definition
19
rust
TokenizeCreditCardData
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.MandateAmountData { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "integer", "format": "int64", "description": "The maximum amount to be debited for the mandate transaction", "example": 6540 ...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
281
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "MandateAmountData" ]
null
null
null
null
pub async fn link_routing_config_under_profile( state: SessionState, merchant_context: domain::MerchantContext, profile_id: common_utils::id_type::ProfileId, algorithm_id: common_utils::id_type::RoutingId, transaction_type: &enums::TransactionType, ) -> RouterResponse<routing_types::RoutingDictionar...
crates/router/src/core/routing.rs
router
function_signature
487
rust
null
null
null
null
link_routing_config_under_profile
null
null
null
null
null
null
null
pub struct OpennodePaymentsRequest { amount: MinorUnit, currency: String, description: String, auto_settle: bool, success_url: String, callback_url: String, order_id: String, }
crates/hyperswitch_connectors/src/connectors/opennode/transformers.rs
hyperswitch_connectors
struct_definition
50
rust
OpennodePaymentsRequest
null
null
null
null
null
null
null
null
null
null
null
pub struct ForteCancelRequest { action: String, authorization_code: String, }
crates/hyperswitch_connectors/src/connectors/forte/transformers.rs
hyperswitch_connectors
struct_definition
19
rust
ForteCancelRequest
null
null
null
null
null
null
null
null
null
null
null
pub struct NumberComparison { pub comparison_type: ComparisonType, pub number: u64, }
crates/api_models/src/routing.rs
api_models
struct_definition
22
rust
NumberComparison
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.ApplePayRecurringPaymentRequest { "type": "object", "required": [ "payment_description", "regular_billing", "management_u_r_l" ], "properties": { "payment_description": { "type": "string", "description": "A description of the recurring payment t...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
220
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "ApplePayRecurringPaymentRequest" ]
null
null
null
null
pub struct CheckoutTokenResponse { token: Secret<String>, }
crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs
hyperswitch_connectors
struct_definition
13
rust
CheckoutTokenResponse
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.GiftCardAdditionalData { "oneOf": [ { "type": "object", "required": [ "givex" ], "properties": { "givex": { "$ref": "#/components/schemas/GivexGiftCardAdditionalData" } } }, { "type": "object", ...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
177
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "GiftCardAdditionalData" ]
null
null
null
null
File: crates/router/src/db/authentication.rs use diesel_models::authentication::AuthenticationUpdateInternal; 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_tr...
crates/router/src/db/authentication.rs
router
full_file
1,863
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct MerchantConnectorCreate { /// Type of the Connector for the financial use case. Could range from Payments to Accounting to Banking. #[schema(value_type = ConnectorType, example = "payment_processor")] pub connector_type: api_enums::ConnectorType, /// Name of the Connector #[schema(value_...
crates/api_models/src/admin.rs
api_models
struct_definition
776
rust
MerchantConnectorCreate
null
null
null
null
null
null
null
null
null
null
null
pub struct DeliveryOptions { id: String, price: ChargeAmount, shipping_method: ShippingMethod, is_default: bool, }
crates/hyperswitch_connectors/src/connectors/amazonpay/transformers.rs
hyperswitch_connectors
struct_definition
30
rust
DeliveryOptions
null
null
null
null
null
null
null
null
null
null
null
impl ConnectorSpecifications for Redsys { fn get_connector_about(&self) -> Option<&'static ConnectorInfo> { Some(&REDSYS_CONNECTOR_INFO) } fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> { Some(&*REDSYS_SUPPORTED_PAYMENT_METHODS) } fn get_support...
crates/hyperswitch_connectors/src/connectors/redsys.rs
hyperswitch_connectors
impl_block
250
rust
null
Redsys
ConnectorSpecifications for
impl ConnectorSpecifications for for Redsys
null
null
null
null
null
null
null
null
impl api::PaymentAuthorize for Nmi {}
crates/hyperswitch_connectors/src/connectors/nmi.rs
hyperswitch_connectors
impl_block
9
rust
null
Nmi
api::PaymentAuthorize for
impl api::PaymentAuthorize for for Nmi
null
null
null
null
null
null
null
null
File: crates/router/src/services/api.rs Public functions: 20 Public structs: 1 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::HeaderM...
crates/router/src/services/api.rs#chunk0
router
chunk
8,192
null
null
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.CardNetworkTypes { "type": "object", "required": [ "eligible_connectors" ], "properties": { "card_network": { "allOf": [ { "$ref": "#/components/schemas/CardNetwork" } ], "nullable": true }, "surcharge_details": {...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
183
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "CardNetworkTypes" ]
null
null
null
null
pub async fn get_user_details(state: web::Data<AppState>, req: HttpRequest) -> HttpResponse { let flow = Flow::GetUserDetails; Box::pin(api::server_wrap( flow, state, &req, (), |state, user, _, _| user_core::get_user_details(state, user), &auth::DashboardNoPermiss...
crates/router/src/routes/user.rs
router
function_signature
98
rust
null
null
null
null
get_user_details
null
null
null
null
null
null
null
pub struct Mandates { pub supported_payment_methods: SupportedPaymentMethodsForMandate, pub update_mandate_supported: SupportedPaymentMethodsForMandate, }
crates/payment_methods/src/configs/settings.rs
payment_methods
struct_definition
36
rust
Mandates
null
null
null
null
null
null
null
null
null
null
null
pub fn get_organization_id_from_header(&self) -> RouterResult<id_type::OrganizationId> { self.get_mandatory_header_value_by_key(headers::X_ORGANIZATION_ID) .map(|val| val.to_owned()) .and_then(|organization_id| { id_type::OrganizationId::try_from_string(organization_id).c...
crates/router/src/services/authentication.rs
router
function_signature
112
rust
null
null
null
null
get_organization_id_from_header
null
null
null
null
null
null
null
pub async fn get_file_purpose(field: &mut Field) -> Option<api::FilePurpose> { let purpose = read_string(field).await; match purpose.as_deref() { Some("dispute_evidence") => Some(api::FilePurpose::DisputeEvidence), _ => None, } }
crates/router/src/core/files/helpers.rs
router
function_signature
67
rust
null
null
null
null
get_file_purpose
null
null
null
null
null
null
null
Web Documentation: SDK Reference | Hyperswitch # Type: Web Doc ​Hyperswitch provides frontend integration solutions through SDKs tailored for various frameworks, including React and JavaScript. These SDKs come with pre-built support for the frameworks used in your application, eliminating the need for additional code ...
https://docs.hyperswitch.io/learn-more/sdk-reference
null
web_doc_file
159
doc
null
null
null
null
null
web
null
null
null
https://docs.hyperswitch.io/learn-more/sdk-reference
SDK Reference | Hyperswitch
null
pub fn should_call_connector_create_customer<'a>( state: &SessionState, connector: &api::ConnectorData, customer: &'a Option<domain::Customer>, merchant_connector_account: &domain::MerchantConnectorAccountTypeDetails, ) -> (bool, Option<&'a str>) { // Check if create customer is required for the con...
crates/router/src/core/payments/customers.rs
router
function_signature
248
rust
null
null
null
null
should_call_connector_create_customer
null
null
null
null
null
null
null
pub async fn create_routing_algorithm_under_profile( state: SessionState, merchant_context: domain::MerchantContext, authentication_profile_id: Option<common_utils::id_type::ProfileId>, request: routing_types::RoutingConfigRequest, transaction_type: enums::TransactionType, ) -> RouterResponse<routin...
crates/router/src/core/routing.rs
router
function_signature
1,334
rust
null
null
null
null
create_routing_algorithm_under_profile
null
null
null
null
null
null
null
impl KafkaMessage for ApiEvent { fn event_type(&self) -> EventType { EventType::ApiLogs } fn key(&self) -> String { self.request_id.clone() } }
crates/router/src/events/api_logs.rs
router
impl_block
43
rust
null
ApiEvent
KafkaMessage for
impl KafkaMessage for for ApiEvent
null
null
null
null
null
null
null
null
/// A boolean value to indicate if redirect to merchant with http post needs to be enabled #[schema(default = false, example = true)] pub redirect_to_merchant_with_http_post: bool, /// Webhook related details pub webhook_details: Option<WebhookDetails>, /// Metadata is useful for storing addi...
crates/api_models/src/admin.rs#chunk3
api_models
chunk
8,187
null
null
null
null
null
null
null
null
null
null
null
null
null
impl NoonOrderNvp { pub fn new(metadata: &serde_json::Value) -> Self { let metadata_as_string = metadata.to_string(); let hash_map: std::collections::BTreeMap<String, serde_json::Value> = serde_json::from_str(&metadata_as_string).unwrap_or(std::collections::BTreeMap::new()); let ...
crates/hyperswitch_connectors/src/connectors/noon/transformers.rs
hyperswitch_connectors
impl_block
195
rust
null
NoonOrderNvp
null
impl NoonOrderNvp
null
null
null
null
null
null
null
null
pub struct AdjustedBy { id: i32, #[serde(rename = "type")] adjusted_by_type: String, approval: i32, message: String, amount: FloatMajorUnit, created: String, url: String, }
crates/hyperswitch_connectors/src/connectors/bambora/transformers.rs
hyperswitch_connectors
struct_definition
57
rust
AdjustedBy
null
null
null
null
null
null
null
null
null
null
null
impl api::PaymentCapture for Novalnet {}
crates/hyperswitch_connectors/src/connectors/novalnet.rs
hyperswitch_connectors
impl_block
10
rust
null
Novalnet
api::PaymentCapture for
impl api::PaymentCapture for for Novalnet
null
null
null
null
null
null
null
null
pub fn get_surcharge_details(&self, surcharge_key: SurchargeKey) -> Option<&SurchargeDetails> { self.surcharge_results.get(&surcharge_key) }
crates/router/src/core/payments/types.rs
router
function_signature
39
rust
null
null
null
null
get_surcharge_details
null
null
null
null
null
null
null
impl ConnectorCommon for Payone { fn id(&self) -> &'static str { "payone" } fn get_currency_unit(&self) -> CurrencyUnit { CurrencyUnit::Minor } fn common_get_content_type(&self) -> &'static str { "application/json" } fn base_url<'a>(&self, connectors: &'a Connector...
crates/hyperswitch_connectors/src/connectors/payone.rs
hyperswitch_connectors
impl_block
619
rust
null
Payone
ConnectorCommon for
impl ConnectorCommon for for Payone
null
null
null
null
null
null
null
null
pub struct SamsungPayPaymentInformation { fluid_data: FluidData, tokenized_card: SamsungPayTokenizedCard, }
crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs
hyperswitch_connectors
struct_definition
26
rust
SamsungPayPaymentInformation
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.PaymentsCreateRequest { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "integer", "format": "int64", "description": "The primary amount for the payment, provided in the lowest denomination of the sp...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
3,709
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "PaymentsCreateRequest" ]
null
null
null
null
impl ApiEventMetric for FrmFiltersResponse {}
crates/api_models/src/analytics.rs
api_models
impl_block
9
rust
null
FrmFiltersResponse
ApiEventMetric for
impl ApiEventMetric for for FrmFiltersResponse
null
null
null
null
null
null
null
null
impl api::RefundSync for Iatapay {}
crates/hyperswitch_connectors/src/connectors/iatapay.rs
hyperswitch_connectors
impl_block
12
rust
null
Iatapay
api::RefundSync for
impl api::RefundSync for for Iatapay
null
null
null
null
null
null
null
null
File: crates/hyperswitch_domain_models/src/behaviour.rs use common_utils::{ errors::{CustomResult, ValidationError}, types::keymanager::{Identifier, KeyManagerState}, }; use masking::Secret; /// Trait for converting domain types to storage models #[async_trait::async_trait] pub trait Conversion { type Dst...
crates/hyperswitch_domain_models/src/behaviour.rs
hyperswitch_domain_models
full_file
320
null
null
null
null
null
null
null
null
null
null
null
null
null
pub async fn refresh_cgraph_cache( state: &SessionState, key_store: &domain::MerchantKeyStore, key: String, profile_id: &common_utils::id_type::ProfileId, transaction_type: &api_enums::TransactionType, ) -> RoutingResult<Arc<hyperswitch_constraint_graph::ConstraintGraph<euclid_dir::DirValue>>> { ...
crates/router/src/core/payments/routing.rs
router
function_signature
785
rust
null
null
null
null
refresh_cgraph_cache
null
null
null
null
null
null
null
pub struct DummyConnector;
crates/router/src/routes/app.rs
router
struct_definition
5
rust
DummyConnector
null
null
null
null
null
null
null
null
null
null
null
File: crates/hyperswitch_domain_models/src/payment_address.rs Public functions: 7 Public structs: 1 use crate::address::Address; #[derive(Clone, Default, Debug)] pub struct PaymentAddress { shipping: Option<Address>, billing: Option<Address>, unified_payment_method_billing: Option<Address>, payment_...
crates/hyperswitch_domain_models/src/payment_address.rs
hyperswitch_domain_models
full_file
761
null
null
null
null
null
null
null
null
null
null
null
null
null
impl Responder { let api_auth = auth::ApiKeyAuth { is_connected_allowed: false, is_platform_allowed: true, }; let (auth_type, _auth_flow) = match auth::get_auth_type_and_flow(req.headers(), api_auth) { Ok(auth) => auth, Err(err) => return api::log_and_return_error_response(r...
crates/router/src/routes/payments.rs
router
impl_block
424
rust
null
Responder
null
impl Responder
null
null
null
null
null
null
null
null
bank_code: None, // Bank code is not stored in external vault }), )) } payment_methods::PaymentMethodsData::BankDetails(_) | payment_methods::PaymentMethodsData::WalletDetails(_) => { Err(errors::ApiErrorResponse::Unprocessabl...
crates/router/src/core/payment_methods.rs#chunk2
router
chunk
8,188
null
null
null
null
null
null
null
null
null
null
null
null
null
impl ConnectorValidation for Powertranz {}
crates/hyperswitch_connectors/src/connectors/powertranz.rs
hyperswitch_connectors
impl_block
8
rust
null
Powertranz
ConnectorValidation for
impl ConnectorValidation for for Powertranz
null
null
null
null
null
null
null
null
pub struct WellsfargopayoutRouterData<T> { pub amount: StringMinorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc. pub router_data: T, }
crates/hyperswitch_connectors/src/connectors/wellsfargopayout/transformers.rs
hyperswitch_connectors
struct_definition
53
rust
WellsfargopayoutRouterData
null
null
null
null
null
null
null
null
null
null
null
pub async fn find_payment_merchant_connector_account( &self, state: &SessionState, key_store: &domain::MerchantKeyStore, billing_connector_account: &domain::MerchantConnectorAccount, ) -> CustomResult<Option<domain::MerchantConnectorAccount>, errors::RevenueRecoveryError> { l...
crates/router/src/core/webhooks/recovery_incoming.rs
router
function_signature
240
rust
null
null
null
null
find_payment_merchant_connector_account
null
null
null
null
null
null
null
pub fn get_auth_string_from_header(&self) -> RouterResult<&str> { self.headers .get(headers::AUTHORIZATION) .get_required_value(headers::AUTHORIZATION)? .to_str() .change_context(errors::ApiErrorResponse::InvalidDataValue { field_name: headers::AUT...
crates/router/src/services/authentication.rs
router
function_signature
84
rust
null
null
null
null
get_auth_string_from_header
null
null
null
null
null
null
null
impl api::ConnectorAccessToken for Silverflow {}
crates/hyperswitch_connectors/src/connectors/silverflow.rs
hyperswitch_connectors
impl_block
9
rust
null
Silverflow
api::ConnectorAccessToken for
impl api::ConnectorAccessToken for for Silverflow
null
null
null
null
null
null
null
null
pub struct WisePayoutSyncResponse { id: u64, status: WiseSyncStatus, }
crates/hyperswitch_connectors/src/connectors/wise/transformers.rs
hyperswitch_connectors
struct_definition
23
rust
WisePayoutSyncResponse
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.SdkInformation { "type": "object", "description": "SDK Information if request is from SDK", "required": [ "sdk_app_id", "sdk_enc_data", "sdk_ephem_pub_key", "sdk_trans_id", "sdk_reference_number", "sdk_max_timeout" ], "properties": { "sdk_app_...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
377
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "SdkInformation" ]
null
null
null
null
File: crates/router/src/types/payment_methods.rs Public functions: 1 Public structs: 39 use std::fmt::Debug; use api_models::enums as api_enums; #[cfg(feature = "v1")] use cards::CardNumber; #[cfg(feature = "v2")] use cards::{CardNumber, NetworkToken}; #[cfg(feature = "v2")] use common_types::primitive_wrappers; #[...
crates/router/src/types/payment_methods.rs
router
full_file
2,558
null
null
null
null
null
null
null
null
null
null
null
null
null
pub async fn delete_totp_from_redis(state: &SessionState, user_id: &str) -> UserResult<()> { let redis_conn = super::get_redis_connection_for_global_tenant(state)?; let key = format!("{}{}", consts::user::REDIS_TOTP_PREFIX, user_id); redis_conn .delete_key(&key.into()) .await .change...
crates/router/src/utils/user/two_factor_auth.rs
router
function_signature
93
rust
null
null
null
null
delete_totp_from_redis
null
null
null
null
null
null
null
pub struct HyperswitchVaultCreateResponse { id: Secret<String>, client_secret: Secret<String>, }
crates/hyperswitch_connectors/src/connectors/hyperswitch_vault/transformers.rs
hyperswitch_connectors
struct_definition
23
rust
HyperswitchVaultCreateResponse
null
null
null
null
null
null
null
null
null
null
null
pub struct CustomerInfo { card_holder_name: Secret<String>, billing_address: Option<BillingAddress>, shipping_address: Option<ShippingAddress>, }
crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs
hyperswitch_connectors
struct_definition
32
rust
CustomerInfo
null
null
null
null
null
null
null
null
null
null
null
pub struct ZenCardDetails { number: CardNumber, expiry_date: Secret<String>, cvv: Secret<String>, }
crates/hyperswitch_connectors/src/connectors/zen/transformers.rs
hyperswitch_connectors
struct_definition
27
rust
ZenCardDetails
null
null
null
null
null
null
null
null
null
null
null
Web Documentation: Smart Routing | Hyperswitch # Type: Web Doc Prerequisites To get started with Smart Router, ensure to have one or more payment processors integrated. You can integrate the payment processor of your choice on the Control Center by following the Connector Integration guide. What is smart payment routi...
https://docs.hyperswitch.io/explore-hyperswitch/payment-orchestration/smart-router
null
web_doc_file
1,294
doc
null
null
null
null
null
web
null
null
null
https://docs.hyperswitch.io/explore-hyperswitch/payment-orchestration/smart-router
Smart Routing | Hyperswitch
null
File: crates/hyperswitch_connectors/src/connectors/payload.rs Public functions: 1 Public structs: 1 mod requests; mod responses; pub mod transformers; use std::sync::LazyLock; use base64::Engine; use common_enums::enums; use common_utils::{ consts::BASE64_ENGINE, errors::{CustomResult, ReportSwitchExt}, ...
crates/hyperswitch_connectors/src/connectors/payload.rs
hyperswitch_connectors
full_file
7,059
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct AuthenticationErrorMessageAccumulator { pub count: Option<i64>, }
crates/analytics/src/auth_events/accumulator.rs
analytics
struct_definition
18
rust
AuthenticationErrorMessageAccumulator
null
null
null
null
null
null
null
null
null
null
null
pub async fn create_gsm_rule( state: SessionState, gsm_rule: gsm_api_types::GsmCreateRequest, ) -> RouterResponse<gsm_api_types::GsmResponse> { let db = state.store.as_ref(); GsmInterface::add_gsm_rule(db, gsm_rule.foreign_into()) .await .to_duplicate_response(errors::ApiErrorResponse::G...
crates/router/src/core/gsm.rs
router
function_signature
128
rust
null
null
null
null
create_gsm_rule
null
null
null
null
null
null
null
pub struct GooglePayWalletData { /// The type of payment method pub pm_type: String, /// User-facing message to describe the payment method that funds this transaction. pub description: String, /// The information of the payment method pub info: GooglePayPaymentMethodInfo, /// The tokenizati...
crates/hyperswitch_domain_models/src/payment_method_data.rs
hyperswitch_domain_models
struct_definition
89
rust
GooglePayWalletData
null
null
null
null
null
null
null
null
null
null
null
pub struct PaymentThreshold { pub overpayment_absolute_threshold: OverpaymentAbsoluteThreshold, pub overpayment_relative_threshold: String, pub underpayment_absolute_threshold: OverpaymentAbsoluteThreshold, pub underpayment_relative_threshold: String, }
crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs
hyperswitch_connectors
struct_definition
48
rust
PaymentThreshold
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: paths."/gsm/delete" { "post": { "tags": [ "Gsm" ], "summary": "Gsm - Delete", "description": "Deletes a Gsm Rule", "operationId": "Delete Gsm Rule", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/componen...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
211
.json
null
null
null
null
null
openapi_spec
paths
[ "/gsm/delete" ]
null
null
null
null
pub struct EliminationEventResponse { pub labels_with_status: Vec<LabelWithStatusEliminationEventResponse>, }
crates/router/src/core/payments/routing/utils.rs
router
struct_definition
24
rust
EliminationEventResponse
null
null
null
null
null
null
null
null
null
null
null
File: crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs Public functions: 1 Public structs: 33 use common_enums::{enums, AttemptStatus, BankNames}; use common_utils::{ errors::ParsingError, pii::{Email, IpAddress}, request::Method, types::{FloatMajorUnit, MinorUnit}, }; use er...
crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs#chunk0
hyperswitch_connectors
chunk
8,190
null
null
null
null
null
null
null
null
null
null
null
null
null
/// Panics if `json_payload` array does not contain one `GetPaymentIntentMetricRequest` element. pub async fn get_profile_payment_intent_metrics( state: web::Data<AppState>, req: actix_web::HttpRequest, json_payload: web::Json<[GetPaymentIntentMetricRequest; 1]>, ) -> impl Responder { ...
crates/router/src/analytics.rs
router
function_signature
405
rust
null
null
null
null
get_profile_payment_intent_metrics
null
null
null
null
null
null
null
pub struct EbanxPayoutCreateRequest { integration_key: Secret<String>, external_reference: String, country: String, amount: FloatMajorUnit, currency: Currency, target: EbanxPayoutType, target_account: Secret<String>, payee: EbanxPayoutDetails, }
crates/hyperswitch_connectors/src/connectors/ebanx/transformers.rs
hyperswitch_connectors
struct_definition
69
rust
EbanxPayoutCreateRequest
null
null
null
null
null
null
null
null
null
null
null
pub async fn get_decision_based_on_params( state: &SessionState, intent_status: enums::IntentStatus, called_connector: enums::PaymentConnectorTransmission, active_attempt_id: Option<id_type::GlobalAttemptId>, revenue_recovery_data: &storage::revenue_recovery::RevenueRecoveryPayme...
crates/router/src/core/revenue_recovery/types.rs
router
function_signature
492
rust
null
null
null
null
get_decision_based_on_params
null
null
null
null
null
null
null
pub struct TsysRouterData<T> { pub amount: StringMinorUnit, pub router_data: T, }
crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs
hyperswitch_connectors
struct_definition
25
rust
TsysRouterData
null
null
null
null
null
null
null
null
null
null
null
pub async fn reinitialize_limbo_processes( conn: &PgPooledConn, ids: Vec<String>, schedule_time: PrimitiveDateTime, ) -> StorageResult<usize> { generics::generic_update::<<Self as HasTable>::Table, _, _>( conn, dsl::status .eq(enums::ProcessTra...
crates/diesel_models/src/query/process_tracker.rs
diesel_models
function_signature
126
rust
null
null
null
null
reinitialize_limbo_processes
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.BlocklistRequest { "oneOf": [ { "type": "object", "required": [ "type", "data" ], "properties": { "type": { "type": "string", "enum": [ "card_bin" ] }, "data": { ...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
257
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "BlocklistRequest" ]
null
null
null
null
impl ConnectorValidation for Volt { //TODO: implement functions when support enabled }
crates/hyperswitch_connectors/src/connectors/volt.rs
hyperswitch_connectors
impl_block
17
rust
null
Volt
ConnectorValidation for
impl ConnectorValidation for for Volt
null
null
null
null
null
null
null
null
pub async fn batch_insert( reverse_lookups: Vec<Self>, conn: &PgPooledConn, ) -> StorageResult<()> { generics::generic_insert::<_, _, ReverseLookup>(conn, reverse_lookups).await?; Ok(()) }
crates/diesel_models/src/query/reverse_lookup.rs
diesel_models
function_signature
54
rust
null
null
null
null
batch_insert
null
null
null
null
null
null
null
impl api::PaymentToken for Boku {}
crates/hyperswitch_connectors/src/connectors/boku.rs
hyperswitch_connectors
impl_block
9
rust
null
Boku
api::PaymentToken for
impl api::PaymentToken for for Boku
null
null
null
null
null
null
null
null
File: crates/router/tests/connectors/bambora.rs use std::str::FromStr; use common_utils::types::MinorUnit; use masking::Secret; use router::types::{self, domain, storage::enums}; use crate::{ connector_auth, utils::{self, ConnectorActions}, }; #[derive(Clone, Copy)] struct BamboraTest; impl ConnectorActions...
crates/router/tests/connectors/bambora.rs
router
full_file
3,353
null
null
null
null
null
null
null
null
null
null
null
null
null
File: crates/diesel_models/src/ephemeral_key.rs Public functions: 1 Public structs: 4 #[cfg(feature = "v2")] use masking::{PeekInterface, Secret}; #[cfg(feature = "v2")] pub struct ClientSecretTypeNew { pub id: common_utils::id_type::ClientSecretId, pub merchant_id: common_utils::id_type::MerchantId, pu...
crates/diesel_models/src/ephemeral_key.rs
diesel_models
full_file
423
null
null
null
null
null
null
null
null
null
null
null
null
null
pub struct CardNetworkTokenizeExecutor<'a, D> { pub state: &'a SessionState, pub merchant_account: &'a domain::MerchantAccount, key_store: &'a domain::MerchantKeyStore, data: &'a D, customer: &'a domain_request_types::CustomerDetails, }
crates/router/src/core/payment_methods/tokenize.rs
router
struct_definition
66
rust
CardNetworkTokenizeExecutor
null
null
null
null
null
null
null
null
null
null
null
impl PaymentIntents { pub fn server(state: routes::AppState) -> Scope { let mut route = web::scope("/payment_intents").app_data(web::Data::new(state)); #[cfg(feature = "olap")] { route = route.service(web::resource("/list").route(web::get().to(payment_intent_list))) } ...
crates/router/src/compatibility/stripe/app.rs
router
impl_block
260
rust
null
PaymentIntents
null
impl PaymentIntents
null
null
null
null
null
null
null
null
pub fn validate(&self) -> Result<(), ApplicationError> { common_utils::fp_utils::when(self.host.is_default_or_empty(), || { Err(ApplicationError::InvalidConfigurationValueError( "server host must not be empty".into(), )) }) }
crates/scheduler/src/configs/validations.rs
scheduler
function_signature
57
rust
null
null
null
null
validate
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.FrmAction { "type": "string", "enum": [ "cancel_txn", "auto_refund", "manual_review" ] }
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
44
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "FrmAction" ]
null
null
null
null
impl MerchantAccount { #[cfg(feature = "v1")] /// Get the unique identifier of MerchantAccount pub fn get_id(&self) -> &common_utils::id_type::MerchantId { &self.merchant_id } #[cfg(feature = "v2")] /// Get the unique identifier of MerchantAccount pub fn get_id(&self) -> &common_uti...
crates/hyperswitch_domain_models/src/merchant_account.rs
hyperswitch_domain_models
impl_block
311
rust
null
MerchantAccount
null
impl MerchantAccount
null
null
null
null
null
null
null
null
File: crates/analytics/src/disputes/metrics/total_dispute_lost_amount.rs use std::collections::HashSet; use api_models::analytics::{ disputes::{DisputeDimensions, DisputeFilters, DisputeMetricsBucketIdentifier}, Granularity, TimeRange, }; use common_utils::errors::ReportSwitchExt; use error_stack::ResultExt; ...
crates/analytics/src/disputes/metrics/total_dispute_lost_amount.rs
analytics
full_file
851
null
null
null
null
null
null
null
null
null
null
null
null
null
pub async fn schedule_refund_execution( state: &SessionState, refund: diesel_refund::Refund, refund_type: api_models::refunds::RefundType, merchant_context: &domain::MerchantContext, payment_attempt: &storage::PaymentAttempt, payment_intent: &storage::PaymentIntent, merchant_connector_detail...
crates/router/src/core/refunds_v2.rs
router
function_signature
826
rust
null
null
null
null
schedule_refund_execution
null
null
null
null
null
null
null
pub struct ProdIntent { pub legal_business_name: Option<String>, pub business_label: Option<String>, pub business_location: Option<CountryAlpha2>, pub display_name: Option<String>, pub poc_email: Option<Secret<String>>, pub business_type: Option<String>, pub business_identifier: Option<Strin...
crates/api_models/src/user/dashboard_metadata.rs
api_models
struct_definition
133
rust
ProdIntent
null
null
null
null
null
null
null
null
null
null
null
pub struct ProfileUpdate { /// The name of profile #[schema(max_length = 64)] pub profile_name: Option<String>, /// The URL to redirect after the completion of the operation #[schema(value_type = Option<String>, max_length = 255, example = "https://www.example.com/success")] pub return_url: Opt...
crates/api_models/src/admin.rs
api_models
struct_definition
1,710
rust
ProfileUpdate
null
null
null
null
null
null
null
null
null
null
null
pub fn make_dsl_input_for_payouts( payout_data: &payouts::PayoutData, ) -> RoutingResult<dsl_inputs::BackendInput> { let mandate = dsl_inputs::MandateData { mandate_acceptance_type: None, mandate_type: None, payment_type: None, }; let metadata = payout_data .payouts ...
crates/router/src/core/payments/routing.rs
router
function_signature
493
rust
null
null
null
null
make_dsl_input_for_payouts
null
null
null
null
null
null
null
impl api::Payment for HyperswitchVault {}
crates/hyperswitch_connectors/src/connectors/hyperswitch_vault.rs
hyperswitch_connectors
impl_block
10
rust
null
HyperswitchVault
api::Payment for
impl api::Payment for for HyperswitchVault
null
null
null
null
null
null
null
null
impl std::fmt::Display for Op<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Op::Insert => f.write_str("insert"), Op::Find => f.write_str("find"), Op::Update(p_key, _, updated_by) => { f.write_str(&format!("update_{...
crates/storage_impl/src/redis/kv_store.rs
storage_impl
impl_block
103
rust
null
Op
std::fmt::Display for
impl std::fmt::Display for for Op
null
null
null
null
null
null
null
null
impl IncomingWebhook for Payone { fn get_webhook_object_reference_id( &self, _request: &IncomingWebhookRequestDetails<'_>, ) -> CustomResult<ObjectReferenceId, ConnectorError> { Err(report!(ConnectorError::WebhooksNotImplemented)) } fn get_webhook_event_type( &self, ...
crates/hyperswitch_connectors/src/connectors/payone.rs
hyperswitch_connectors
impl_block
173
rust
null
Payone
IncomingWebhook for
impl IncomingWebhook for for Payone
null
null
null
null
null
null
null
null
impl api::PaymentSession for Shift4 {}
crates/hyperswitch_connectors/src/connectors/shift4.rs
hyperswitch_connectors
impl_block
9
rust
null
Shift4
api::PaymentSession for
impl api::PaymentSession for for Shift4
null
null
null
null
null
null
null
null
### Bug Fixes - **users:** Fallback to fresh lineage context if cached role_id no longer matches ([#8593](https://github.com/juspay/hyperswitch/pull/8593)) ([`aaa4fca`](https://github.com/juspay/hyperswitch/commit/aaa4fca58d8eaab0eb0163aad226427eebf7c7cd)) ### Refactors - **dynamic_routing:** Make the dynamo configs...
CHANGELOG.md#chunk4
null
doc_chunk
8,142
doc
null
null
null
null
null
null
null
null
null
null
null
null
pub struct ValidateResult { pub merchant_id: common_utils::id_type::MerchantId, pub payment_id: api::PaymentIdType, pub storage_scheme: enums::MerchantStorageScheme, pub requeue: bool, }
crates/router/src/core/payments/operations.rs
router
struct_definition
49
rust
ValidateResult
null
null
null
null
null
null
null
null
null
null
null
impl std::fmt::Display for InvalidCrmConfig { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "crm: {}", self.0) } }
crates/external_services/src/crm.rs
external_services
impl_block
53
rust
null
InvalidCrmConfig
std::fmt::Display for
impl std::fmt::Display for for InvalidCrmConfig
null
null
null
null
null
null
null
null
pub struct SdkEventMetricsAccumulator { pub payment_attempts: CountAccumulator, pub payment_methods_call_count: CountAccumulator, pub average_payment_time: CountAccumulator, pub load_time: CountAccumulator, pub sdk_initiated_count: CountAccumulator, pub sdk_rendered_count: CountAccumulator, ...
crates/analytics/src/sdk_events/accumulator.rs
analytics
struct_definition
102
rust
SdkEventMetricsAccumulator
null
null
null
null
null
null
null
null
null
null
null
/// Derives the [`Serialize`][Serialize] implementation for error responses that are returned by /// the API server. /// /// This macro can be only used with enums. In addition to deriving [`Serialize`][Serialize], this /// macro provides three methods: `error_type()`, `error_code()` and `error_message()`. Each enum //...
crates/router_derive/src/lib.rs
router_derive
macro
1,282
rust
null
null
null
null
null
null
null
null
proc_derive
null
null
null
OpenAPI Block Path: components.schemas.CtpServiceDetails { "type": "object", "properties": { "merchant_transaction_id": { "type": "string", "description": "merchant transaction id", "nullable": true }, "correlation_id": { "type": "string", "description": "network transactio...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
193
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "CtpServiceDetails" ]
null
null
null
null
impl api::PaymentAuthorize for Trustpay {}
crates/hyperswitch_connectors/src/connectors/trustpay.rs
hyperswitch_connectors
impl_block
9
rust
null
Trustpay
api::PaymentAuthorize for
impl api::PaymentAuthorize for for Trustpay
null
null
null
null
null
null
null
null
File: crates/router/src/types/api/api_keys.rs pub use api_models::api_keys::{ ApiKeyExpiration, CreateApiKeyRequest, CreateApiKeyResponse, ListApiKeyConstraints, RetrieveApiKeyResponse, RevokeApiKeyResponse, UpdateApiKeyRequest, };
crates/router/src/types/api/api_keys.rs
router
full_file
51
null
null
null
null
null
null
null
null
null
null
null
null
null
impl ConnectorValidation for Zen { fn validate_psync_reference_id( &self, _data: &PaymentsSyncData, _is_three_ds: bool, _status: enums::AttemptStatus, _connector_meta_data: Option<common_utils::pii::SecretSerdeValue>, ) -> CustomResult<(), errors::ConnectorError> { ...
crates/hyperswitch_connectors/src/connectors/zen.rs
hyperswitch_connectors
impl_block
104
rust
null
Zen
ConnectorValidation for
impl ConnectorValidation for for Zen
null
null
null
null
null
null
null
null
pub struct GlobalpayWebhookObjectEventType { pub status: GlobalpayWebhookStatus, }
crates/hyperswitch_connectors/src/connectors/globalpay/response.rs
hyperswitch_connectors
struct_definition
20
rust
GlobalpayWebhookObjectEventType
null
null
null
null
null
null
null
null
null
null
null
pub struct ItaubankTokenErrorResponse { pub status: i64, pub title: Option<String>, pub detail: Option<String>, pub user_message: Option<String>, }
crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs
hyperswitch_connectors
struct_definition
39
rust
ItaubankTokenErrorResponse
null
null
null
null
null
null
null
null
null
null
null
OpenAPI Block Path: components.schemas.PaymentsUpdateRequest { "type": "object", "properties": { "amount": { "type": "integer", "format": "int64", "description": "The primary amount for the payment, provided in the lowest denomination of the specified currency (e.g., 6540 for $65.40 USD). This...
./hyperswitch/api-reference/v1/openapi_spec_v1.json
null
openapi_block
3,520
.json
null
null
null
null
null
openapi_spec
components
[ "schemas", "PaymentsUpdateRequest" ]
null
null
null
null