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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
impl PaymentMetricsBucketIdentifier {
#[allow(clippy::too_many_arguments)]
pub fn new(
currency: Option<Currency>,
status: Option<AttemptStatus>,
connector: Option<String>,
auth_type: Option<AuthenticationType>,
payment_method: Option<String>,
payment_method_type:... | crates/api_models/src/analytics/payments.rs | api_models | impl_block | 282 | rust | null | PaymentMetricsBucketIdentifier | null | impl PaymentMetricsBucketIdentifier | null | null | null | null | null | null | null | null |
File: crates/analytics/src/sdk_events/metrics/payment_method_selected_count.rs
use std::collections::HashSet;
use api_models::analytics::{
sdk_events::{
SdkEventDimensions, SdkEventFilters, SdkEventMetricsBucketIdentifier, SdkEventNames,
},
Granularity, TimeRange,
};
use common_utils::errors::Repo... | crates/analytics/src/sdk_events/metrics/payment_method_selected_count.rs | analytics | full_file | 798 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn totp_update(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<user_api::VerifyTotpRequest>,
) -> HttpResponse {
let flow = Flow::TotpUpdate;
Box::pin(api::server_wrap(
flow,
state.clone(),
&req,
json_payload.into_inner(),
|sta... | crates/router/src/routes/user.rs | router | function_signature | 135 | rust | null | null | null | null | totp_update | null | null | null | null | null | null | null |
File: crates/diesel_models/src/merchant_key_store.rs
Public structs: 3
use common_utils::{custom_serde, encryption::Encryption};
use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
use time::PrimitiveDateTime;
use crate::schema::merchant_key_store;
#[derive(
Clone,
Debug,
serde::... | crates/diesel_models/src/merchant_key_store.rs | diesel_models | full_file | 325 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PayoutCreate for Stripe {} | crates/hyperswitch_connectors/src/connectors/stripe.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Stripe | api::PayoutCreate for | impl api::PayoutCreate for for Stripe | null | null | null | null | null | null | null | null |
File: crates/storage_impl/src/kv_router_store.rs
Public functions: 9
Public structs: 4
use std::{fmt::Debug, sync::Arc};
use common_enums::enums::MerchantStorageScheme;
use common_utils::{fallback_reverse_lookup_not_found, types::keymanager::KeyManagerState};
use diesel_models::{errors::DatabaseError, kv};
use erro... | crates/storage_impl/src/kv_router_store.rs | storage_impl | full_file | 3,934 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn decode_jwt<T>(token: &str, state: &impl SessionStateInfo) -> RouterResult<T>
where
T: serde::de::DeserializeOwned,
{
let conf = state.conf();
let secret = conf.secrets.get_inner().jwt_secret.peek().as_bytes();
let key = DecodingKey::from_secret(secret);
decode::<T>(token, &key, &Valida... | crates/router/src/services/authentication.rs | router | function_signature | 120 | rust | null | null | null | null | decode_jwt | null | null | null | null | null | null | null |
/// Middleware to build a TOP level domain span for each request.
pub struct LogSpanInitializer; | crates/router/src/middleware.rs | router | struct_definition | 19 | rust | LogSpanInitializer | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentInformationResponse {
tokenized_card: Option<CardResponseObject>,
customer: Option<CustomerResponseObject>,
card: Option<CardResponseObject>,
scheme: Option<String>,
bin: Option<String>,
account_type: Option<String>,
issuer: Option<String>,
bin_country: Option<enums::Co... | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 70 | rust | PaymentInformationResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_authorize_page(
payment_data: types::DummyConnectorPaymentData,
return_url: String,
dummy_connector_conf: &settings::DummyConnector,
) -> String {
let mode = payment_data.payment_method_type.get_name();
let image = payment_data
.payment_method_type
.get_image_link(dummy_co... | crates/router/src/routes/dummy_connector/utils.rs | router | function_signature | 663 | rust | null | null | null | null | get_authorize_page | null | null | null | null | null | null | null |
pub async fn list_users_in_lineage(
state: web::Data<AppState>,
req: HttpRequest,
query: web::Query<user_role_api::ListUsersInEntityRequest>,
) -> HttpResponse {
let flow = Flow::ListUsersInLineage;
Box::pin(api::server_wrap(
flow,
state.clone(),
&req,
query.into_inn... | crates/router/src/routes/user_role.rs | router | function_signature | 141 | rust | null | null | null | null | list_users_in_lineage | null | null | null | null | null | null | null |
pub struct BankRedirectRequest {
payment_method: PaymentMethod,
flow: Flow,
} | crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | BankRedirectRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct MerchantDetails {
pub merchant_id: Option<String>,
pub merchant_name: Option<String>,
pub merchant_category_code: Option<MerchantCategoryCode>,
pub configuration_id: Option<String>,
pub endpoint_prefix: Option<String>,
pub three_ds_requestor_url: Option<String>,
pub three_ds_reque... | crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs | hyperswitch_connectors | struct_definition | 106 | rust | MerchantDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct BrowserDetails {
pub accept_header: String,
pub ip: Secret<String, IpAddress>,
pub java_enabled: String,
pub java_script_enabled: String,
pub language: String,
pub color_depth: u8,
pub screen_height: u32,
pub screen_width: u32,
pub time_zone: i32,
pub user_agent: Strin... | crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs | hyperswitch_connectors | struct_definition | 86 | rust | BrowserDetails | null | null | null | null | null | null | null | null | null | null | null |
pub async fn refund_update_core(
state: SessionState,
merchant_context: domain::MerchantContext,
req: refunds::RefundUpdateRequest,
) -> RouterResponse<refunds::RefundResponse> {
let db = state.store.as_ref();
let refund = db
.find_refund_by_merchant_id_refund_id(
merchant_contex... | crates/router/src/core/refunds.rs | router | function_signature | 261 | rust | null | null | null | null | refund_update_core | null | null | null | null | null | null | null |
File: crates/router/src/core/configs.rs
Public functions: 4
use error_stack::ResultExt;
use crate::{
core::errors::{self, utils::StorageErrorExt, RouterResponse},
routes::SessionState,
services::ApplicationResponse,
types::{api, transformers::ForeignInto},
};
pub async fn set_config(state: SessionSt... | crates/router/src/core/configs.rs | router | full_file | 424 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub trait PaymentMethodChecker<F> {
fn should_update_in_post_update_tracker(&self) -> bool;
fn should_update_in_update_tracker(&self) -> bool;
} | crates/router/src/core/payments.rs | router | trait_definition | 36 | rust | null | null | PaymentMethodChecker | null | null | null | null | null | null | null | null | null |
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, ToSchema)]
pub struct SuccessBasedRoutingConfigBody {
pub min_aggregates_size: Option<u32>,
pub default_success_rate: Option<f64>,
pub max_aggregates_size: Option<u32>,
pub current_block_threshold: Option<CurrentBlockThreshold>,
#[serde... | crates/api_models/src/routing.rs#chunk1 | api_models | chunk | 4,245 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentIntentUpdateFields {
pub amount: MinorUnit,
pub currency: common_enums::Currency,
pub setup_future_usage: Option<common_enums::FutureUsage>,
pub status: common_enums::IntentStatus,
pub customer_id: Option<id_type::CustomerId>,
pub shipping_address_id: Option<String>,
pub bi... | crates/hyperswitch_domain_models/src/payments/payment_intent.rs | hyperswitch_domain_models | struct_definition | 440 | rust | PaymentIntentUpdateFields | null | null | null | null | null | null | null | null | null | null | null |
File: crates/analytics/src/payment_intents/metrics/sessionized_metrics/payment_processed_amount.rs
use std::collections::HashSet;
use api_models::analytics::{
payment_intents::{
PaymentIntentDimensions, PaymentIntentFilters, PaymentIntentMetricsBucketIdentifier,
},
Granularity, TimeRange,
};
use c... | crates/analytics/src/payment_intents/metrics/sessionized_metrics/payment_processed_amount.rs | analytics | full_file | 1,104 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Iatapay {
fn id(&self) -> &'static str {
"iatapay"
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Base
}
fn base_url<'a>(&self, connectors: &'... | crates/hyperswitch_connectors/src/connectors/iatapay.rs | hyperswitch_connectors | impl_block | 527 | rust | null | Iatapay | ConnectorCommon for | impl ConnectorCommon for for Iatapay | null | null | null | null | null | null | null | null |
pub fn export_collection(connector_name: &str, collection_dir_path: String) {
let collection_path = get_collection_path(connector_name);
let mut newman_command = Command::new("newman");
newman_command.args([
"dir-import".to_owned(),
collection_dir_path,
"-o".to_owned(),
coll... | crates/test_utils/src/newman_runner.rs | test_utils | function_signature | 184 | rust | null | null | null | null | export_collection | null | null | null | null | null | null | null |
impl FraudCheck for Riskified {} | crates/hyperswitch_connectors/src/connectors/riskified.rs | hyperswitch_connectors | impl_block | 7 | rust | null | Riskified | FraudCheck for | impl FraudCheck for for Riskified | null | null | null | null | null | null | null | null |
pub struct MpgsRouterData<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/mpgs/transformers.rs | hyperswitch_connectors | struct_definition | 51 | rust | MpgsRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn insert_cvc_using_payment_token(
state: &routes::SessionState,
payment_token: &String,
payment_method_data: api_models::payment_methods::PaymentMethodCreateData,
payment_method: common_enums::PaymentMethod,
fulfillment_time: i64,
encryption_key: &masking::Secret<Vec<u8>>,
) -> Router... | crates/router/src/core/payment_methods/vault.rs | router | function_signature | 396 | rust | null | null | null | null | insert_cvc_using_payment_token | null | null | null | null | null | null | null |
pub async fn retrieve_conditional_config(
state: SessionState,
key_store: domain::MerchantKeyStore,
profile: domain::Profile,
) -> RouterResponse<common_types::payments::DecisionManagerResponse> {
let db = state.store.as_ref();
let key_manager_state: &KeyManagerState = &(&state).into();
let prof... | crates/router/src/core/conditional_config.rs | router | function_signature | 172 | rust | null | null | null | null | retrieve_conditional_config | null | null | null | null | null | null | null |
File: crates/router/src/routes/payout_link.rs
Public functions: 1
use actix_web::{web, Responder};
use api_models::payouts::PayoutLinkInitiateRequest;
use router_env::Flow;
use crate::{
core::{api_locking, payout_link::*},
services::{
api,
authentication::{self as auth},
},
types::dom... | crates/router/src/routes/payout_link.rs | router | full_file | 326 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/analytics/src/frm/metrics.rs
Public structs: 1
use api_models::analytics::{
frm::{FrmDimensions, FrmFilters, FrmMetrics, FrmMetricsBucketIdentifier, FrmTransactionType},
Granularity, TimeRange,
};
use diesel_models::enums as storage_enums;
use time::PrimitiveDateTime;
mod frm_blocked_rate;
mod fr... | crates/analytics/src/frm/metrics.rs | analytics | full_file | 718 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_nmi_webhook_event(status: NmiWebhookEventType) -> IncomingWebhookEvent {
match status {
NmiWebhookEventType::SaleSuccess => IncomingWebhookEvent::PaymentIntentSuccess,
NmiWebhookEventType::SaleFailure => IncomingWebhookEvent::PaymentIntentFailure,
NmiWebhookEventType::RefundSucces... | crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs | hyperswitch_connectors | function_signature | 290 | rust | null | null | null | null | get_nmi_webhook_event | null | null | null | null | null | null | null |
pub struct Mobile {
device_model: Option<String>,
os_type: Option<String>,
os_version: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | Mobile | null | null | null | null | null | null | null | null | null | null | null |
impl ProfileInterface for KafkaStore {
async fn insert_business_profile(
&self,
key_manager_state: &KeyManagerState,
merchant_key_store: &domain::MerchantKeyStore,
business_profile: domain::Profile,
) -> CustomResult<domain::Profile, errors::StorageError> {
self.diesel_st... | crates/router/src/db/kafka_store.rs | router | impl_block | 709 | rust | null | KafkaStore | ProfileInterface for | impl ProfileInterface for for KafkaStore | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Airwallex {} | crates/hyperswitch_connectors/src/connectors/airwallex.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Airwallex | api::PaymentSync for | impl api::PaymentSync for for Airwallex | null | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/cybersource.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.MandateData
{
"type": "object",
"description": "Passing this object during payments creates a mandate. The mandate_type sub object is passed by the server.",
"properties": {
"update_mandate_id": {
"type": "string",
"description": "A way to update the mandate'... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 184 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"MandateData"
] | null | null | null | null |
pub struct RSyncTransactionResponse {
#[serde(rename = "transId")]
transaction_id: String,
transaction_status: RSyncStatus,
} | crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs | hyperswitch_connectors | struct_definition | 31 | rust | RSyncTransactionResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn construct_payment_router_data_for_update_metadata<'a>(
state: &'a SessionState,
payment_data: PaymentData<api::UpdateMetadata>,
connector_id: &str,
merchant_context: &domain::MerchantContext,
customer: &'a Option<domain::Customer>,
merchant_connector_account: &helpers::MerchantConne... | crates/router/src/core/payments/transformers.rs | router | function_signature | 1,527 | rust | null | null | null | null | construct_payment_router_data_for_update_metadata | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::PaymentsList;
let payload = payload.into_inner();
Box::pin(api::server_wrap(
flow,
state,
&req,
payload,
|state, auth: auth::AuthenticationData, req, _| {
let merchant_context = domain::MerchantContext::NormalMerchant(Box:... | crates/router/src/routes/payments.rs | router | impl_block | 142 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
impl api::Payment for CtpMastercard {} | crates/hyperswitch_connectors/src/connectors/ctp_mastercard.rs | hyperswitch_connectors | impl_block | 10 | rust | null | CtpMastercard | api::Payment for | impl api::Payment for for CtpMastercard | null | null | null | null | null | null | null | null |
Documentation: api-reference/v1/organization/organization--create.mdx
# Type: Doc File
---
openapi: post /organization
--- | api-reference/v1/organization/organization--create.mdx | null | doc_file | 30 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct VoltPaymentsRequest {
amount: MinorUnit,
currency_code: enums::Currency,
#[serde(rename = "type")]
transaction_type: TransactionType,
merchant_internal_reference: String,
shopper: ShopperDetails,
payment_success_url: Option<String>,
payment_failure_url: Option<String>,
pay... | crates/hyperswitch_connectors/src/connectors/volt/transformers.rs | hyperswitch_connectors | struct_definition | 82 | rust | VoltPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentToken for Signifyd {} | crates/hyperswitch_connectors/src/connectors/signifyd.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Signifyd | PaymentToken for | impl PaymentToken for for Signifyd | null | null | null | null | null | null | null | null |
pub async fn payments_operation_core<F, Req, Op, FData, D>(
state: &SessionState,
req_state: ReqState,
merchant_context: &domain::MerchantContext,
profile_id_from_auth_layer: Option<id_type::ProfileId>,
operation: Op,
req: Req,
call_connector_action: CallConnectorAction,
auth_flow: servi... | crates/router/src/core/payments.rs | router | function_signature | 4,152 | rust | null | null | null | null | payments_operation_core | null | null | null | null | null | null | null |
pub fn add_tenant(&mut self, tenant_config: &dyn TenantConfig) {
if let Self::Kafka(kafka_producer) = self {
kafka_producer.set_tenancy(tenant_config);
}
} | crates/router/src/events.rs | router | function_signature | 48 | rust | null | null | null | null | add_tenant | null | null | null | null | null | null | null |
pub struct PayoutAttemptUpdateMems {
pub orig: PayoutAttempt,
pub update_data: PayoutAttemptUpdate,
} | crates/diesel_models/src/kv.rs | diesel_models | struct_definition | 28 | rust | PayoutAttemptUpdateMems | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v2/payments/payments--get.mdx
# Type: Doc File
---
openapi: get /v2/payments/{id}
--- | api-reference/v2/payments/payments--get.mdx | null | doc_file | 35 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/payment_methods/{method_id}"
{
"get": {
"tags": [
"Payment Methods"
],
"summary": "Payment Method - Retrieve",
"description": "Retrieves a payment method of a customer.",
"operationId": "Retrieve a Payment method",
"parameters": [
{
"name": "meth... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 442 | .json | null | null | null | null | null | openapi_spec | paths | [
"/payment_methods/{method_id}"
] | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &MinorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/razorpay.rs | hyperswitch_connectors | function_signature | 27 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
File: crates/router/src/types/transformers.rs
use actix_web::http::header::HeaderMap;
use api_models::{
cards_info as card_info_types, enums as api_enums, gsm as gsm_api_types, payment_methods,
payments, routing::ConnectorSelection,
};
use common_utils::{
consts::X_HS_LATENCY,
crypto::Encryptable,
... | crates/router/src/types/transformers.rs#chunk0 | router | chunk | 8,142 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct StaxRouterData<T> {
pub amount: f64,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/stax/transformers.rs | hyperswitch_connectors | struct_definition | 25 | rust | StaxRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub struct Nexixpay {
amount_converter: &'static (dyn AmountConvertor<Output = StringMinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/nexixpay.rs | hyperswitch_connectors | struct_definition | 28 | rust | Nexixpay | null | null | null | null | null | null | null | null | null | null | null |
pub fn set_cookie_response<R>(response: R, token: Secret<String>) -> UserResponse<R> {
let jwt_expiry_in_seconds = JWT_TOKEN_TIME_IN_SECS
.try_into()
.map_err(|_| UserErrors::InternalServerError)?;
let (expiry, max_age) = get_expiry_and_max_age_from_seconds(jwt_expiry_in_seconds);
let heade... | crates/router/src/services/authentication/cookies.rs | router | function_signature | 136 | rust | null | null | null | null | set_cookie_response | null | null | null | null | null | null | null |
pub struct AccessTokenErrorResponse {
pub cause: String,
pub description: String,
} | crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | AccessTokenErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardParams {
pub card: AuthResult,
} | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | struct_definition | 13 | rust | CardParams | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Paysafe {
fn id(&self) -> &'static str {
"paysafe"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Minor
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, connectors: &... | crates/hyperswitch_connectors/src/connectors/paysafe.rs | hyperswitch_connectors | impl_block | 568 | rust | null | Paysafe | ConnectorCommon for | impl ConnectorCommon for for Paysafe | null | null | null | null | null | null | null | null |
pub fn perform_dynamic_routing_volume_split(
splits: Vec<api_models::routing::RoutingVolumeSplit>,
rng_seed: Option<&str>,
) -> RoutingResult<api_models::routing::RoutingVolumeSplit> {
let weights: Vec<u8> = splits.iter().map(|sp| sp.split).collect();
let weighted_index = distributions::WeightedIndex::n... | crates/router/src/core/payments/routing.rs | router | function_signature | 250 | rust | null | null | null | null | perform_dynamic_routing_volume_split | null | null | null | null | null | null | null |
/// Ensure that the input data and the structure of the query are valid and correctly handled.
pub fn construct_payload(&self, indexes: &[SearchIndex]) -> QueryResult<Vec<Value>> {
let mut query_obj = Map::new();
let bool_obj = Map::new();
let (case_sensitive_filters, case_insensitive_filte... | crates/analytics/src/opensearch.rs | analytics | function_signature | 356 | rust | null | null | null | null | construct_payload | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs
Public structs: 18
use api_models::payments::QrCodeInformation;
use common_enums::enums;
use common_utils::{errors::CustomResult, ext_traits::Encode, types::StringMajorUnit};
use error_stack::ResultExt;
use hyperswitch_domain_models::{
pa... | crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs | hyperswitch_connectors | full_file | 3,714 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_domain_models/src/card_testing_guard_data.rs
Public structs: 1
use serde::{self, Deserialize, Serialize};
#[derive(Clone, Serialize, Deserialize, Debug)]
pub struct CardTestingGuardData {
pub is_card_ip_blocking_enabled: bool,
pub card_ip_blocking_cache_key: String,
pub is_guest_... | crates/hyperswitch_domain_models/src/card_testing_guard_data.rs | hyperswitch_domain_models | full_file | 122 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct CybersourcePaymentsRequest {
processing_information: ProcessingInformation,
payment_information: PaymentInformation,
order_information: OrderInformationWithBill,
client_reference_information: ClientReferenceInformation,
#[serde(skip_serializing_if = "Option::is_none")]
consumer_authen... | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 95 | rust | CybersourcePaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/plaid.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use api_models::webhooks::{IncomingWebhookEvent, ObjectReferenceId};
use common_enums::enums;
use common_utils::{
errors::CustomResult,
ext_traits::BytesExt,
r... | crates/hyperswitch_connectors/src/connectors/plaid.rs | hyperswitch_connectors | full_file | 3,654 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.Bank
{
"oneOf": [
{
"$ref": "#/components/schemas/AchBankTransfer"
},
{
"$ref": "#/components/schemas/BacsBankTransfer"
},
{
"$ref": "#/components/schemas/SepaBankTransfer"
},
{
"$ref": "#/components/schemas/PixBankTransfer"
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 94 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"Bank"
] | null | null | null | null |
pub async fn authentication_create(
state: web::Data<app::AppState>,
req: HttpRequest,
json_payload: web::Json<AuthenticationCreateRequest>,
) -> impl Responder {
let flow = Flow::AuthenticationCreate;
Box::pin(api::server_wrap(
flow,
state,
&req,
json_payload.into_i... | crates/router/src/routes/authentication.rs | router | function_signature | 183 | rust | null | null | null | null | authentication_create | null | null | null | null | null | null | null |
pub struct Billing {
name: Option<Secret<String>>,
email: Option<pii::Email>,
address: Option<Address>,
#[serde(skip_serializing_if = "Option::is_none")]
vat: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs | hyperswitch_connectors | struct_definition | 50 | rust | Billing | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_profile_id_list(&self) -> Option<Vec<id_type::ProfileId>> {
if let Self::List(pi_list_params) = self {
pi_list_params.profile_id.clone()
} else {
None
}
} | crates/hyperswitch_domain_models/src/payments/payment_intent.rs | hyperswitch_domain_models | function_signature | 52 | rust | null | null | null | null | get_profile_id_list | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/square/transformers.rs
Public structs: 17
use api_models::webhooks::IncomingWebhookEvent;
use common_enums::enums;
use error_stack::ResultExt;
use hyperswitch_domain_models::{
payment_method_data::{BankDebitData, Card, PayLaterData, PaymentMethodData, WalletData}... | crates/hyperswitch_connectors/src/connectors/square/transformers.rs | hyperswitch_connectors | full_file | 4,461 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct GetnetWebhookNotificationResponse {
#[serde(rename = "response-signature-base64")]
pub response_signature_base64: Secret<String>,
#[serde(rename = "response-signature-algorithm")]
pub response_signature_algorithm: Secret<String>,
#[serde(rename = "response-base64")]
pub response_base6... | crates/hyperswitch_connectors/src/connectors/getnet/transformers.rs | hyperswitch_connectors | struct_definition | 76 | rust | GetnetWebhookNotificationResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn validate(&self) -> Result<(), ApplicationError> {
use common_utils::fp_utils::when;
when(
(self.dynamic_routing_enabled || self.static_routing_enabled)
&& self.url.is_default_or_empty(),
|| {
Err(ApplicationError::InvalidConfigurationValueE... | crates/router/src/configs/validations.rs | router | function_signature | 85 | rust | null | null | null | null | validate | null | null | null | null | null | null | null |
pub struct Wellsfargo {
amount_converter: &'static (dyn AmountConvertor<Output = StringMajorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/wellsfargo.rs | hyperswitch_connectors | struct_definition | 28 | rust | Wellsfargo | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentMethodDataBankCreds {
pub mask: String,
pub hash: String,
pub account_type: Option<String>,
pub account_name: Option<String>,
pub payment_method_type: api_enums::PaymentMethodType,
pub connector_details: Vec<BankAccountConnectorDetails>,
} | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 64 | rust | PaymentMethodDataBankCreds | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentsRedirectResponseData {
pub connector: Option<String>,
pub param: Option<String>,
pub merchant_id: Option<id_type::MerchantId>,
pub json_payload: Option<serde_json::Value>,
pub resource_id: api::PaymentIdType,
pub force_sync: bool,
pub creds_identifier: Option<String>,
} | crates/router/src/core/payments.rs | router | struct_definition | 73 | rust | PaymentsRedirectResponseData | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_mandate_details_value(&self) -> CustomResult<serde_json::Value, ParsingError> {
let mut payments = self
.payments
.as_ref()
.map_or_else(|| Ok(serde_json::json!({})), serde_json::to_value)
.change_context(ParsingError::StructParseFailure("payment mandat... | crates/diesel_models/src/payment_method.rs | diesel_models | function_signature | 192 | rust | null | null | null | null | get_mandate_details_value | null | null | null | null | null | null | null |
pub struct PaymentIntentFiltersResponse {
pub query_data: Vec<PaymentIntentFilterValue>,
} | crates/api_models/src/analytics.rs | api_models | struct_definition | 20 | rust | PaymentIntentFiltersResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentGateway {
pub id: String,
} | crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs | hyperswitch_connectors | struct_definition | 12 | rust | PaymentGateway | null | null | null | null | null | null | null | null | null | null | null |
pub fn from_decision_engine_approach(approach: &str) -> Self {
match approach {
"SR_SELECTION_V3_ROUTING" => Self::SuccessRateExploitation,
"SR_V3_HEDGING" => Self::SuccessRateExploration,
"NTW_BASED_ROUTING" => Self::DebitRouting,
"DEFAULT" => Self::StraightThrou... | crates/common_enums/src/enums.rs | common_enums | function_signature | 94 | rust | null | null | null | null | from_decision_engine_approach | null | null | null | null | null | null | null |
## 2024.02.12.0
### Features
- **user:** Implement force password reset ([#3572](https://github.com/juspay/hyperswitch/pull/3572)) ([`cfa10aa`](https://github.com/juspay/hyperswitch/commit/cfa10aa60ef16d2302787f7ecf7c129228fc0549))
- **users:** Add transfer org ownership API ([#3603](https://github.com/juspay/hypers... | CHANGELOG.md#chunk40 | null | doc_chunk | 8,191 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Payme {} | crates/hyperswitch_connectors/src/connectors/payme.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Payme | api::PaymentVoid for | impl api::PaymentVoid for for Payme | null | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/payments/{payment_id}/complete_authorize"
{
"post": {
"tags": [
"Payments"
],
"summary": "Payments - Complete Authorize",
"operationId": "Complete Authorize a Payment",
"parameters": [
{
"name": "payment_id",
"in": "path",
"descriptio... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 303 | .json | null | null | null | null | null | openapi_spec | paths | [
"/payments/{payment_id}/complete_authorize"
] | null | null | null | null |
pub async fn update_theme(
state: SessionState,
theme_id: String,
request: theme_api::UpdateThemeRequest,
) -> UserResponse<theme_api::GetThemeResponse> {
let db_theme = match request.email_config {
Some(email_config) => {
let theme_update = ThemeUpdate::EmailConfig { email_config };... | crates/router/src/core/user/theme.rs | router | function_signature | 393 | rust | null | null | null | null | update_theme | null | null | null | null | null | null | null |
pub struct Globepay {
amount_converter: &'static (dyn AmountConvertor<Output = MinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/globepay.rs | hyperswitch_connectors | struct_definition | 27 | rust | Globepay | null | null | null | null | null | null | null | null | null | null | null |
pub async fn redis_connection(conf: &Settings) -> redis_interface::RedisConnectionPool {
redis_interface::RedisConnectionPool::new(&conf.redis)
.await
.expect("Failed to create Redis connection Pool")
} | crates/drainer/src/connection.rs | drainer | function_signature | 47 | rust | null | null | null | null | redis_connection | null | null | null | null | null | null | null |
impl Parse for TryGetEnumMeta {
fn parse(input: syn::parse::ParseStream<'_>) -> syn::Result<Self> {
let error_type = input.parse()?;
_ = input.parse::<syn::Token![::]>()?;
let variant = input.parse()?;
Ok(Self {
error_type,
variant,
})
}
} | crates/router_derive/src/macros/try_get_enum.rs | router_derive | impl_block | 75 | rust | null | TryGetEnumMeta | Parse for | impl Parse for for TryGetEnumMeta | null | null | null | null | null | null | null | null |
pub async fn payouts_accounts() -> impl Responder {
let _flow = Flow::PayoutsAccounts;
http_response("accounts")
} | crates/router/src/routes/payouts.rs | router | function_signature | 30 | rust | null | null | null | null | payouts_accounts | null | null | null | null | null | null | null |
File: crates/storage_impl/src/customers.rs
use common_utils::{id_type, pii};
use diesel_models::{customers, kv};
use error_stack::ResultExt;
use futures::future::try_join_all;
use hyperswitch_domain_models::{
behaviour::{Conversion, ReverseConversion},
customer as domain,
merchant_key_store::MerchantKeySto... | crates/storage_impl/src/customers.rs | storage_impl | full_file | 6,897 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/common_utils/src/id_type/client_secret.rs
Public functions: 1
crate::id_type!(
ClientSecretId,
"A type for key_id that can be used for Ephemeral key IDs"
);
crate::impl_id_type_methods!(ClientSecretId, "key_id");
// This is to display the `ClientSecretId` as ClientSecretId(abcd)
crate::impl_debu... | crates/common_utils/src/id_type/client_secret.rs | common_utils | full_file | 284 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/// Retrieves the appropriate Crm client based on the configuration.
pub async fn get_crm_client(&self) -> Arc<dyn CrmInterface> {
match self {
Self::HubspotProxy { hubspot_proxy } => Arc::new(hubspot_proxy.clone()),
Self::NoCrm => Arc::new(NoCrm),
}
} | crates/external_services/src/crm.rs | external_services | function_signature | 75 | rust | null | null | null | null | get_crm_client | null | null | null | null | null | null | null |
pub struct PaymentIncrementalAuthorization; | crates/router/src/core/payments/operations/payments_incremental_authorization.rs | router | struct_definition | 7 | rust | PaymentIncrementalAuthorization | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaypalPaymentsCaptureRequest {
amount: OrderAmount,
final_capture: bool,
} | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | PaypalPaymentsCaptureRequest | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.OrganizationCreateRequest
{
"type": "object",
"required": [
"organization_name"
],
"properties": {
"organization_name": {
"type": "string",
"description": "Name of the organization"
},
"organization_details": {
"type": "object",
"des... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 142 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"OrganizationCreateRequest"
] | null | null | null | null |
impl api::PaymentSession for Zen {} | crates/hyperswitch_connectors/src/connectors/zen.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Zen | api::PaymentSession for | impl api::PaymentSession for for Zen | null | null | null | null | null | null | null | null |
pub async fn get_refunds_filters(state: web::Data<AppState>, req: HttpRequest) -> HttpResponse {
let flow = Flow::RefundsFilters;
Box::pin(api::server_wrap(
flow,
state,
&req,
(),
|state, auth: auth::AuthenticationData, _, _| {
let merchant_context = domain::M... | crates/router/src/routes/refunds.rs | router | function_signature | 190 | rust | null | null | null | null | get_refunds_filters | null | null | null | null | null | null | null |
File: crates/router/src/core/chat.rs
Public functions: 1
use api_models::chat as chat_api;
use common_utils::{
consts,
errors::CustomResult,
request::{Method, RequestBuilder, RequestContent},
};
use error_stack::ResultExt;
use external_services::http_client;
use hyperswitch_domain_models::chat as chat_dom... | crates/router/src/core/chat.rs | router | full_file | 526 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_payment_link_status(
state: SessionState,
merchant_context: domain::MerchantContext,
merchant_id: common_utils::id_type::MerchantId,
payment_id: common_utils::id_type::PaymentId,
) -> RouterResponse<services::PaymentLinkFormData> {
let db = &*state.store;
let key_manager_state =... | crates/router/src/core/payment_link.rs | router | function_signature | 1,361 | rust | null | null | null | null | get_payment_link_status | null | null | null | null | null | null | null |
impl ConnectorCommon for Taxjar {
fn id(&self) -> &'static str {
"taxjar"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Base
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, connectors: &'a ... | crates/hyperswitch_connectors/src/connectors/taxjar.rs | hyperswitch_connectors | impl_block | 395 | rust | null | Taxjar | ConnectorCommon for | impl ConnectorCommon for for Taxjar | null | null | null | null | null | null | null | null |
pub struct MandatePayment {
customer_vault_id: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | MandatePayment | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update_with_attempt_id(
self,
conn: &PgPooledConn,
payment_attempt: PaymentAttemptUpdateInternal,
) -> StorageResult<Self> {
match generics::generic_update_with_unique_predicate_get_result::<
<Self as HasTable>::Table,
_,
_,
... | crates/diesel_models/src/query/payment_attempt.rs | diesel_models | function_signature | 130 | rust | null | null | null | null | update_with_attempt_id | null | null | null | null | null | null | null |
pub struct AuthorizationOptions {
auth_type: Option<String>,
initiator: Option<Initiator>,
} | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | AuthorizationOptions | null | null | null | null | null | null | null | null | null | null | null |
pub struct NetceteraRouterData<T> {
pub amount: i64, // The type of amount that a connector accepts, for example, String, i64, f64, etc.
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs | hyperswitch_connectors | struct_definition | 52 | rust | NetceteraRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub struct KlarnaShippingAddress {
city: String,
country: enums::CountryAlpha2,
email: pii::Email,
given_name: Secret<String>,
family_name: Secret<String>,
phone: Secret<String>,
postal_code: Secret<String>,
region: Secret<String>,
street_address: Secret<String>,
street_address2:... | crates/hyperswitch_connectors/src/connectors/klarna/transformers.rs | hyperswitch_connectors | struct_definition | 79 | rust | KlarnaShippingAddress | null | null | null | null | null | null | null | null | null | null | null |
pub struct OnboardSubAccountRequest {
pub account_id: Secret<String>,
pub client_sub_account_id: Secret<String>,
pub profile: Profile,
} | crates/hyperswitch_connectors/src/connectors/nomupay/transformers.rs | hyperswitch_connectors | struct_definition | 33 | rust | OnboardSubAccountRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct DynamicRoutingVolumeSplitQuery {
pub split: u8,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 16 | rust | DynamicRoutingVolumeSplitQuery | null | null | null | null | 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.