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 Responder {
let flow = Flow::PaymentsIncrementalAuthorization;
let mut payload = json_payload.into_inner();
let payment_id = path.into_inner();
tracing::Span::current().record("payment_id", payment_id.get_string_repr());
payload.payment_id = payment_id;
let locking_action = payload.get_lo... | crates/router/src/routes/payments.rs | router | impl_block | 285 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub fn server(state: AppState) -> Scope {
let mut routes_with_restricted_access = web::scope("");
#[cfg(not(feature = "external_access_dc"))]
{
routes_with_restricted_access =
routes_with_restricted_access.guard(actix_web::guard::Host("localhost"));
}
... | crates/router/src/routes/app.rs | router | function_signature | 126 | rust | null | null | null | null | server | null | null | null | null | null | null | null |
pub struct RiskifiedFailedTransactionResponse {
checkout: OrderResponse,
} | crates/hyperswitch_connectors/src/connectors/riskified/transformers/api.rs | hyperswitch_connectors | struct_definition | 15 | rust | RiskifiedFailedTransactionResponse | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Redsys {
fn id(&self) -> &'static str {
"redsys"
}
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: &'a... | crates/hyperswitch_connectors/src/connectors/redsys.rs | hyperswitch_connectors | impl_block | 293 | rust | null | Redsys | ConnectorCommon for | impl ConnectorCommon for for Redsys | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/taxjar.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use common_utils::{
errors::CustomResult,
ext_traits::BytesExt,
request::{Method, Request, RequestBuilder, RequestContent},
types::{AmountConvertor, FloatMajorUnit, FloatMajorUnit... | crates/hyperswitch_connectors/src/connectors/taxjar.rs | hyperswitch_connectors | full_file | 2,448 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct BatchDecryptDataResponse {
pub data: DecryptedDataGroup,
} | crates/common_utils/src/types/keymanager.rs | common_utils | struct_definition | 17 | rust | BatchDecryptDataResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/adyenplatform.rs
Public structs: 1
pub mod transformers;
use api_models::{self, webhooks::IncomingWebhookEvent};
#[cfg(feature = "payouts")]
use base64::Engine;
#[cfg(feature = "payouts")]
use common_utils::crypto;
use common_utils::errors::CustomResult;
#[cfg(featur... | crates/hyperswitch_connectors/src/connectors/adyenplatform.rs | hyperswitch_connectors | full_file | 3,767 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct TransactionResponse {
#[serde(rename = "NUMTRANS")]
pub transaction_number: String,
#[serde(rename = "NUMAPPEL")]
pub paybox_order_id: String,
#[serde(rename = "CODEREPONSE")]
pub response_code: String,
#[serde(rename = "COMMENTAIRE")]
pub response_message: String,
#[se... | crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs | hyperswitch_connectors | struct_definition | 119 | rust | TransactionResponse | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Bluecode {
fn id(&self) -> &'static str {
"bluecode"
}
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: ... | crates/hyperswitch_connectors/src/connectors/bluecode.rs | hyperswitch_connectors | impl_block | 400 | rust | null | Bluecode | ConnectorCommon for | impl ConnectorCommon for for Bluecode | null | null | null | null | null | null | null | null |
pub async fn retrieve_gsm_rule(
state: SessionState,
gsm_request: gsm_api_types::GsmRetrieveRequest,
) -> RouterResponse<gsm_api_types::GsmResponse> {
let db = state.store.as_ref();
let gsm_api_types::GsmRetrieveRequest {
connector,
flow,
sub_flow,
code,
message,
... | crates/router/src/core/gsm.rs | router | function_signature | 170 | rust | null | null | null | null | retrieve_gsm_rule | null | null | null | null | null | null | null |
pub struct PaymentProcessedAmount; | crates/api_models/src/analytics/payments.rs | api_models | struct_definition | 6 | rust | PaymentProcessedAmount | null | null | null | null | null | null | null | null | null | null | null |
impl StripebillingInvoiceBody {
pub fn get_invoice_webhook_data_from_body(
body: &[u8],
) -> CustomResult<Self, errors::ConnectorError> {
let webhook_body = body
.parse_struct::<Self>("StripebillingInvoiceBody")
.change_context(errors::ConnectorError::WebhookBodyDecodingF... | crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs | hyperswitch_connectors | impl_block | 81 | rust | null | StripebillingInvoiceBody | null | impl StripebillingInvoiceBody | null | null | null | null | null | null | null | null |
pub fn get_setup_mandate_body(req: &types::SetupMandateRouterData) -> Result<Vec<u8>, Error> {
let card_holder_name = req.get_billing_full_name()?;
let auth_details = BamboraapacAuthType::try_from(&req.connector_auth_type)?;
let body = match &req.request.payment_method_data {
PaymentMethodData::Card... | crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs | hyperswitch_connectors | function_signature | 389 | rust | null | null | null | null | get_setup_mandate_body | null | null | null | null | null | null | null |
pub struct Zsl; | crates/hyperswitch_connectors/src/connectors/zsl.rs | hyperswitch_connectors | struct_definition | 5 | rust | Zsl | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentSync for Riskified {} | crates/hyperswitch_connectors/src/connectors/riskified.rs | hyperswitch_connectors | impl_block | 7 | rust | null | Riskified | PaymentSync for | impl PaymentSync for for Riskified | null | null | null | null | null | null | null | null |
impl User {
pub fn server(state: AppState) -> Scope {
let mut route = web::scope("/v2/users").app_data(web::Data::new(state));
route = route.service(
web::resource("/create-merchant")
.route(web::post().to(user::user_merchant_account_create)),
);
route = ... | crates/router/src/routes/app.rs | router | impl_block | 278 | rust | null | User | null | impl User | null | null | null | null | null | null | null | null |
/// Throws errors when the requested resource is not found
pub async fn get_resource<D, R>(
&self,
state: &KeyManagerState,
key_store: &MerchantKeyStore,
resources: MutexGuard<'_, Vec<D>>,
filter_fn: impl Fn(&&D) -> bool,
error_message: String,
) -> CustomResult<R... | crates/storage_impl/src/mock_db.rs | storage_impl | function_signature | 154 | rust | null | null | null | null | get_resource | null | null | null | null | null | null | null |
File: crates/external_services/src/email.rs
Public functions: 3
Public structs: 3
//! Interactions with the AWS SES SDK
use aws_sdk_sesv2::types::Body;
use common_utils::{errors::CustomResult, pii};
use serde::Deserialize;
/// Implementation of aws ses client
pub mod ses;
/// Implementation of SMTP server client
... | crates/external_services/src/email.rs | external_services | full_file | 1,328 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMinorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/redsys.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
#[serde(rename_all = "snake_case")]
pub enum MerchantRecipientData {
ConnectorRecipientId(Secret<String>),
WalletId(Secret<String>),
AccountData(MerchantAccountData),
}
impl ForeignFrom<MerchantRecipientData> for api_models::admin::MerchantRecipientData {
fn foreign_from(value: MerchantRecipientData) -... | crates/router/src/types.rs#chunk1 | router | chunk | 3,471 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn to_card_details_from_locker(self) -> payment_methods::CardDetailFromLocker {
payment_methods::CardDetailFromLocker {
card_number: None,
card_holder_name: self.card_holder_name.clone(),
card_issuer: self.card_issuer.clone(),
card_network: self.card_network.c... | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | function_signature | 157 | rust | null | null | null | null | to_card_details_from_locker | null | null | null | null | null | null | null |
pub async fn retrieve_merchant_account(
state: web::Data<AppState>,
req: HttpRequest,
mid: web::Path<common_utils::id_type::MerchantId>,
) -> HttpResponse {
let flow = Flow::MerchantsAccountRetrieve;
let merchant_id = mid.into_inner();
let payload = admin::MerchantId {
merchant_id: merch... | crates/router/src/routes/admin.rs | router | function_signature | 247 | rust | null | null | null | null | retrieve_merchant_account | null | null | null | null | null | null | null |
impl api::PaymentCapture for Multisafepay {} | crates/hyperswitch_connectors/src/connectors/multisafepay.rs | hyperswitch_connectors | impl_block | 12 | rust | null | Multisafepay | api::PaymentCapture for | impl api::PaymentCapture for for Multisafepay | null | null | null | null | null | null | null | null |
File: crates/router/src/configs.rs
use hyperswitch_interfaces::secrets_interface::secret_state::RawSecret;
pub(crate) mod defaults;
pub mod secrets_transformers;
pub mod settings;
mod validations;
pub type Settings = settings::Settings<RawSecret>;
| crates/router/src/configs.rs | router | full_file | 54 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_role_info_from_db(&self, state: &SessionState) -> UserResult<RoleInfo> {
RoleInfo::from_role_id_org_id_tenant_id(
state,
&self.role_id,
&self.org_id,
self.tenant_id.as_ref().unwrap_or(&state.tenant.tenant_id),
)
.await
.cha... | crates/router/src/utils/user.rs | router | function_signature | 87 | rust | null | null | null | null | get_role_info_from_db | null | null | null | null | null | null | null |
impl api::PaymentVoid for Tokenio {} | crates/hyperswitch_connectors/src/connectors/tokenio.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Tokenio | api::PaymentVoid for | impl api::PaymentVoid for for Tokenio | null | null | null | null | null | null | null | null |
File: crates/router/src/core/blocklist.rs
Public functions: 4
pub mod transformers;
pub mod utils;
use api_models::blocklist as api_blocklist;
use crate::{
core::errors::{self, RouterResponse},
routes::SessionState,
services,
types::domain,
};
pub async fn add_entry_to_blocklist(
state: Session... | crates/router/src/core/blocklist.rs | router | full_file | 453 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/workflows/outgoing_webhook_retry.rs
Public structs: 1
#[cfg(feature = "payouts")]
use api_models::payouts as payout_models;
use api_models::{
enums::EventType,
webhook_events::OutgoingWebhookRequestContent,
webhooks::{OutgoingWebhook, OutgoingWebhookContent},
};
use common_utils::{... | crates/router/src/workflows/outgoing_webhook_retry.rs | router | full_file | 4,012 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct SoapHeader {} | crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs | hyperswitch_connectors | struct_definition | 5 | rust | SoapHeader | null | null | null | null | null | null | null | null | null | null | null |
pub struct JpmorganPSyncResponse {
transaction_id: String,
transaction_state: JpmorganTransactionState,
} | crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | JpmorganPSyncResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct ActionLinks {
supply_3ds_device_data: Option<ActionLink>,
settle_payment: Option<ActionLink>,
partially_settle_payment: Option<ActionLink>,
refund_payment: Option<ActionLink>,
partially_refund_payment: Option<ActionLink>,
cancel_payment: Option<ActionLink>,
} | crates/hyperswitch_connectors/src/connectors/worldpay/response.rs | hyperswitch_connectors | struct_definition | 62 | rust | ActionLinks | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Datatrans {} | crates/hyperswitch_connectors/src/connectors/datatrans.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Datatrans | api::PaymentVoid for | impl api::PaymentVoid for for Datatrans | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Globalpay {
fn id(&self) -> &'static str {
"globalpay"
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
connectors.globalpay.base_url.as_ref()
}
fn ge... | crates/hyperswitch_connectors/src/connectors/globalpay.rs | hyperswitch_connectors | impl_block | 314 | rust | null | Globalpay | ConnectorCommon for | impl ConnectorCommon for for Globalpay | null | null | null | null | null | null | null | null |
maud::html! {
(maud::DOCTYPE)
head {
(PreEscaped(r#"<script src="https://secure.networkmerchants.com/js/v1/Gateway.js"></script>"#))
}
body style="background-color: #ffffff; padding: 20px; font-family: Ar... | crates/router/src/services/api.rs#chunk5 | router | chunk | 8,185 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl AddressStructForDbEntry<'_> {
async fn encrypt_customer_address_and_set_to_db(
&self,
db: &dyn StorageInterface,
) -> errors::CustomResult<Option<domain::Address>, errors::CustomersErrorResponse> {
let encrypted_customer_address = self
.address
.async_map(|ad... | crates/router/src/core/customers.rs | router | impl_block | 254 | rust | null | AddressStructForDbEntry | null | impl AddressStructForDbEntry | null | null | null | null | null | null | null | null |
pub fn get_payment_method_type(
&self,
) -> Option<&Vec<payment_methods::RequestPaymentMethodTypes>> {
self.payment_method_types.as_ref()
} | crates/api_models/src/admin.rs | api_models | function_signature | 37 | rust | null | null | null | null | get_payment_method_type | null | null | null | null | null | null | null |
pub async fn payments_create_and_confirm_intent(
state: web::Data<app::AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<payment_types::PaymentsRequest>,
) -> impl Responder {
let flow = Flow::PaymentsCreateAndConfirmIntent;
let header_payload = match HeaderPayload::foreign_try_from(re... | crates/router/src/routes/payments.rs | router | function_signature | 366 | rust | null | null | null | null | payments_create_and_confirm_intent | null | null | null | null | null | null | null |
pub struct SavePaymentMethodDataResponse {
pub payment_method_id: Option<String>,
pub payment_method_status: Option<common_enums::PaymentMethodStatus>,
pub connector_mandate_reference_id: Option<ConnectorMandateReferenceId>,
} | crates/router/src/core/payments/tokenization.rs | router | struct_definition | 52 | rust | SavePaymentMethodDataResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct JpmorganMerchantSoftware {
company_name: Secret<String>,
product_name: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | JpmorganMerchantSoftware | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentMethodsEnabled<'_> {
fn get_payment_methods_enabled(&self) -> RouterResult<Option<Vec<pii::SecretSerdeValue>>> {
let mut vec = Vec::new();
let payment_methods_enabled = match self.payment_methods_enabled.clone() {
Some(val) => {
for pm in val.into_iter() {
... | crates/router/src/core/admin.rs | router | impl_block | 149 | rust | null | PaymentMethodsEnabled | null | impl PaymentMethodsEnabled | null | null | null | null | null | null | null | null |
impl UserFlow {
async fn is_required(
&self,
user: &UserFromStorage,
path: &[TokenPurpose],
state: &SessionState,
user_tenant_id: &id_type::TenantId,
) -> UserResult<bool> {
match self {
Self::SPTFlow(flow) => flow.is_required(user, path, state, user_t... | crates/router/src/types/domain/user/decision_manager.rs | router | impl_block | 108 | rust | null | UserFlow | null | impl UserFlow | null | null | null | null | null | null | null | null |
/// Based on the storage type, derive appropriate diesel traits
/// This will add the appropriate #[diesel(sql_type)]
/// Since the `FromSql` and `ToSql` have to be derived for all the enums, this will add the
/// `DieselEnum` derive trait.
pub(crate) fn diesel_enum_attribute_macro(
diesel_enum_meta: DieselEnumMeta... | crates/router_derive/src/macros/diesel.rs | router_derive | function_signature | 279 | rust | null | null | null | null | diesel_enum_attribute_macro | null | null | null | null | null | null | null |
pub struct ClickToPay; | crates/router/src/core/unified_authentication_service/types.rs | router | struct_definition | 6 | rust | ClickToPay | null | null | null | null | null | null | null | null | null | null | null |
pub async fn delete_by_card_id(conn: &PgPooledConn, card_id: &str) -> StorageResult<Self> {
generics::generic_delete_one_with_result::<<Self as HasTable>::Table, _, _>(
conn,
dsl::card_id.eq(card_id.to_owned()),
)
.await
} | crates/diesel_models/src/query/locker_mock_up.rs | diesel_models | function_signature | 70 | rust | null | null | null | null | delete_by_card_id | null | null | null | null | null | null | null |
pub struct RefundResponse {
/// Unique Identifier for the refund
pub refund_id: String,
/// The payment id against which refund is initiated
#[schema(value_type = String)]
pub payment_id: common_utils::id_type::PaymentId,
/// The refund amount, which should be less than or equal to the total pay... | crates/api_models/src/refunds.rs | api_models | struct_definition | 635 | rust | RefundResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayuPaymentsCaptureRequest {
order_id: String,
order_status: OrderStatus,
} | crates/hyperswitch_connectors/src/connectors/payu/transformers.rs | hyperswitch_connectors | struct_definition | 22 | rust | PayuPaymentsCaptureRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct RefundData {
pub transaction_id: i64,
pub refund_id: i64,
pub order_id: Option<String>,
pub error_code: Option<i32>,
pub error_info: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs | hyperswitch_connectors | struct_definition | 51 | rust | RefundData | null | null | null | null | null | null | null | null | null | null | null |
pub trait SignatureCalculationData {
fn get_merchant_parameters(&self) -> Result<String, Error>;
fn get_order_id(&self) -> String;
} | crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs | hyperswitch_connectors | trait_definition | 34 | rust | null | null | SignatureCalculationData | null | null | null | null | null | null | null | null | null |
pub fn server(state: AppState) -> Scope {
web::scope("/feature_matrix")
.app_data(web::Data::new(state))
.service(web::resource("").route(web::get().to(feature_matrix::fetch_feature_matrix)))
} | crates/router/src/routes/app.rs | router | function_signature | 51 | rust | null | null | null | null | server | null | null | null | null | null | null | null |
/// Feature metadata for merchant connector account
pub struct MerchantConnectorAccountFeatureMetadata {
/// Revenue recovery metadata for merchant connector account
pub revenue_recovery: Option<RevenueRecoveryMetadata>,
} | crates/api_models/src/admin.rs | api_models | struct_definition | 39 | rust | MerchantConnectorAccountFeatureMetadata | null | null | null | null | null | null | null | null | null | null | null |
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct GooglePayMerchantDetails {
pub merchant_info: GooglePayMerchantInfo,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct GooglePayMerchantInfo {
pub merchant_name: String,
pub merchant_id: Option<String>,
p... | crates/api_models/src/payments.rs#chunk9 | api_models | chunk | 8,185 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct IatapayAccessTokenErrorResponse {
pub error: String,
pub path: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/iatapay/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | IatapayAccessTokenErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
/// Add information/metadata to the current context of an event.
pub trait EventInfo {
/// The data that is sent with the event.
type Data: ErasedMaskSerialize;
/// The data that is sent with the event.
fn data(&self) -> Result<Self::Data, EventsError>;
/// The key identifying the data for an event... | crates/events/src/lib.rs | events | trait_definition | 85 | rust | null | null | EventInfo | null | null | null | null | null | null | null | null | null |
impl api::Payment for Coinbase {} | crates/hyperswitch_connectors/src/connectors/coinbase.rs | hyperswitch_connectors | impl_block | 7 | rust | null | Coinbase | api::Payment for | impl api::Payment for for Coinbase | null | null | null | null | null | null | null | null |
File: crates/router/src/routes/files.rs
Public functions: 3
use actix_multipart::Multipart;
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::files as file_types;
use router_env::{instrument, tracing, Flow};
use crate::core::api_locking;
pub mod transformers;
use super::app::AppState;
use crate::{
... | crates/router/src/routes/files.rs | router | full_file | 1,190 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct ReverseLookupNew {
pub lookup_id: String,
pub pk_id: String,
pub sk_id: String,
pub source: String,
pub updated_by: String,
} | crates/diesel_models/src/reverse_lookup.rs | diesel_models | struct_definition | 41 | rust | ReverseLookupNew | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/services/email.rs
pub mod types;
| crates/router/src/services/email.rs | router | full_file | 13 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/masking/src/secret.rs
Public functions: 5
Public structs: 1
//! Structure describing secret.
use std::{fmt, marker::PhantomData};
use crate::{strategy::Strategy, PeekInterface, StrongSecret};
/// Secret thing.
///
/// To get access to value use method `expose()` of trait [`crate::ExposeInterface`].
/... | crates/masking/src/secret.rs | masking | full_file | 3,364 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn routing_unlink_config(
state: web::Data<AppState>,
req: HttpRequest,
payload: web::Json<routing_types::RoutingConfigRequest>,
transaction_type: Option<enums::TransactionType>,
) -> impl Responder {
let flow = Flow::RoutingUnlinkConfig;
Box::pin(oss_api::server_wrap(
flow,
... | crates/router/src/routes/routing.rs | router | function_signature | 265 | rust | null | null | null | null | routing_unlink_config | null | null | null | null | null | null | null |
pub fn should_call_connector<Op: Debug, F: Clone, D>(operation: &Op, payment_data: &D) -> bool
where
D: OperationSessionGetters<F> + Send + Sync + Clone,
{
match format!("{operation:?}").as_str() {
"PaymentConfirm" => true,
"PaymentStart" => {
!matches!(
payment_data.... | crates/router/src/core/payments.rs | router | function_signature | 572 | rust | null | null | null | null | should_call_connector | null | null | null | null | null | null | null |
pub async fn get_merchant_payment_filters(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<GetPaymentFiltersRequest>,
) -> impl Responder {
let flow = AnalyticsFlow::GetPaymentFilters;
Box::pin(api::server_wrap(
flow,
s... | crates/router/src/analytics.rs | router | function_signature | 224 | rust | null | null | null | null | get_merchant_payment_filters | null | null | null | null | null | null | null |
pub fn validate_auth_and_metadata_type(
&self,
) -> Result<(), error_stack::Report<errors::ApiErrorResponse>> {
let connector_auth_type_validation = ConnectorAuthTypeValidation {
auth_type: self.auth_type,
};
connector_auth_type_validation.validate_connector_auth_type()?;... | crates/router/src/core/connector_validation.rs | router | function_signature | 252 | rust | null | null | null | null | validate_auth_and_metadata_type | null | null | null | null | null | null | null |
impl PaymentIntentNew {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<PaymentIntent> {
generics::generic_insert(conn, self).await
}
} | crates/diesel_models/src/query/payment_intent.rs | diesel_models | impl_block | 42 | rust | null | PaymentIntentNew | null | impl PaymentIntentNew | null | null | null | null | null | null | null | null |
pub fn keys(&self) -> Keys<K> {
Keys::new(0..self.data.len())
} | crates/hyperswitch_constraint_graph/src/dense_map.rs | hyperswitch_constraint_graph | function_signature | 24 | rust | null | null | null | null | keys | null | null | null | null | null | null | null |
pub async fn list_by_merchant_id_data_kind(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
data_kind: common_enums::BlocklistDataKind,
limit: i64,
offset: i64,
) -> StorageResult<Vec<Self>> {
generics::generic_filter::<<Self as HasTable>::Table,... | crates/diesel_models/src/query/blocklist.rs | diesel_models | function_signature | 146 | rust | null | null | null | null | list_by_merchant_id_data_kind | null | null | null | null | null | null | null |
pub struct BoletoVoucherData {
/// The shopper's social security number
pub social_security_number: Option<Secret<String>>,
/// The bank number associated with the boleto
pub bank_number: Option<Secret<String>>,
/// The type of document (e.g., CPF, CNPJ)
pub document_type: Option<common_enums::D... | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | struct_definition | 216 | rust | BoletoVoucherData | null | null | null | null | null | null | null | null | null | null | null |
pub struct NordeaErrorBody {
// Serde JSON because connector returns an `(item)` object in failures array object
/// More details on the occurred error: Validation error
#[serde(rename = "failures")]
pub nordea_failures: Option<Vec<NordeaFailures>>,
/// Original request information
#[serde(renam... | crates/hyperswitch_connectors/src/connectors/nordea/responses.rs | hyperswitch_connectors | struct_definition | 89 | rust | NordeaErrorBody | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_proxy_record(
&self,
state: &SessionState,
key_store: &domain::MerchantKeyStore,
storage_scheme: common_enums::enums::MerchantStorageScheme,
) -> RouterResult<ProxyRecord> {
let token = &self.0.token;
match self.0.token_type {
proxy_api_m... | crates/router/src/core/proxy/utils.rs | router | function_signature | 399 | rust | null | null | null | null | get_proxy_record | null | null | null | null | null | null | null |
pub struct PlaidBankAccountCredentialsBacs {
pub account_id: String,
pub account: String,
pub sort_code: String,
} | crates/pm_auth/src/connector/plaid/transformers.rs | pm_auth | struct_definition | 31 | rust | PlaidBankAccountCredentialsBacs | null | null | null | null | null | null | null | null | null | null | null |
impl webhooks::IncomingWebhook for Wellsfargo {
fn get_webhook_object_reference_id(
&self,
_request: &webhooks::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
Err(report!(errors::ConnectorError::WebhooksNotImplement... | crates/hyperswitch_connectors/src/connectors/wellsfargo.rs | hyperswitch_connectors | impl_block | 214 | rust | null | Wellsfargo | webhooks::IncomingWebhook for | impl webhooks::IncomingWebhook for for Wellsfargo | null | null | null | null | null | null | null | null |
pub async fn find_by_key(conn: &PgPooledConn, key: &str) -> StorageResult<Self> {
generics::generic_find_by_id::<<Self as HasTable>::Table, _, _>(conn, key.to_owned()).await
} | crates/diesel_models/src/query/configs.rs | diesel_models | function_signature | 54 | rust | null | null | null | null | find_by_key | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.MerchantConnectorCreate
{
"type": "object",
"description": "Create a new Merchant Connector for the merchant account. The connector could be a payment processor / facilitator / acquirer or specialized services like Fraud / Accounting etc.\"",
"required": [
"connector_typ... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 1,246 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"MerchantConnectorCreate"
] | null | null | null | null |
impl api::PaymentSession for Moneris {} | crates/hyperswitch_connectors/src/connectors/moneris.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Moneris | api::PaymentSession for | impl api::PaymentSession for for Moneris | null | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/placetopay.rs
use masking::Secret;
use router::types::{self, domain, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]
struct PlacetopayTest;
impl ConnectorActions for PlacetopayTest {}
impl utils::Connector for Pl... | crates/router/tests/connectors/placetopay.rs | router | full_file | 2,947 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn third_party_sdk_session_next_action<Op>(
payment_attempt: &storage::PaymentAttempt,
operation: &Op,
) -> bool
where
Op: Debug,
{
// If the operation is confirm, we will send session token response in next action
if format!("{operation:?}").eq("PaymentConfirm") {
let condition1 = payme... | crates/router/src/core/payments/transformers.rs | router | function_signature | 403 | rust | null | null | null | null | third_party_sdk_session_next_action | null | null | null | null | null | null | null |
pub async fn calculate_smart_retry_time(
state: &SessionState,
payment_intent: &PaymentIntent,
token_with_retry_info: &PaymentProcessorTokenWithRetryInfo,
) -> Result<Option<time::PrimitiveDateTime>, errors::ProcessTrackerError> {
let wait_hours = token_with_retry_info.retry_wait_time_hours;
let cur... | crates/router/src/workflows/revenue_recovery.rs | router | function_signature | 171 | rust | null | null | null | null | calculate_smart_retry_time | null | null | null | null | null | null | null |
pub struct NoonApplePaymentData {
version: Secret<String>,
data: Secret<String>,
signature: Secret<String>,
header: NoonApplePayHeader,
} | crates/hyperswitch_connectors/src/connectors/noon/transformers.rs | hyperswitch_connectors | struct_definition | 34 | rust | NoonApplePaymentData | null | null | null | null | null | null | null | null | null | null | null |
pub fn payments_external_authentication() {} | crates/openapi/src/routes/payments.rs | openapi | function_signature | 7 | rust | null | null | null | null | payments_external_authentication | null | null | null | null | null | null | null |
pub fn paypal_sdk_next_steps_check(
payment_attempt: storage::PaymentAttempt,
) -> RouterResult<Option<api_models::payments::SdkNextActionData>> {
let paypal_connector_metadata: Option<Result<api_models::payments::SdkNextActionData, _>> =
payment_attempt.connector_metadata.map(|metadata| {
m... | crates/router/src/core/payments/transformers.rs | router | function_signature | 131 | rust | null | null | null | null | paypal_sdk_next_steps_check | null | null | null | null | null | null | null |
impl api::PaymentCapture for Volt {} | crates/hyperswitch_connectors/src/connectors/volt.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Volt | api::PaymentCapture for | impl api::PaymentCapture for for Volt | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.FutureUsage
{
"type": "string",
"description": "Specifies how the payment method can be used for future payments.\n- `off_session`: The payment method can be used for future payments when the customer is not present.\n- `on_session`: The payment method is intended for use only... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 109 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"FutureUsage"
] | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/tsys.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/tsys.rs | hyperswitch_connectors | full_file | 5,410 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Cybersource {} | crates/hyperswitch_connectors/src/connectors/cybersource.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Cybersource | api::PaymentSync for | impl api::PaymentSync for for Cybersource | null | null | null | null | null | null | null | null |
pub struct SepaBankTransfer {
/// Bank name
#[schema(value_type = Option<String>, example = "Deutsche Bank")]
pub bank_name: Option<String>,
/// Bank country code
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
pub bank_country_code: Option<api_enums::CountryAlpha2>,
/// Bank... | crates/api_models/src/payouts.rs | api_models | struct_definition | 232 | rust | SepaBankTransfer | null | null | null | null | null | null | null | null | null | null | null |
impl GetPaymentMethodType for GiftCardData {
fn get_payment_method_type(&self) -> api_enums::PaymentMethodType {
match self {
Self::Givex(_) => api_enums::PaymentMethodType::Givex,
Self::PaySafeCard {} => api_enums::PaymentMethodType::PaySafeCard,
Self::BhnCardNetwork(_) ... | crates/hyperswitch_domain_models/src/payment_method_data.rs | hyperswitch_domain_models | impl_block | 99 | rust | null | GiftCardData | GetPaymentMethodType for | impl GetPaymentMethodType for for GiftCardData | null | null | null | null | null | null | null | null |
pub fn set_token_details(
self,
network_token: &'a NetworkTokenizationResponse,
) -> NetworkTokenizationBuilder<'a, CardTokenized> {
NetworkTokenizationBuilder {
state: std::marker::PhantomData,
network_token: Some(&network_token.0),
customer: self.custome... | crates/router/src/core/payment_methods/tokenize/card_executor.rs | router | function_signature | 143 | rust | null | null | null | null | set_token_details | null | null | null | null | null | null | null |
Documentation: api-reference/essentials/rate_limit.mdx
# Type: Doc File
---
title: Rate Limits
---
The Hyperswitch API has multiple checks in place to enhance its stability when faced with sudden surges of incoming traffic. Merchants who send numerous requests in rapid succession could encounter error responses indic... | api-reference/essentials/rate_limit.mdx | null | doc_file | 392 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct TrustpayErrorResponse {
pub status: i64,
pub description: Option<String>,
pub errors: Option<Vec<Errors>>,
pub instance_id: Option<String>,
pub payment_description: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs | hyperswitch_connectors | struct_definition | 47 | rust | TrustpayErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
impl Stripe {
pub const fn new() -> &'static Self {
&Self {
amount_converter: &MinorUnitForConnector,
amount_converter_webhooks: &StringMinorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/stripe.rs | hyperswitch_connectors | impl_block | 46 | rust | null | Stripe | null | impl Stripe | null | null | null | null | null | null | null | null |
pub fn is_chargeback_event(event_code: &CheckoutWebhookEventType) -> bool {
matches!(
event_code,
CheckoutWebhookEventType::DisputeReceived
| CheckoutWebhookEventType::DisputeExpired
| CheckoutWebhookEventType::DisputeAccepted
| CheckoutWebhookEventType::DisputeCa... | crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs | hyperswitch_connectors | function_signature | 160 | rust | null | null | null | null | is_chargeback_event | null | null | null | null | null | null | null |
pub struct StripeConnectRecipientCreateRequest {
#[serde(rename = "type")]
account_type: String,
country: Option<enums::CountryAlpha2>,
email: Option<Email>,
#[serde(rename = "capabilities[card_payments][requested]")]
capabilities_card_payments: Option<bool>,
#[serde(rename = "capabilities[t... | crates/hyperswitch_connectors/src/connectors/stripe/transformers/connect.rs | hyperswitch_connectors | struct_definition | 699 | rust | StripeConnectRecipientCreateRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn decide_connector_for_normal_or_recurring_payment<F: Clone, D>(
state: &SessionState,
payment_data: &mut D,
routing_data: &mut storage::RoutingData,
connectors: Vec<api::ConnectorRoutingData>,
is_connector_agnostic_mit_enabled: Option<bool>,
payment_method_info: &domain::PaymentMetho... | crates/router/src/core/payments.rs | router | function_signature | 1,014 | rust | null | null | null | null | decide_connector_for_normal_or_recurring_payment | null | null | null | null | null | null | null |
/// Implements the `Validate` trait to check if the config variable is present
/// Usage
/// ```
/// use router_derive::ConfigValidate;
///
/// #[derive(ConfigValidate)]
/// struct ConnectorParams {
/// base_url: String,
/// }
///
/// enum ApplicationError {
/// InvalidConfigurationValueError(String),
/// }
///... | crates/router_derive/src/lib.rs | router_derive | macro | 236 | rust | null | null | null | null | null | null | null | null | proc_derive | null | null | null |
pub struct ApplepayPaymentData {
payment_data: ApplePayEncodedPaymentData,
payment_method: ApplepayPaymentMethod,
transaction_identifier: String,
} | crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs | hyperswitch_connectors | struct_definition | 33 | rust | ApplepayPaymentData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_token_vault_api() {} | crates/openapi/src/routes/tokenization.rs | openapi | function_signature | 10 | rust | null | null | null | null | create_token_vault_api | null | null | null | null | null | null | null |
pub struct StripeCreateRefundRequest {
pub refund_id: Option<String>,
pub amount: Option<i64>,
pub payment_intent: common_utils::id_type::PaymentId,
pub reason: Option<String>,
pub metadata: Option<pii::SecretSerdeValue>,
pub merchant_connector_details: Option<admin::MerchantConnectorDetailsWrap... | crates/router/src/compatibility/stripe/refunds/types.rs | router | struct_definition | 75 | rust | StripeCreateRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
impl ApiEventMetric for CardInfoMigrationResponse {} | crates/api_models/src/cards_info.rs | api_models | impl_block | 10 | rust | null | CardInfoMigrationResponse | ApiEventMetric for | impl ApiEventMetric for for CardInfoMigrationResponse | null | null | null | null | null | null | null | null |
impl PaymentSource {
pub fn is_for_internal_use_only(self) -> bool {
match self {
Self::Dashboard | Self::Sdk | Self::MerchantServer | Self::Postman => false,
Self::Webhook | Self::ExternalAuthenticator => true,
}
}
} | crates/common_enums/src/enums.rs | common_enums | impl_block | 61 | rust | null | PaymentSource | null | impl PaymentSource | null | null | null | null | null | null | null | null |
pub struct ConnectorConfig {
pub authipay: Option<ConnectorTomlConfig>,
pub juspaythreedsserver: Option<ConnectorTomlConfig>,
pub katapult: Option<ConnectorTomlConfig>,
pub aci: Option<ConnectorTomlConfig>,
pub adyen: Option<ConnectorTomlConfig>,
pub affirm: Option<ConnectorTomlConfig>,
#[cf... | crates/connector_configs/src/connector.rs | connector_configs | struct_definition | 1,702 | rust | ConnectorConfig | null | null | null | null | null | null | null | null | null | null | null |
pub fn struct_to_xml<T: Serialize>(
item: &T,
) -> Result<HashMap<String, Secret<String, WithoutType>>, errors::ConnectorError> {
let xml_content = quick_xml::se::to_string_with_root("txn", &item).map_err(|e| {
router_env::logger::error!("Error serializing Struct: {:?}", e);
errors::ConnectorErr... | crates/hyperswitch_connectors/src/connectors/elavon.rs | hyperswitch_connectors | function_signature | 128 | rust | null | null | null | null | struct_to_xml | 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.