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 DummyConnectorPaymentsRequest<const T: u8> {
amount: MinorUnit,
currency: Currency,
payment_method_data: DummyPaymentMethodData,
return_url: Option<String>,
connector: DummyConnectors,
} | crates/hyperswitch_connectors/src/connectors/dummyconnector/transformers.rs | hyperswitch_connectors | struct_definition | 49 | rust | DummyConnectorPaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundSync for Payload {} | crates/hyperswitch_connectors/src/connectors/payload.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Payload | api::RefundSync for | impl api::RefundSync for for Payload | null | null | null | null | null | null | null | null |
pub async fn resolve_lineage_from_user_role(
state: &SessionState,
user_role: &UserRole,
user_id: &str,
) -> UserResult<LineageContext> {
let org_id = utils::user_role::get_single_org_id(state, user_role).await?;
let merchant_id =
utils::user_role::get_single_merc... | crates/router/src/types/domain/user/decision_manager.rs | router | function_signature | 168 | rust | null | null | null | null | resolve_lineage_from_user_role | null | null | null | null | null | null | null |
/// Get the expiration month from the Google Pay pre-decrypt data
pub fn get_expiry_month(&self) -> Result<Secret<String>, errors::ValidationError> {
let month_str = self.card_exp_month.peek();
let month = month_str
.parse::<u8>()
.map_err(|_| errors::ValidationError::Invalid... | crates/common_types/src/payments.rs | common_types | function_signature | 155 | rust | null | null | null | null | get_expiry_month | null | null | null | null | null | null | null |
impl api::PayoutCreate for Paypal {} | crates/hyperswitch_connectors/src/connectors/paypal.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Paypal | api::PayoutCreate for | impl api::PayoutCreate for for Paypal | null | null | null | null | null | null | null | null |
File: crates/router/src/core/errors/user/sample_data.rs
use api_models::errors::types::{ApiError, ApiErrorResponse};
use common_utils::errors::{CustomResult, ErrorSwitch, ErrorSwitchFrom};
use storage_impl::errors::StorageError;
pub type SampleDataResult<T> = CustomResult<T, SampleDataError>;
#[derive(Debug, Clone, ... | crates/router/src/core/errors/user/sample_data.rs | router | full_file | 385 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn set_dashboard_metadata(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<user_api::dashboard_metadata::SetMetaDataRequest>,
) -> HttpResponse {
let flow = Flow::SetDashboardMetadata;
let mut payload = json_payload.into_inner();
if let Err(e) = ReportSwitchExt::... | crates/router/src/routes/user.rs | router | function_signature | 179 | rust | null | null | null | null | set_dashboard_metadata | null | null | null | null | null | null | null |
File: crates/router/src/compatibility.rs
pub mod stripe;
pub mod wrap;
| crates/router/src/compatibility.rs | router | full_file | 18 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Gpayments {} | crates/hyperswitch_connectors/src/connectors/gpayments.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Gpayments | api::PaymentSync for | impl api::PaymentSync for for Gpayments | null | null | null | null | null | null | null | null |
pub struct DwollaAmount {
pub currency: common_enums::Currency,
pub value: StringMajorUnit,
} | crates/hyperswitch_connectors/src/connectors/dwolla/transformers.rs | hyperswitch_connectors | struct_definition | 25 | rust | DwollaAmount | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Adyen {} | crates/hyperswitch_connectors/src/connectors/adyen.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Adyen | api::PaymentSync for | impl api::PaymentSync for for Adyen | null | null | null | null | null | null | null | null |
pub trait PayoutsInterface {} | crates/hyperswitch_domain_models/src/lib.rs | hyperswitch_domain_models | trait_definition | 7 | rust | null | null | PayoutsInterface | null | null | null | null | null | null | null | null | null |
pub struct Storage<'a> {
/// Hash map to store values.
pub values: HashMap<&'a str, serde_json::Value>,
} | crates/router_env/src/logger/storage.rs | router_env | struct_definition | 31 | rust | Storage | null | null | null | null | null | null | null | null | null | null | null |
pub struct NmiRefundSyncResponse {
transaction: RefundSyncBody,
} | crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | NmiRefundSyncResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn refresh_routing_cache_v1(
state: &SessionState,
key: String,
algorithm_id: &common_utils::id_type::RoutingId,
profile_id: &common_utils::id_type::ProfileId,
) -> RoutingResult<Arc<CachedAlgorithm>> {
let algorithm = {
let algorithm = state
.store
.find_ro... | crates/router/src/core/payments/routing.rs | router | function_signature | 399 | rust | null | null | null | null | refresh_routing_cache_v1 | null | null | null | null | null | null | null |
pub async fn routing_create_config() {} | crates/openapi/src/routes/routing.rs | openapi | function_signature | 8 | rust | null | null | null | null | routing_create_config | null | null | null | null | null | null | null |
pub struct ProcessingInformation {
commerce_indicator: String,
capture: Option<bool>,
payment_solution: Option<String>,
cavv_algorithm: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 33 | rust | ProcessingInformation | null | null | null | null | null | null | null | null | null | null | null |
pub struct ProxyRequestWrapper(pub proxy_api_models::ProxyRequest); | crates/router/src/core/proxy/utils.rs | router | struct_definition | 13 | rust | ProxyRequestWrapper | null | null | null | null | null | null | null | null | null | null | null |
File: crates/external_services/src/file_storage/file_system.rs
//! Module for local file system storage operations
use std::{
fs::{remove_file, File},
io::{Read, Write},
path::PathBuf,
};
use common_utils::errors::CustomResult;
use error_stack::ResultExt;
use crate::file_storage::{FileStorageError, File... | crates/external_services/src/file_storage/file_system.rs | external_services | full_file | 987 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl super::KafkaMessage for KafkaAuthenticationEvent<'_> {
fn key(&self) -> String {
format!(
"{}_{}",
self.merchant_id.get_string_repr(),
self.authentication_id.get_string_repr()
)
}
fn event_type(&self) -> crate::events::EventType {
crate::even... | crates/router/src/services/kafka/authentication_event.rs | router | impl_block | 77 | rust | null | KafkaAuthenticationEvent | super::KafkaMessage for | impl super::KafkaMessage for for KafkaAuthenticationEvent | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/xendit.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use api_models::webhooks::IncomingWebhookEvent;
use base64::Engine;
use common_enums::{enums, CallConnectorAction, CaptureMethod, PaymentAction, PaymentMethodType};
use c... | crates/hyperswitch_connectors/src/connectors/xendit.rs | hyperswitch_connectors | full_file | 8,119 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayoutOutput {
amount_of_money: AmountOfMoney,
} | crates/hyperswitch_connectors/src/connectors/payone/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | PayoutOutput | null | null | null | null | null | null | null | null | null | null | null |
})
}
}
#[cfg(feature = "v2")]
impl transformers::ForeignTryFrom<domain::PaymentMethod> for PaymentMethodResponseItem {
type Error = error_stack::Report<errors::ValidationError>;
fn foreign_try_from(item: domain::PaymentMethod) -> Result<Self, Self::Error> {
// For payment methods that are ... | crates/router/src/core/payment_methods/transformers.rs#chunk1 | router | chunk | 1,571 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/core/disputes.rs
Public functions: 17
use std::{collections::HashMap, ops::Deref, str::FromStr};
use api_models::{
admin::MerchantConnectorInfo, disputes as dispute_models, files as files_api_models,
};
use common_utils::ext_traits::{Encode, ValueExt};
use error_stack::ResultExt;
use rout... | crates/router/src/core/disputes.rs | router | full_file | 8,137 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/analytics/src/payment_intents/metrics/sessionized_metrics/total_smart_retries.rs
use std::collections::HashSet;
use api_models::analytics::{
payment_intents::{
PaymentIntentDimensions, PaymentIntentFilters, PaymentIntentMetricsBucketIdentifier,
},
Granularity, TimeRange,
};
use common... | crates/analytics/src/payment_intents/metrics/sessionized_metrics/total_smart_retries.rs | analytics | full_file | 957 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentCapture for Cryptopay {} | crates/hyperswitch_connectors/src/connectors/cryptopay.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Cryptopay | api::PaymentCapture for | impl api::PaymentCapture for for Cryptopay | null | null | null | null | null | null | null | null |
pub struct ChargeRefunds {
pub charge_id: String,
pub transfer_account_id: String,
pub charge_type: api_models::enums::PaymentChargeType,
pub options: ChargeRefundsOptions,
} | crates/hyperswitch_domain_models/src/router_request_types.rs | hyperswitch_domain_models | struct_definition | 45 | rust | ChargeRefunds | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_encrypted_data<T>(
key_manager_state: &KeyManagerState,
key_store: &domain::MerchantKeyStore,
data: T,
) -> Result<Encryptable<Secret<serde_json::Value>>, error_stack::Report<errors::StorageError>>
where
T: Debug + serde::Serialize,
{
let key = key_store.key.get_inner().peek();
... | crates/router/src/core/payment_methods/cards.rs | router | function_signature | 245 | rust | null | null | null | null | create_encrypted_data | null | null | null | null | null | null | null |
pub struct TrustpayAuthUpdateResponse {
pub access_token: Option<Secret<String>>,
pub token_type: Option<String>,
pub expires_in: Option<i64>,
#[serde(rename = "ResultInfo")]
pub result_info: ResultInfo,
} | crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs | hyperswitch_connectors | struct_definition | 54 | rust | TrustpayAuthUpdateResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct Adyen {
amount_converter: &'static (dyn AmountConvertor<Output = MinorUnit> + Sync),
amount_converter_webhooks: &'static (dyn AmountConvertor<Output = StringMinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/adyen.rs | hyperswitch_connectors | struct_definition | 49 | rust | Adyen | null | null | null | null | null | null | null | null | null | null | null |
pub struct MandateNew {
pub mandate_id: String,
pub customer_id: common_utils::id_type::CustomerId,
pub merchant_id: common_utils::id_type::MerchantId,
pub payment_method_id: String,
pub mandate_status: storage_enums::MandateStatus,
pub mandate_type: storage_enums::MandateType,
pub customer_... | crates/diesel_models/src/mandate.rs | diesel_models | struct_definition | 294 | rust | MandateNew | null | null | null | null | null | null | null | null | null | null | null |
pub struct TsysResponse {
pub status: TsysPaymentStatus,
pub response_code: String,
pub response_message: String,
#[serde(rename = "transactionID")]
pub transaction_id: String,
} | crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs | hyperswitch_connectors | struct_definition | 46 | rust | TsysResponse | null | null | null | null | null | null | null | null | null | null | null |
pub trait Stop {
async fn stop_server(&mut self);
} | crates/router/src/lib.rs | router | trait_definition | 14 | rust | null | null | Stop | null | null | null | null | null | null | null | null | null |
File: crates/router/src/routes/poll.rs
Public functions: 1
use actix_web::{web, HttpRequest, HttpResponse};
use router_env::{instrument, tracing, Flow};
use super::app::AppState;
use crate::{
core::{api_locking, poll},
services::{api, authentication as auth},
types::{api::PollId, domain},
};
#[cfg(featu... | crates/router/src/routes/poll.rs | router | full_file | 391 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorError {
/// fn is_connector_timeout
pub fn is_connector_timeout(&self) -> bool {
self == &Self::RequestTimeoutReceived
}
} | crates/hyperswitch_interfaces/src/errors.rs | hyperswitch_interfaces | impl_block | 36 | rust | null | ConnectorError | null | impl ConnectorError | null | null | null | null | null | null | null | null |
/// Get the inner String
pub fn into_inner(self) -> String {
self.0
} | crates/external_services/src/email.rs | external_services | function_signature | 23 | rust | null | null | null | null | into_inner | null | null | null | null | null | null | null |
impl RequestPaymentMethodTypes {
///Get payment_method_subtype
pub fn get_payment_method_type(&self) -> Option<common_enums::PaymentMethodType> {
Some(self.payment_method_subtype)
}
} | crates/common_types/src/payment_methods.rs | common_types | impl_block | 45 | rust | null | RequestPaymentMethodTypes | null | impl RequestPaymentMethodTypes | null | null | null | null | null | null | null | null |
let redis_conn = state
.store
.get_redis_conn()
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Failed to get redis connection")?;
redis_conn
.serialize_and_set_key_with_expiry(
&self.key_for_to... | crates/router/src/routes/payment_methods.rs#chunk1 | router | chunk | 3,423 | null | null | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v1/gsm/gsm--update.mdx
# Type: Doc File
---
openapi: post /gsm/update
--- | api-reference/v1/gsm/gsm--update.mdx | null | doc_file | 32 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct CreateOrderRequestData {
pub minor_amount: MinorUnit,
pub currency: storage_enums::Currency,
} | crates/hyperswitch_domain_models/src/router_request_types.rs | hyperswitch_domain_models | struct_definition | 26 | rust | CreateOrderRequestData | null | null | null | null | null | null | null | null | null | null | null |
connectors::Coingate,
connectors::Cryptopay,
connectors::Custombilling,
connectors::Datatrans,
connectors::Dlocal,
connectors::Dwolla,
connectors::Ebanx,
connectors::Elavon,
connectors::Facilitapay,
connectors::Fiserv,
connectors::Fiservemea,
connectors::Fiuu,
connect... | crates/hyperswitch_connectors/src/default_implementations.rs#chunk1 | hyperswitch_connectors | chunk | 8,187 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct LineageContext {
/// user_id: String
pub user_id: String,
/// merchant_id: MerchantId
pub merchant_id: id_type::MerchantId,
/// role_id: String
pub role_id: String,
/// org_id: OrganizationId
pub org_id: id_type::OrganizationId,
/// profile_id: ProfileId
pub profil... | crates/common_utils/src/types/user/core.rs | common_utils | struct_definition | 111 | rust | LineageContext | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.MetadataValue
{
"type": "object",
"required": [
"key",
"value"
],
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 70 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"MetadataValue"
] | null | null | null | null |
pub fn should_call_payout_connector_create_customer<'a>(
state: &'a SessionState,
connector: &'a api::ConnectorData,
customer: &'a Option<domain::Customer>,
connector_label: &'a str,
) -> (bool, Option<&'a str>) {
// Check if create customer is required for the connector
match enums::PayoutConne... | crates/router/src/core/payouts/helpers.rs | router | function_signature | 211 | rust | null | null | null | null | should_call_payout_connector_create_customer | null | null | null | null | null | null | null |
File: crates/diesel_models/src/kv.rs
Public functions: 4
Public structs: 12
use error_stack::ResultExt;
use serde::{Deserialize, Serialize};
#[cfg(feature = "v2")]
use crate::payment_attempt::PaymentAttemptUpdateInternal;
#[cfg(feature = "v1")]
use crate::payment_intent::PaymentIntentUpdate;
#[cfg(feature = "v2")]
... | crates/diesel_models/src/kv.rs | diesel_models | full_file | 2,546 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/types.rs
#[cfg(feature = "v2")]
use hyperswitch_domain_models::router_data_v2::RouterDataV2;
#[cfg(feature = "payouts")]
use hyperswitch_domain_models::types::{PayoutsData, PayoutsResponseData};
use hyperswitch_domain_models::{
router_data::{AccessToken, RouterData},
rou... | crates/hyperswitch_connectors/src/types.rs | hyperswitch_connectors | full_file | 1,804 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct NovalnetResponseCard {
pub card_brand: Option<Secret<String>>,
pub card_expiry_month: Secret<u8>,
pub card_expiry_year: Secret<u16>,
pub card_holder: Secret<String>,
pub card_number: Secret<String>,
pub cc_3d: Option<Secret<u8>>,
pub last_four: Option<Secret<String>>,
pub toke... | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | hyperswitch_connectors | struct_definition | 88 | rust | NovalnetResponseCard | null | null | null | null | null | null | null | null | null | null | null |
pub async fn list_payment_method_api() {} | crates/openapi/src/routes/payment_method.rs | openapi | function_signature | 9 | rust | null | null | null | null | list_payment_method_api | null | null | null | null | null | null | null |
pub struct RedisStore {
// Maybe expose the redis_conn via traits instead of the making the field public
pub(crate) redis_conn: Arc<redis_interface::RedisConnectionPool>,
} | crates/storage_impl/src/redis.rs | storage_impl | struct_definition | 39 | rust | RedisStore | null | null | null | null | null | null | null | null | null | null | null |
pub struct AuthEventFilters {
#[serde(default)]
pub authentication_status: Vec<AuthenticationStatus>,
#[serde(default)]
pub trans_status: Vec<TransactionStatus>,
#[serde(default)]
pub authentication_type: Vec<DecoupledAuthenticationType>,
#[serde(default)]
pub error_message: Vec<String>,... | crates/api_models/src/analytics/auth_events.rs | api_models | struct_definition | 385 | rust | AuthEventFilters | null | null | null | null | null | null | null | null | null | null | null |
File: crates/api_models/src/three_ds_decision_rule.rs
Public structs: 7
use euclid::frontend::dir::enums::{
CustomerDeviceDisplaySize, CustomerDevicePlatform, CustomerDeviceType,
};
use utoipa::ToSchema;
/// Represents the payment data used in the 3DS decision rule.
#[derive(Debug, Clone, serde::Serialize, serde... | crates/api_models/src/three_ds_decision_rule.rs | api_models | full_file | 903 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentMethodIntentConfirm {
/// The unique identifier of the customer.
#[schema(value_type = Option<String>, max_length = 64, min_length = 1, example = "cus_y3oqhf46pyzuxjbcn2giaqnb44")]
pub customer_id: Option<id_type::CustomerId>,
/// Payment method data to be passed
pub payment_metho... | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 175 | rust | PaymentMethodIntentConfirm | null | null | null | null | null | null | null | null | null | null | null |
/// Constructs a new SMTP client
pub async fn create(conf: &EmailSettings, smtp_config: SmtpServerConfig) -> Self {
Self {
sender: conf.sender_email.clone(),
smtp_config: smtp_config.clone(),
}
} | crates/external_services/src/email/smtp.rs | external_services | function_signature | 52 | rust | null | null | null | null | create | null | null | null | null | null | null | null |
impl<T: DatabaseStore> RouterStore<T> {
pub async fn from_config(
db_conf: T::Config,
tenant_config: &dyn config::TenantConfig,
encryption_key: StrongSecret<Vec<u8>>,
cache_store: Arc<RedisStore>,
inmemory_cache_stream: &str,
) -> error_stack::Result<Self, StorageError> {... | crates/storage_impl/src/lib.rs | storage_impl | impl_block | 1,197 | rust | null | RouterStore | null | impl RouterStore | null | null | null | null | null | null | null | null |
pub fn mk_crud_locker_request(
locker: &settings::Locker,
path: &str,
req: api::TokenizePayloadEncrypted,
tenant_id: id_type::TenantId,
request_id: Option<RequestId>,
) -> CustomResult<services::Request, errors::VaultError> {
let mut url = locker.basilisk_host.to_owned();
url.push_str(path);... | crates/router/src/core/payment_methods/transformers.rs | router | function_signature | 214 | rust | null | null | null | null | mk_crud_locker_request | null | null | null | null | null | null | null |
pub struct CustomerId {
id: String,
} | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | struct_definition | 11 | rust | CustomerId | null | null | null | null | null | null | null | null | null | null | null |
pub struct JpmorganPaymentMethodType {
card: JpmorganCard,
} | crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | JpmorganPaymentMethodType | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_flow(&self) -> UserFlow {
self.next_flow
} | crates/router/src/types/domain/user/decision_manager.rs | router | function_signature | 18 | rust | null | null | null | null | get_flow | null | null | null | null | null | null | null |
pub async fn check_if_already_exists_in_db(&self, state: SessionState) -> UserResult<()> {
if state
.store
.get_merchant_key_store_by_merchant_id(
&(&state).into(),
&self.get_merchant_id(),
&state.store.get_master_key().to_vec().into(),
... | crates/router/src/types/domain/user.rs | router | function_signature | 125 | rust | null | null | null | null | check_if_already_exists_in_db | null | null | null | null | null | null | null |
pub struct PaymentLinkConfigRequest {
/// custom theme for the payment link
#[schema(value_type = Option<String>, max_length = 255, example = "#4E6ADD")]
pub theme: Option<String>,
/// merchant display logo
#[schema(value_type = Option<String>, max_length = 255, example = "https://i.pinimg.com/736x/... | crates/api_models/src/admin.rs | api_models | struct_definition | 806 | rust | PaymentLinkConfigRequest | null | null | null | null | null | null | null | null | null | null | null |
impl MerchantConnectorValidator {
fn parse_comma_separated_ids(
ids_string: &str,
) -> Result<Vec<common_utils::id_type::MerchantConnectorAccountId>, errors::ApiErrorResponse>
{
// Estimate capacity based on comma count
let capacity = ids_string.matches(',').count() + 1;
let ... | crates/payment_methods/src/core/migration.rs | payment_methods | impl_block | 445 | rust | null | MerchantConnectorValidator | null | impl MerchantConnectorValidator | null | null | null | null | null | null | null | null |
impl Responder {
let flow = AnalyticsFlow::GeneratePaymentReport;
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 | 370 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub async fn check_payout_eligibility(
state: &SessionState,
merchant_context: &domain::MerchantContext,
connector_data: &api::ConnectorData,
payout_data: &mut PayoutData,
) -> RouterResult<()> {
// 1. Form Router data
let router_data = core_utils::construct_payout_router_data(
state,
... | crates/router/src/core/payouts.rs | router | function_signature | 1,091 | rust | null | null | null | null | check_payout_eligibility | null | null | null | null | null | null | null |
pub struct NovalnetErrorResponse {
pub status_code: u64,
pub code: String,
pub message: String,
pub reason: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | hyperswitch_connectors | struct_definition | 36 | rust | NovalnetErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentProcessorTokenStatus {
/// Payment processor token details including card information and token ID
pub payment_processor_token_details: PaymentProcessorTokenDetails,
/// Payment intent ID that originally inserted this token
pub inserted_by_attempt_id: id_type::GlobalAttemptId,
/// ... | crates/router/src/types/storage/revenue_recovery_redis_operation.rs | router | struct_definition | 153 | rust | PaymentProcessorTokenStatus | null | null | null | null | null | null | null | null | null | null | null |
pub struct LatencyAvg {
latency_sum: Option<u64>,
latency_count: u64,
#[serde(with = "common_utils::custom_serde::iso8601::option")]
pub start_bucket: Option<PrimitiveDateTime>,
#[serde(with = "common_utils::custom_serde::iso8601::option")]
pub end_bucket: Option<PrimitiveDateTime>,
} | crates/analytics/src/api_event/metrics/latency.rs | analytics | struct_definition | 86 | rust | LatencyAvg | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Airwallex {} | crates/hyperswitch_connectors/src/connectors/airwallex.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Airwallex | api::RefundExecute for | impl api::RefundExecute for for Airwallex | null | null | null | null | null | null | null | null |
pub card_migrated: Option<bool>,
pub network_token_migrated: Option<bool>,
pub connector_mandate_details_migrated: Option<bool>,
pub network_transaction_id_migrated: Option<bool>,
}
#[derive(Debug, Default, serde::Serialize)]
pub enum MigrationStatus {
Success,
#[default]
Failed,
}
#[deriv... | crates/api_models/src/payment_methods.rs#chunk3 | api_models | chunk | 4,683 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_task(
db: &dyn ProcessTrackerInterface,
process_tracker_entry: storage::ProcessTrackerNew,
) -> CustomResult<(), storage_impl::errors::StorageError> {
db.insert_process(process_tracker_entry).await?;
Ok(())
} | crates/scheduler/src/consumer.rs | scheduler | function_signature | 54 | rust | null | null | null | null | create_task | null | null | null | null | null | null | null |
pub struct MerchantConnectorUpdate {
/// 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,
/// This is an unique label you can generate ... | crates/api_models/src/admin.rs | api_models | struct_definition | 774 | rust | MerchantConnectorUpdate | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_gsm_rule(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<gsm_api_types::GsmRetrieveRequest>,
) -> impl Responder {
let gsm_retrieve_req = json_payload.into_inner();
let flow = Flow::GsmRuleRetrieve;
Box::pin(api::server_wrap(
flow,
state.cl... | crates/router/src/routes/gsm.rs | router | function_signature | 148 | rust | null | null | null | null | get_gsm_rule | null | null | null | null | null | null | null |
pub async fn delete_entry_from_blocklist(
state: &SessionState,
merchant_id: &common_utils::id_type::MerchantId,
request: api_blocklist::DeleteFromBlocklistRequest,
) -> RouterResult<api_blocklist::DeleteFromBlocklistResponse> {
let blocklist_entry = match request {
api_blocklist::DeleteFromBloc... | crates/router/src/core/blocklist/utils.rs | router | function_signature | 241 | rust | null | null | null | null | delete_entry_from_blocklist | null | null | null | null | null | null | null |
/// validates the file upload
pub fn validate_file_upload(
&self,
purpose: api::files::FilePurpose,
file_size: i32,
file_type: mime::Mime,
) -> CustomResult<(), errors::ConnectorError> {
match self {
Self::Old(connector) => connector.validate_file_upload(purpo... | crates/hyperswitch_interfaces/src/connector_integration_interface.rs | hyperswitch_interfaces | function_signature | 112 | rust | null | null | null | null | validate_file_upload | null | null | null | null | null | null | null |
pub struct BankOfAmericaAuthType {
pub(super) api_key: Secret<String>,
pub(super) merchant_account: Secret<String>,
pub(super) api_secret: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 39 | rust | BankOfAmericaAuthType | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v2/payment-method-session/payment-method-session--delete-a-saved-payment-method.mdx
# Type: Doc File
---
openapi: delete /v2/payment-method-sessions/{id}
---
| api-reference/v2/payment-method-session/payment-method-session--delete-a-saved-payment-method.mdx | null | doc_file | 44 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/core/payments/operations/external_vault_proxy_payment_intent.rs
Public structs: 1
use api_models::payments::ExternalVaultProxyPaymentsRequest;
use async_trait::async_trait;
use common_enums::enums;
use common_utils::{
crypto::Encryptable,
ext_traits::{AsyncExt, ValueExt},
types::ke... | crates/router/src/core/payments/operations/external_vault_proxy_payment_intent.rs | router | full_file | 4,723 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaypalCardWebhooks {
pub supplementary_data: PaypalSupplementaryData,
pub amount: OrderAmount,
pub invoice_id: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | struct_definition | 33 | rust | PaypalCardWebhooks | null | null | null | null | null | null | null | null | null | null | null |
pub struct NoonApplePayTokenData {
token: NoonApplePayData,
} | crates/hyperswitch_connectors/src/connectors/noon/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | NoonApplePayTokenData | null | null | null | null | null | null | null | null | null | null | null |
pub struct NmiSyncRequest {
pub order_id: String,
pub security_key: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/nmi/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | NmiSyncRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn api_key_retrieve(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<common_utils::id_type::ApiKeyId>,
) -> impl Responder {
let flow = Flow::ApiKeyRetrieve;
let key_id = path.into_inner();
api::server_wrap(
flow,
state,
&req,
&key_id,
... | crates/router/src/routes/api_keys.rs | router | function_signature | 205 | rust | null | null | null | null | api_key_retrieve | null | null | null | null | null | null | null |
pub fn get_incoming_webhook_event(
status: WebhookEventType,
transaction_status: NovalnetTransactionStatus,
) -> IncomingWebhookEvent {
match status {
WebhookEventType::Payment => match transaction_status {
NovalnetTransactionStatus::Confirmed | NovalnetTransactionStatus::Success => {
... | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | hyperswitch_connectors | function_signature | 349 | rust | null | null | null | null | get_incoming_webhook_event | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.GsmFeatureData
{
"oneOf": [
{
"type": "object",
"required": [
"retry"
],
"properties": {
"retry": {
"$ref": "#/components/schemas/RetryFeatureData"
}
}
}
],
"description": "Contains the data relevant to ... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 117 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"GsmFeatureData"
] | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/amazonpay/transformers.rs
Public structs: 27
use std::collections::HashMap;
use common_enums::{enums, CaptureMethod};
use common_utils::{errors::CustomResult, pii, types::StringMajorUnit};
use hyperswitch_domain_models::{
router_data::{ConnectorAuthType, ErrorRe... | crates/hyperswitch_connectors/src/connectors/amazonpay/transformers.rs | hyperswitch_connectors | full_file | 4,452 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayoutsMandateReferenceRecord {
pub transfer_method_id: Option<String>,
} | crates/hyperswitch_domain_models/src/mandates.rs | hyperswitch_domain_models | struct_definition | 21 | rust | PayoutsMandateReferenceRecord | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update_retrieve_payout_tracker<F, T>(
state: &SessionState,
merchant_context: &domain::MerchantContext,
payout_data: &mut PayoutData,
payout_router_data: &types::RouterData<F, T, types::PayoutsResponseData>,
) -> RouterResult<()> {
let db = &*state.store;
match payout_router_data.re... | crates/router/src/core/payouts.rs | router | function_signature | 752 | rust | null | null | null | null | update_retrieve_payout_tracker | null | null | null | null | null | null | null |
pub async fn get_token_from_tokenization_service(
state: &routes::SessionState,
network_token_requestor_ref_id: String,
pm_data: &domain::PaymentMethod,
) -> errors::RouterResult<domain::NetworkTokenData> {
let token_response =
if let Some(network_tokenization_service) = &state.conf.network_toke... | crates/router/src/core/payment_methods/network_tokenization.rs | router | function_signature | 587 | rust | null | null | null | null | get_token_from_tokenization_service | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PaymentMethodDataRequest
{
"allOf": [
{
"allOf": [
{
"$ref": "#/components/schemas/PaymentMethodData"
}
],
"nullable": true
},
{
"type": "object",
"properties": {
"billing": {
"allOf": [
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 129 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PaymentMethodDataRequest"
] | null | null | null | null |
pub struct RefundMetricRow {
pub currency: Option<DBEnumWrapper<storage_enums::Currency>>,
pub refund_status: Option<DBEnumWrapper<storage_enums::RefundStatus>>,
pub connector: Option<String>,
pub refund_type: Option<DBEnumWrapper<RefundType>>,
pub profile_id: Option<String>,
pub refund_reason: ... | crates/analytics/src/refunds/metrics.rs | analytics | struct_definition | 172 | rust | RefundMetricRow | null | null | null | null | null | null | null | null | null | null | null |
pub struct FacilitapayWebhookBody {
#[serde(rename = "type")]
pub event_type: FacilitapayWebhookEventType,
pub secret: Secret<String>,
#[serde(flatten)]
pub data: FacilitapayWebhookData,
} | crates/hyperswitch_connectors/src/connectors/facilitapay/responses.rs | hyperswitch_connectors | struct_definition | 57 | rust | FacilitapayWebhookBody | null | null | null | null | null | null | null | null | null | null | null |
pub fn new(
additional_payment_method_data: Option<AdditionalPaymentMethodConnectorResponse>,
extended_authorization_response_data: Option<ExtendedAuthorizationResponseData>,
) -> Self {
Self {
additional_payment_method_data,
extended_authorization_response_data,
... | crates/hyperswitch_domain_models/src/router_data.rs | hyperswitch_domain_models | function_signature | 57 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
/// Creates a new `ConnectorCustomerMap` from a HashMap
pub fn new(
map: std::collections::HashMap<common_utils::id_type::MerchantConnectorAccountId, String>,
) -> Self {
Self(map)
} | crates/common_types/src/customers.rs | common_types | function_signature | 50 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
File: crates/router/src/core/payments/operations/payments_incremental_authorization.rs
Public structs: 1
use std::marker::PhantomData;
use api_models::{enums::FrmSuggestion, payments::PaymentsIncrementalAuthorizationRequest};
use async_trait::async_trait;
use common_utils::errors::CustomResult;
use diesel_models::au... | crates/router/src/core/payments/operations/payments_incremental_authorization.rs | router | full_file | 2,759 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn table<'a>(&self) -> &'a str {
match self {
Self::Insert { insertable } => match **insertable {
Insertable::PaymentIntent(_) => "payment_intent",
Insertable::PaymentAttempt(_) => "payment_attempt",
Insertable::Refund(_) => "refund",
... | crates/diesel_models/src/kv.rs | diesel_models | function_signature | 290 | rust | null | null | null | null | table | null | null | null | null | null | null | null |
impl Nuvei {
pub fn new() -> &'static Self {
&Self {
amount_convertor: &StringMajorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/nuvei.rs | hyperswitch_connectors | impl_block | 36 | rust | null | Nuvei | null | impl Nuvei | null | null | null | null | null | null | null | null |
pub struct PaymentMethodUpdateInternal {
payment_method_data: Option<Encryption>,
last_used_at: Option<PrimitiveDateTime>,
network_transaction_id: Option<String>,
status: Option<storage_enums::PaymentMethodStatus>,
locker_id: Option<String>,
payment_method_type_v2: Option<storage_enums::PaymentM... | crates/diesel_models/src/payment_method.rs | diesel_models | struct_definition | 174 | rust | PaymentMethodUpdateInternal | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.SupportedPaymentMethod
{
"allOf": [
{
"allOf": [
{
"$ref": "#/components/schemas/PaymentMethodSpecificFeatures"
}
],
"nullable": true
},
{
"type": "object",
"required": [
"payment_method",
"payme... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 424 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"SupportedPaymentMethod"
] | null | null | null | null |
File: crates/router/src/types/storage/fraud_check.rs
pub use diesel_models::fraud_check::{
FraudCheck, FraudCheckNew, FraudCheckUpdate, FraudCheckUpdateInternal,
};
| crates/router/src/types/storage/fraud_check.rs | router | full_file | 39 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_lineage_for_user_id_and_entity_for_accepting_invite(
state: &SessionState,
user_id: &str,
tenant_id: &id_type::TenantId,
entity_id: String,
entity_type: EntityType,
) -> UserResult<
Option<(
id_type::OrganizationId,
Option<id_type::MerchantId>,
Option<id_... | crates/router/src/utils/user_role.rs | router | function_signature | 958 | rust | null | null | null | null | get_lineage_for_user_id_and_entity_for_accepting_invite | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.XenditSplitRequest
{
"oneOf": [
{
"type": "object",
"required": [
"multiple_splits"
],
"properties": {
"multiple_splits": {
"$ref": "#/components/schemas/XenditMultipleSplitRequest"
}
}
},
{
"type"... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 144 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"XenditSplitRequest"
] | null | null | null | null |
/// returns amount_captured and minor_amount_capturable
pub fn get_amount_captured(
&self,
) -> Result<(Option<i64>, Option<MinorUnit>), error_stack::Report<errors::ConnectorError>> {
match &self.partial_approval {
Some(partial_approval) => {
let amount = utils::conve... | crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs | hyperswitch_connectors | function_signature | 296 | rust | null | null | null | null | get_amount_captured | 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.