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 GiropayBankRedirectAdditionalData {
#[schema(value_type = Option<String>)]
/// Masked bank account bic code
pub bic: Option<MaskedSortCode>,
/// Partially masked international bank account number (iban) for SEPA
#[schema(value_type = Option<String>)]
pub iban: Option<MaskedIban>,
... | crates/api_models/src/payments/additional_info.rs | api_models | struct_definition | 119 | rust | GiropayBankRedirectAdditionalData | null | null | null | null | null | null | null | null | null | null | null |
pub trait SerializableSecret: Serialize {} | crates/masking/src/serde.rs | masking | trait_definition | 7 | rust | null | null | SerializableSecret | null | null | null | null | null | null | null | null | null |
pub struct CybersourcePaymentsResponse {
id: String,
status: Option<CybersourcePaymentStatus>,
client_reference_information: Option<ClientReferenceInformation>,
processor_information: Option<ClientProcessorInformation>,
risk_information: Option<ClientRiskInformation>,
token_information: Option<C... | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 77 | rust | CybersourcePaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct HelcimRefundRequest {
amount: FloatMajorUnit,
original_transaction_id: u64,
ip_address: Secret<String, IpAddress>,
#[serde(skip_serializing_if = "Option::is_none")]
ecommerce: Option<bool>,
} | crates/hyperswitch_connectors/src/connectors/helcim/transformers.rs | hyperswitch_connectors | struct_definition | 56 | rust | HelcimRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/iatapay.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use api_models::{enums, webhooks::IncomingWebhookEvent};
use base64::Engine;
use common_utils::{
consts::BASE64_ENGINE,
crypto,
errors::CustomResult,
ext_traits::{ByteSliceExt, B... | crates/hyperswitch_connectors/src/connectors/iatapay.rs | hyperswitch_connectors | full_file | 6,920 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Moneris {} | crates/hyperswitch_connectors/src/connectors/moneris.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Moneris | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Moneris | null | null | null | null | null | null | null | null |
pub async fn get_api_event_filter_for_dimension<T>(
dimension: ApiEventDimensions,
merchant_id: &common_utils::id_type::MerchantId,
time_range: &TimeRange,
pool: &T,
) -> FiltersResult<Vec<ApiEventFilter>>
where
T: AnalyticsDataSource + ApiEventFilterAnalytics,
PrimitiveDateTime: ToSql<T>,
A... | crates/analytics/src/api_event/filters.rs | analytics | function_signature | 254 | rust | null | null | null | null | get_api_event_filter_for_dimension | null | null | null | null | null | null | null |
impl PaymentMethodsData {
#[cfg(feature = "v1")]
pub fn get_co_badged_card_data(&self) -> Option<payment_methods::CoBadgedCardData> {
if let Self::Card(card) = self {
card.co_badged_card_data.clone()
} else {
None
}
}
#[cfg(feature = "v2")]
pub fn get_... | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | impl_block | 111 | rust | null | PaymentMethodsData | null | impl PaymentMethodsData | null | null | null | null | null | null | null | null |
pub struct CardDetailsAssigned; | crates/router/src/core/payment_methods/tokenize/card_executor.rs | router | struct_definition | 6 | rust | CardDetailsAssigned | null | null | null | null | null | null | null | null | null | null | null |
Web Documentation: Analytics & operations | Hyperswitch
# Type: Web Doc
Payment Analytics
Typical payment conversion funnel of a user through Hyperswitch involves five stages as shown below.
Understanding the payment conversion funnel
Lets take a scenario where you website had initiated 100,000 payments with Hyperswit... | https://docs.hyperswitch.io/explore-hyperswitch/account-management/analytics-and-operations | null | web_doc_file | 1,276 | doc | null | null | null | null | null | web | null | null | null | https://docs.hyperswitch.io/explore-hyperswitch/account-management/analytics-and-operations | Analytics & operations | Hyperswitch | null |
pub struct AlwaysRequestExtendedAuthorization(bool); | crates/common_utils/src/types/primitive_wrappers.rs | common_utils | struct_definition | 8 | rust | AlwaysRequestExtendedAuthorization | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::PaymentsFilters;
Box::pin(api::server_wrap(
flow,
state,
&req,
(),
|state, auth: auth::AuthenticationData, _, _| {
let merchant_context = domain::MerchantContext::NormalMerchant(Box::new(
domain::Context(auth.m... | crates/router/src/routes/payments.rs | router | impl_block | 131 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub struct UasConfirmationRequestData {
pub x_src_flow_id: Option<String>,
pub transaction_amount: MinorUnit,
pub transaction_currency: common_enums::Currency,
// Type of event associated with the checkout. Valid values are: - 01 - Authorise - 02 - Capture - 03 - Refund - 04 - Cancel - 05 - Fraud - 06 -... | crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs | hyperswitch_domain_models | struct_definition | 240 | rust | UasConfirmationRequestData | null | null | null | null | null | null | null | null | null | null | null |
pub struct XenditWebhookEvent {
pub event: XenditEventType,
pub data: EventDetails,
} | crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | XenditWebhookEvent | null | null | null | null | null | null | null | null | null | null | null |
pub struct DrainerSettings {
pub stream_name: String,
pub num_partitions: u8,
pub max_read_count: u64,
pub shutdown_interval: u32, // in milliseconds
pub loop_interval: u32, // in milliseconds
} | crates/scheduler/src/settings.rs | scheduler | struct_definition | 59 | rust | DrainerSettings | null | null | null | null | null | null | null | null | null | null | null |
pub struct BitpayPaymentsResponse {
data: BitpayPaymentResponseData,
facade: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/bitpay/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | BitpayPaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub fn apply_changeset(self, source: Capture) -> Capture {
let CaptureUpdateInternal {
status,
error_message,
error_code,
error_reason,
modified_at: _,
connector_capture_id,
connector_response_reference_id,
processor... | crates/diesel_models/src/capture.rs | diesel_models | function_signature | 176 | rust | null | null | null | null | apply_changeset | null | null | null | null | null | null | null |
| WalletData::GooglePayThirdPartySdk(_)
| WalletData::MbWayRedirect(_)
| WalletData::MobilePayRedirect(_)
| WalletData::PaypalRedirect(_)
| WalletData::PaypalSdk(_)
| WalletDat... | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs#chunk1 | hyperswitch_connectors | chunk | 8,191 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct BankAccountCredentialsResponse {
pub credentials: Vec<BankAccountDetails>,
} | crates/pm_auth/src/types.rs | pm_auth | struct_definition | 18 | rust | BankAccountCredentialsResponse | null | null | null | null | null | null | null | null | null | null | null |
impl super::payment_intents::filters::PaymentIntentFilterAnalytics for SqlxClient {} | crates/analytics/src/sqlx.rs | analytics | impl_block | 18 | rust | null | SqlxClient | super::payment_intents::filters::PaymentIntentFilterAnalytics for | impl super::payment_intents::filters::PaymentIntentFilterAnalytics for for SqlxClient | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Trustpay {
fn id(&self) -> &'static str {
"trustpay"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Base
}
fn common_get_content_type(&self) -> &'static str {
"application/x-www-form-urlencoded"
}
fn base_url<'a>(&s... | crates/hyperswitch_connectors/src/connectors/trustpay.rs | hyperswitch_connectors | impl_block | 679 | rust | null | Trustpay | ConnectorCommon for | impl ConnectorCommon for for Trustpay | null | null | null | null | null | null | null | null |
pub async fn find_by_merchant_id_idempotent_event_id(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
idempotent_event_id: &str,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
conn,
dsl::merchant... | crates/diesel_models/src/query/events.rs | diesel_models | function_signature | 120 | rust | null | null | null | null | find_by_merchant_id_idempotent_event_id | null | null | null | null | null | null | null |
pub fn is_network_transaction_id_and_card_details_flow(self) -> bool {
matches!(self, Self::NetworkTransactionIdAndCardDetails(_))
} | crates/api_models/src/mandates.rs | api_models | function_signature | 32 | rust | null | null | null | null | is_network_transaction_id_and_card_details_flow | null | null | null | null | null | null | null |
pub struct Mpgs {
amount_converter: &'static (dyn AmountConvertor<Output = StringMinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/mpgs.rs | hyperswitch_connectors | struct_definition | 28 | rust | Mpgs | null | null | null | null | null | null | null | null | null | null | null |
pub struct DeleteTokenizeByDateRequest {
pub buffer_minutes: i32,
pub service_name: String,
pub max_rows: i32,
} | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 35 | rust | DeleteTokenizeByDateRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/payload/responses.rs
Public structs: 7
use masking::Secret;
use serde::{Deserialize, Serialize};
// PaymentsResponse
#[derive(Default, Debug, Clone, Copy, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "lowercase")]
pub enum PayloadPaymentStatus {
Auth... | crates/hyperswitch_connectors/src/connectors/payload/responses.rs | hyperswitch_connectors | full_file | 1,009 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct RelayRefundData {
pub amount: MinorUnit,
pub currency: enums::Currency,
pub reason: Option<String>,
} | crates/hyperswitch_domain_models/src/relay.rs | hyperswitch_domain_models | struct_definition | 30 | rust | RelayRefundData | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentCapture for Stripebilling {} | crates/hyperswitch_connectors/src/connectors/stripebilling.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Stripebilling | api::PaymentCapture for | impl api::PaymentCapture for for Stripebilling | null | null | null | null | null | null | null | null |
impl ConnectorValidation for Amazonpay {} | crates/hyperswitch_connectors/src/connectors/amazonpay.rs | hyperswitch_connectors | impl_block | 7 | rust | null | Amazonpay | ConnectorValidation for | impl ConnectorValidation for for Amazonpay | null | null | null | null | null | null | null | null |
impl api::revenue_recovery::RevenueRecoveryRecordBack for Stripebilling {} | crates/hyperswitch_connectors/src/connectors/stripebilling.rs | hyperswitch_connectors | impl_block | 16 | rust | null | Stripebilling | api::revenue_recovery::RevenueRecoveryRecordBack for | impl api::revenue_recovery::RevenueRecoveryRecordBack for for Stripebilling | null | null | null | null | null | null | null | null |
pub async fn trigger_refund_to_gateway(
state: &SessionState,
refund: &diesel_refund::Refund,
merchant_context: &domain::MerchantContext,
payment_attempt: &storage::PaymentAttempt,
payment_intent: &storage::PaymentIntent,
) -> errors::RouterResult<diesel_refund::Refund> {
let db = &*state.store;... | crates/router/src/core/refunds_v2.rs | router | function_signature | 662 | rust | null | null | null | null | trigger_refund_to_gateway | null | null | null | null | null | null | null |
impl api::RefundExecute for Deutschebank {} | crates/hyperswitch_connectors/src/connectors/deutschebank.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Deutschebank | api::RefundExecute for | impl api::RefundExecute for for Deutschebank | null | null | null | null | null | null | null | null |
pub struct MerchantAccountUpdateInternal {
pub merchant_name: Option<Encryption>,
pub merchant_details: Option<Encryption>,
pub return_url: Option<String>,
pub webhook_details: Option<crate::business_profile::WebhookDetails>,
pub sub_merchants_enabled: Option<bool>,
pub parent_merchant_id: Optio... | crates/diesel_models/src/merchant_account.rs | diesel_models | struct_definition | 340 | rust | MerchantAccountUpdateInternal | null | null | null | null | null | null | null | null | null | null | null |
pub async fn dummy_connector_payment(
state: web::Data<app::AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<types::DummyConnectorPaymentRequest>,
) -> impl actix_web::Responder {
let payload = json_payload.into_inner();
let flow = types::Flow::DummyPaymentCreate;
Box::pin(api::se... | crates/router/src/routes/dummy_connector.rs | router | function_signature | 136 | rust | null | null | null | null | dummy_connector_payment | null | null | null | null | null | null | null |
Documentation: api-reference/v1/refunds/refunds--update.mdx
# Type: Doc File
---
openapi: post /refunds/{refund_id}
--- | api-reference/v1/refunds/refunds--update.mdx | null | doc_file | 34 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct MandateUpdateMems {
pub orig: Mandate,
pub update_data: MandateUpdateInternal,
} | crates/diesel_models/src/kv.rs | diesel_models | struct_definition | 26 | rust | MandateUpdateMems | null | null | null | null | null | null | null | null | null | null | null |
pub struct ToggleDynamicRoutingQuery {
pub enable: DynamicRoutingFeatures,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 16 | rust | ToggleDynamicRoutingQuery | null | null | null | null | null | null | null | null | null | null | null |
pub fn generate_new() -> Self {
let mut rand = rand::thread_rng();
let recovery_codes = (0..consts::user::RECOVERY_CODES_COUNT)
.map(|_| {
let code_part_1 =
Alphanumeric.sample_string(&mut rand, consts::user::RECOVERY_CODE_LENGTH / 2);
let ... | crates/router/src/types/domain/user.rs | router | function_signature | 131 | rust | null | null | null | null | generate_new | null | null | null | null | null | null | null |
File: connector-template/transformers.rs
Public structs: 1
use common_enums::enums;
use serde::{Deserialize, Serialize};
use masking::Secret;
use common_utils::types::{StringMinorUnit};
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{ConnectorAuthType, RouterData},
r... | connector-template/transformers.rs | connector-template | full_file | 1,873 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Authipay {} | crates/hyperswitch_connectors/src/connectors/authipay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Authipay | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Authipay | null | null | null | null | null | null | null | null |
pub async fn update_by_merchant_id_payout_attempt_id(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
payout_attempt_id: &str,
payout: PayoutAttemptUpdate,
) -> StorageResult<Self> {
generics::generic_update_with_results::<<Self as HasTable>::Table, _, _... | crates/diesel_models/src/query/payout_attempt.rs | diesel_models | function_signature | 171 | rust | null | null | null | null | update_by_merchant_id_payout_attempt_id | null | null | null | null | null | null | null |
/// Get the org_id from the lineage
pub fn org_id(&self) -> Option<&id_type::OrganizationId> {
match self {
Self::Tenant { .. } => None,
Self::Organization { org_id, .. }
| Self::Merchant { org_id, .. }
| Self::Profile { org_id, .. } => Some(org_id),
}... | crates/common_utils/src/types/user/theme.rs | common_utils | function_signature | 82 | rust | null | null | null | null | org_id | null | null | null | null | null | null | null |
impl api::RefundExecute for Razorpay {} | crates/hyperswitch_connectors/src/connectors/razorpay.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Razorpay | api::RefundExecute for | impl api::RefundExecute for for Razorpay | null | null | null | null | null | null | null | null |
impl GetLockingInput for FPaymentsApproveRequest<'_> {
fn get_locking_input<F>(&self, flow: F) -> api_locking::LockAction
where
F: types::FlowMetric,
lock_utils::ApiIdentifier: From<F>,
{
api_locking::LockAction::Hold {
input: api_locking::LockingInput {
u... | crates/router/src/routes/payments.rs | router | impl_block | 126 | rust | null | FPaymentsApproveRequest | GetLockingInput for | impl GetLockingInput for for FPaymentsApproveRequest | null | null | null | null | null | null | null | null |
pub struct HyperwalletRefundRequest {
pub amount: StringMinorUnit,
} | crates/hyperswitch_connectors/src/connectors/hyperwallet/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | HyperwalletRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/sift.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use common_enums::enums;
use common_utils::{
errors::CustomResult,
ext_traits::BytesExt,
request::{Method, Request, RequestBuilder, RequestContent},
types:... | crates/hyperswitch_connectors/src/connectors/sift.rs | hyperswitch_connectors | full_file | 4,694 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl Deref for ShouldCollectCvvDuringPayment {
type Target = bool;
fn deref(&self) -> &Self::Target {
&self.0
}
} | crates/common_types/src/primitive_wrappers.rs | common_types | impl_block | 40 | rust | null | ShouldCollectCvvDuringPayment | Deref for | impl Deref for for ShouldCollectCvvDuringPayment | null | null | null | null | null | null | null | null |
pub struct BlocklistNew {
pub merchant_id: common_utils::id_type::MerchantId,
pub fingerprint_id: String,
pub data_kind: common_enums::BlocklistDataKind,
pub metadata: Option<serde_json::Value>,
pub created_at: time::PrimitiveDateTime,
} | crates/diesel_models/src/blocklist.rs | diesel_models | struct_definition | 63 | rust | BlocklistNew | null | null | null | null | null | null | null | null | null | null | null |
pub struct DeleteTokenDataRequest {
/// Customer ID for which the tokenization is requested
#[schema(value_type = String, example = "12345_cus_01926c58bc6e77c09e809964e72af8c8")]
pub customer_id: id_type::GlobalCustomerId,
/// Session ID associated with the tokenization request
#[schema(value_type =... | crates/api_models/src/tokenization.rs | api_models | struct_definition | 156 | rust | DeleteTokenDataRequest | null | null | null | null | null | null | null | null | null | null | null |
/// Get string representation of the id
pub fn get_string_repr(&self) -> &str {
self.0.get_string_repr()
} | crates/common_utils/src/id_type/global_id/token.rs | common_utils | function_signature | 31 | rust | null | null | null | null | get_string_repr | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.CardNetwork
{
"type": "string",
"description": "Indicates the card network.",
"enum": [
"Visa",
"Mastercard",
"AmericanExpress",
"JCB",
"DinersClub",
"Discover",
"CartesBancaires",
"UnionPay",
"Interac",
"RuPay",
"Maestro",
"St... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 115 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CardNetwork"
] | null | null | null | null |
File: crates/analytics/src/disputes/metrics/dispute_status_metric.rs
use std::collections::HashSet;
use api_models::analytics::{
disputes::{DisputeDimensions, DisputeFilters, DisputeMetricsBucketIdentifier},
Granularity, TimeRange,
};
use common_utils::errors::ReportSwitchExt;
use error_stack::ResultExt;
use ... | crates/analytics/src/disputes/metrics/dispute_status_metric.rs | analytics | full_file | 844 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct VersionData {
#[serde(rename = "@Ds_Version")]
ds_version: String,
#[serde(rename = "Message")]
message: Message,
} | crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs | hyperswitch_connectors | struct_definition | 34 | rust | VersionData | null | null | null | null | null | null | null | null | null | null | null |
pub struct GooglePayTokenPaymentInformation {
fluid_data: FluidData,
tokenized_card: GooglePayTokenizedCard,
} | crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs | hyperswitch_connectors | struct_definition | 27 | rust | GooglePayTokenPaymentInformation | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Airwallex {} | crates/hyperswitch_connectors/src/connectors/airwallex.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Airwallex | api::PaymentVoid for | impl api::PaymentVoid for for Airwallex | null | null | null | null | null | null | null | null |
impl api::PaymentCapture for Xendit {} | crates/hyperswitch_connectors/src/connectors/xendit.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Xendit | api::PaymentCapture for | impl api::PaymentCapture for for Xendit | null | null | null | null | null | null | null | null |
File: crates/router/src/core/payments/flows/psync_flow.rs
use std::{collections::HashMap, str::FromStr};
use async_trait::async_trait;
use error_stack::ResultExt;
use masking::Secret;
use unified_connector_service_client::payments as payments_grpc;
use super::{ConstructFlowSpecificData, Feature};
use crate::{
co... | crates/router/src/core/payments/flows/psync_flow.rs | router | full_file | 2,853 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl<'a> CardInfoMigrateExecutor<'a> {
fn new(
state: &'a routes::SessionState,
record: &'a cards_info_api_types::CardInfoUpdateRequest,
) -> Self {
Self { state, record }
}
async fn fetch_card_info(&self) -> RouterResult<Option<card_info_models::CardInfo>> {
let db = se... | crates/router/src/core/cards_info.rs | router | impl_block | 483 | rust | null | CardInfoMigrateExecutor | null | impl CardInfoMigrateExecutor | null | null | null | null | null | null | null | null |
pub struct ApplePayCertificatesMigrationRequest {
pub merchant_ids: Vec<common_utils::id_type::MerchantId>,
} | crates/api_models/src/apple_pay_certificates_migration.rs | api_models | struct_definition | 25 | rust | ApplePayCertificatesMigrationRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct Worldpayvantiv {
amount_converter: &'static (dyn AmountConvertor<Output = MinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs | hyperswitch_connectors | struct_definition | 28 | rust | Worldpayvantiv | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Worldline {} | crates/hyperswitch_connectors/src/connectors/worldline.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Worldline | api::RefundExecute for | impl api::RefundExecute for for Worldline | null | null | null | null | null | null | null | null |
pub trait ActivePaymentsMetric<T>
where
T: AnalyticsDataSource + ActivePaymentsMetricAnalytics,
{
async fn load_metrics(
&self,
merchant_id: &common_utils::id_type::MerchantId,
publishable_key: &str,
time_range: &TimeRange,
pool: &T,
) -> MetricsResult<
HashSe... | crates/analytics/src/active_payments/metrics.rs | analytics | trait_definition | 97 | rust | null | null | ActivePaymentsMetric | null | null | null | null | null | null | null | null | null |
/// Trait representing the connector integration interface
///
/// This trait defines the methods required for a connector integration interface.
pub trait ConnectorIntegrationInterface<F, ResourceCommonData, Req, Resp>: Send + Sync {
/// Clone the connector integration interface
///
/// # Returns
///
... | crates/hyperswitch_interfaces/src/connector_integration_interface.rs | hyperswitch_interfaces | trait_definition | 571 | rust | null | null | ConnectorIntegrationInterface | null | null | null | null | null | null | null | null | null |
pub(crate) fn generate_event_id() -> String {
common_utils::generate_time_ordered_id("evt")
} | crates/router/src/core/webhooks/utils.rs | router | function_signature | 23 | rust | null | null | null | null | generate_event_id | null | null | null | null | null | null | null |
impl MerchantAccountNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<MerchantAccount> {
generics::generic_insert(conn, self).await
}
} | crates/diesel_models/src/query/merchant_account.rs | diesel_models | impl_block | 42 | rust | null | MerchantAccountNew | null | impl MerchantAccountNew | null | null | null | null | null | null | null | null |
pub struct ConnectorOnboarding; | crates/router/src/routes/app.rs | router | struct_definition | 6 | rust | ConnectorOnboarding | null | null | null | null | null | null | null | null | null | null | null |
pub struct DigitalvirgoConsentStatus {
required: Option<bool>,
} | crates/hyperswitch_connectors/src/connectors/digitalvirgo/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | DigitalvirgoConsentStatus | null | null | null | null | null | null | null | null | null | null | null |
pub struct RefundDistributionRow {
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 total: Op... | crates/analytics/src/refunds/distribution.rs | analytics | struct_definition | 172 | rust | RefundDistributionRow | null | null | null | null | null | null | null | null | null | null | null |
pub async fn execute_card_tokenization(
executor: tokenize::CardNetworkTokenizeExecutor<'_, domain::TokenizeCardRequest>,
builder: tokenize::NetworkTokenizationBuilder<'_, tokenize::TokenizeWithCard>,
req: &domain::TokenizeCardRequest,
) -> errors::RouterResult<api::CardNetworkTokenizeResponse> {
// Val... | crates/router/src/core/payment_methods/cards.rs | router | function_signature | 482 | rust | null | null | null | null | execute_card_tokenization | null | null | null | null | null | null | null |
pub struct ArchipelRefundOrder {
pub amount: MinorUnit,
pub currency: Currency,
} | crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | ArchipelRefundOrder | null | null | null | null | null | null | null | null | null | null | null |
pub struct BreadpayPaymentsResponse {
url: url::Url,
} | crates/hyperswitch_connectors/src/connectors/breadpay/transformers.rs | hyperswitch_connectors | struct_definition | 15 | rust | BreadpayPaymentsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct OrderDetailsWithAmount {
/// Name of the product that is being purchased
pub product_name: String,
/// The quantity of the product to be purchased
pub quantity: u16,
/// the amount per quantity of product
pub amount: MinorUnit,
// Does the order includes shipping
pub requires_... | crates/diesel_models/src/types.rs | diesel_models | struct_definition | 371 | rust | OrderDetailsWithAmount | null | null | null | null | null | null | null | null | null | null | null |
pub struct NetceteraMetaData {
pub mcc: Option<String>,
pub merchant_country_code: Option<String>,
pub merchant_name: Option<String>,
pub endpoint_prefix: String,
pub three_ds_requestor_name: Option<String>,
pub three_ds_requestor_id: Option<String>,
pub merchant_configuration_id: Option<Str... | crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs | hyperswitch_connectors | struct_definition | 71 | rust | NetceteraMetaData | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_error_data(error_response: Option<&NordeaErrorBody>) -> Option<&NordeaFailures> {
error_response
.and_then(|error| error.nordea_failures.as_ref())
.and_then(|failures| failures.first())
} | crates/hyperswitch_connectors/src/connectors/nordea/transformers.rs | hyperswitch_connectors | function_signature | 56 | rust | null | null | null | null | get_error_data | null | null | null | null | null | null | null |
impl SuccessBasedRoutingConfigBody {
pub fn update(&mut self, new: Self) {
if let Some(min_aggregates_size) = new.min_aggregates_size {
self.min_aggregates_size = Some(min_aggregates_size)
}
if let Some(default_success_rate) = new.default_success_rate {
self.default_s... | crates/api_models/src/routing.rs | api_models | impl_block | 256 | rust | null | SuccessBasedRoutingConfigBody | null | impl SuccessBasedRoutingConfigBody | null | null | null | null | null | null | null | null |
pub struct PaymentIntentFilters {
#[serde(default)]
pub status: Vec<IntentStatus>,
#[serde(default)]
pub currency: Vec<Currency>,
#[serde(default)]
pub profile_id: Vec<id_type::ProfileId>,
#[serde(default)]
pub connector: Vec<Connector>,
#[serde(default)]
pub auth_type: Vec<Authe... | crates/api_models/src/analytics/payment_intents.rs | api_models | struct_definition | 202 | rust | PaymentIntentFilters | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update_with_id(
self,
conn: &PgPooledConn,
refund: RefundUpdate,
) -> StorageResult<Self> {
match generics::generic_update_by_id::<<Self as HasTable>::Table, _, _, _>(
conn,
self.id.to_owned(),
RefundUpdateInternal::from(refund),
... | crates/diesel_models/src/query/refund.rs | diesel_models | function_signature | 123 | rust | null | null | null | null | update_with_id | null | null | null | null | null | null | null |
pub fn from_headers(headers: &HeaderMap) -> RouterResult<Self> {
let merchant_id = headers
.get(HEADER_MERCHANT_ID)
.and_then(|value| value.to_str().ok())
.ok_or_else(|| ApiErrorResponse::InvalidRequestData {
message: format!("`{HEADER_MERCHANT_ID}` header is ... | crates/router/src/services/authentication/detached.rs | router | function_signature | 366 | rust | null | null | null | null | from_headers | null | null | null | null | null | null | null |
impl webhooks::IncomingWebhook for Moneris {
fn get_webhook_object_reference_id(
&self,
_request: &webhooks::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
Err(report!(errors::ConnectorError::WebhooksNotImplemented)... | crates/hyperswitch_connectors/src/connectors/moneris.rs | hyperswitch_connectors | impl_block | 211 | rust | null | Moneris | webhooks::IncomingWebhook for | impl webhooks::IncomingWebhook for for Moneris | null | null | null | null | null | null | null | null |
pub struct GiftCardDetails {
/// The gift card number
pub number: Secret<String>,
/// The card verification code.
pub cvc: Secret<String>,
} | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | struct_definition | 36 | rust | GiftCardDetails | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_refunds_filters_profile(
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_... | crates/router/src/routes/refunds.rs | router | function_signature | 212 | rust | null | null | null | null | get_refunds_filters_profile | null | null | null | null | null | null | null |
pub async fn find_by_user_email(
conn: &PgPooledConn,
user_email: &pii::Email,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
conn,
users_dsl::email.eq(user_email.to_owned()),
)
.await
} | crates/diesel_models/src/query/user.rs | diesel_models | function_signature | 75 | rust | null | null | null | null | find_by_user_email | null | null | null | null | null | null | null |
pub struct OpayoRouterData<T> {
pub amount: MinorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/opayo/transformers.rs | hyperswitch_connectors | struct_definition | 24 | rust | OpayoRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub struct Card {
pub holder_name: Secret<String>,
pub number: cards::CardNumber,
pub cvv: Secret<String>,
pub expiration_month: Secret<String>,
pub expiration_year: Secret<String>,
pub capture: String,
pub installments_id: Option<String>,
pub installments: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs | hyperswitch_connectors | struct_definition | 69 | rust | Card | null | null | null | null | null | null | null | null | null | null | null |
pub async fn retrieve_profile(
state: SessionState,
profile_id: id_type::ProfileId,
key_store: domain::MerchantKeyStore,
) -> RouterResponse<api_models::admin::ProfileResponse> {
let db = state.store.as_ref();
let business_profile = db
.find_business_profile_by_profile_id(&(&state).into(), ... | crates/router/src/core/admin.rs | router | function_signature | 171 | rust | null | null | null | null | retrieve_profile | null | null | null | null | null | null | null |
pub struct MerchantConnectorResponse {
/// 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 | 1,054 | rust | MerchantConnectorResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/query/user/sample_data.rs
Public functions: 9
use async_bb8_diesel::AsyncRunQueryDsl;
use diesel::{associations::HasTable, debug_query, ExpressionMethods, TextExpressionMethods};
use error_stack::ResultExt;
use router_env::logger;
#[cfg(feature = "v1")]
use crate::schema::{
payment... | crates/diesel_models/src/query/user/sample_data.rs | diesel_models | full_file | 1,810 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Authipay {} | crates/hyperswitch_connectors/src/connectors/authipay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Authipay | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Authipay | null | null | null | null | null | null | null | null |
File: crates/router/src/routes/recon.rs
Public functions: 4
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::recon as recon_api;
use router_env::Flow;
use super::AppState;
use crate::{
core::{api_locking, recon},
services::{api, authentication, authorization::permissions::Permission},
};
pub... | crates/router/src/routes/recon.rs | router | full_file | 582 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub trait PaymentRedirectFlow: Sync {
// Associated type for call_payment_flow response
type PaymentFlowResponse;
#[cfg(feature = "v1")]
#[allow(clippy::too_many_arguments)]
async fn call_payment_flow(
&self,
state: &SessionState,
req_state: ReqState,
merchant_contex... | crates/router/src/core/payments.rs | router | trait_definition | 959 | rust | null | null | PaymentRedirectFlow | null | null | null | null | null | null | null | null | null |
impl CardDetailsForNetworkTransactionId {
pub fn get_nti_and_card_details_for_mit_flow(
recurring_details: mandates::RecurringDetails,
) -> Option<(api_models::payments::MandateReferenceId, Self)> {
let network_transaction_id_and_card_details = match recurring_details {
mandates::Rec... | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | impl_block | 213 | rust | null | CardDetailsForNetworkTransactionId | null | impl CardDetailsForNetworkTransactionId | null | null | null | null | null | null | null | null |
pub struct AuthenticationTokenFlowData {} | crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs | hyperswitch_domain_models | struct_definition | 7 | rust | AuthenticationTokenFlowData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_frm_filters(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<GetFrmFilterRequest>,
) -> impl Responder {
let flow = AnalyticsFlow::GetFrmFilters;
Box::pin(api::server_wrap(
flow,
state,
&req... | crates/router/src/analytics.rs | router | function_signature | 176 | rust | null | null | null | null | get_frm_filters | null | null | null | null | null | null | null |
File: crates/hyperswitch_domain_models/src/callback_mapper.rs
Public functions: 1
Public structs: 1
use common_enums::enums as common_enums;
use common_types::callback_mapper::CallbackMapperData;
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct CallbackMapper {
pub id: String,
pub callback_mapper_id_type: ... | crates/hyperswitch_domain_models/src/callback_mapper.rs | hyperswitch_domain_models | full_file | 204 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl<const T: u8> ConnectorCommon for DummyConnector<T> {
fn id(&self) -> &'static str {
Into::<transformers::DummyConnectors>::into(T).get_dummy_connector_id()
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, connectors: &'a Connect... | crates/hyperswitch_connectors/src/connectors/dummyconnector.rs | hyperswitch_connectors | impl_block | 378 | rust | null | DummyConnector | ConnectorCommon for | impl ConnectorCommon for for DummyConnector | null | null | null | null | null | null | null | null |
pub struct NovalnetWebhookNotificationResponse {
pub event: NovalnetWebhookEvent,
pub result: ResultData,
pub transaction: NovalnetWebhookTransactionData,
} | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | hyperswitch_connectors | struct_definition | 41 | rust | NovalnetWebhookNotificationResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct GetThemeResponse {
pub theme_id: String,
pub theme_name: String,
pub entity_type: EntityType,
pub tenant_id: id_type::TenantId,
pub org_id: Option<id_type::OrganizationId>,
pub merchant_id: Option<id_type::MerchantId>,
pub profile_id: Option<id_type::ProfileId>,
pub email_conf... | crates/api_models/src/user/theme.rs | api_models | struct_definition | 94 | rust | GetThemeResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentsMandateReferenceRecord {
pub connector_mandate_id: String,
pub payment_method_type: Option<common_enums::PaymentMethodType>,
pub original_payment_authorized_amount: Option<i64>,
pub original_payment_authorized_currency: Option<Currency>,
pub mandate_metadata: Option<pii::SecretSer... | crates/hyperswitch_domain_models/src/mandates.rs | hyperswitch_domain_models | struct_definition | 108 | rust | PaymentsMandateReferenceRecord | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentMethodDeleteResponse {
/// The unique identifier of the Payment method
#[schema(example = "card_rGK4Vi5iSW70MY7J2mIg")]
pub payment_method_id: String,
/// Whether payment method was deleted or not
#[schema(example = true)]
pub deleted: bool,
} | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 74 | rust | PaymentMethodDeleteResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn delete_by_unified_code_unified_message_locale(
conn: &PgPooledConn,
unified_code: String,
unified_message: String,
locale: String,
) -> StorageResult<bool> {
generics::generic_delete::<<Self as HasTable>::Table, _>(
conn,
dsl::unified_code... | crates/diesel_models/src/query/unified_translations.rs | diesel_models | function_signature | 113 | rust | null | null | null | null | delete_by_unified_code_unified_message_locale | 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.