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 PayonePayoutFulfillRequest {
amount_of_money: AmountOfMoney,
card_payout_method_specific_input: CardPayoutMethodSpecificInput,
} | crates/hyperswitch_connectors/src/connectors/payone/transformers.rs | hyperswitch_connectors | struct_definition | 35 | rust | PayonePayoutFulfillRequest | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v1/refunds/refunds--create.mdx
# Type: Doc File
---
openapi: post /refunds
--- | api-reference/v1/refunds/refunds--create.mdx | null | doc_file | 31 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::MandateSetup for Nordea {} | crates/hyperswitch_connectors/src/connectors/nordea.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Nordea | api::MandateSetup for | impl api::MandateSetup for for Nordea | null | null | null | null | null | null | null | null |
pub async fn payment_intents_retrieve(
state: web::Data<routes::AppState>,
req: HttpRequest,
path: web::Path<common_utils::id_type::PaymentId>,
query_payload: web::Query<types::StripePaymentRetrieveBody>,
) -> HttpResponse {
let payload = payment_types::PaymentsRetrieveRequest {
resource_id:... | crates/router/src/compatibility/stripe/payment_intents.rs | router | function_signature | 481 | rust | null | null | null | null | payment_intents_retrieve | null | null | null | null | null | null | null |
pub struct RefundResponse {
rtr_id: String,
status: RefundStatus,
} | crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | RefundResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct Mollie {
amount_converter: &'static (dyn AmountConvertor<Output = StringMajorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/mollie.rs | hyperswitch_connectors | struct_definition | 28 | rust | Mollie | null | null | null | null | null | null | null | null | null | null | null |
pub trait PaymentAttemptInterface {
type Error;
#[cfg(feature = "v1")]
async fn insert_payment_attempt(
&self,
payment_attempt: PaymentAttemptNew,
storage_scheme: storage_enums::MerchantStorageScheme,
) -> error_stack::Result<PaymentAttempt, Self::Error>;
#[cfg(feature = "v2... | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | trait_definition | 1,687 | rust | null | null | PaymentAttemptInterface | null | null | null | null | null | null | null | null | null |
pub async fn payouts_update_core(
state: SessionState,
merchant_context: domain::MerchantContext,
req: payouts::PayoutCreateRequest,
) -> RouterResponse<payouts::PayoutCreateResponse> {
let payout_id = req.payout_id.clone().get_required_value("payout_id")?;
let mut payout_data = Box::pin(make_payout... | crates/router/src/core/payouts.rs | router | function_signature | 551 | rust | null | null | null | null | payouts_update_core | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/routing/{routing_algorithm_id}"
{
"get": {
"tags": [
"Routing"
],
"summary": "Routing - Retrieve",
"description": "Retrieve a routing algorithm",
"operationId": "Retrieve a routing config",
"parameters": [
{
"name": "routing_algorithm_id",
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 262 | .json | null | null | null | null | null | openapi_spec | paths | [
"/routing/{routing_algorithm_id}"
] | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMinorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/paytm.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub struct RelayRequestInner<T: RelayInterface + ?Sized> {
pub connector_resource_id: String,
pub connector_id: id_type::MerchantConnectorAccountId,
pub relay_type: PhantomData<T>,
pub data: T::Request,
} | crates/router/src/core/relay.rs | router | struct_definition | 53 | rust | RelayRequestInner | null | null | null | null | null | null | null | null | null | null | null |
pub fn log_applepay_verification_response_if_error(
response: &Result<Result<types::Response, types::Response>, Report<errors::ApiClientError>>,
) {
if let Err(error) = response.as_ref() {
logger::error!(applepay_domain_verification_error= ?error);
};
response.as_ref().ok().map(|res| {
r... | crates/router/src/core/verification/utils.rs | router | function_signature | 103 | rust | null | null | null | null | log_applepay_verification_response_if_error | null | null | null | null | null | null | null |
pub async fn get_role_information(
state: web::Data<AppState>,
http_req: HttpRequest,
) -> HttpResponse {
let flow = Flow::GetRolesInfo;
Box::pin(api::server_wrap(
flow,
state.clone(),
&http_req,
(),
|_, _: (), _, _| async move {
user_role_core::get_a... | crates/router/src/routes/user_role.rs | router | function_signature | 123 | rust | null | null | null | null | get_role_information | null | null | null | null | null | null | null |
pub struct KafkaPaymentAttempt<'a> {
pub payment_id: &'a id_type::PaymentId,
pub merchant_id: &'a id_type::MerchantId,
pub attempt_id: &'a String,
pub status: storage_enums::AttemptStatus,
pub amount: MinorUnit,
pub currency: Option<storage_enums::Currency>,
pub save_to_locker: Option<bool>,... | crates/router/src/services/kafka/payment_attempt.rs | router | struct_definition | 626 | rust | KafkaPaymentAttempt | null | null | null | null | null | null | null | null | null | null | null |
pub struct RevenueRecoveryAttempt(revenue_recovery::RevenueRecoveryAttemptData); | crates/router/src/core/webhooks/recovery_incoming.rs | router | struct_definition | 16 | rust | RevenueRecoveryAttempt | null | null | null | null | null | null | null | null | null | null | null |
pub struct GetnetErrorResponse {
pub status_code: u16,
pub code: String,
pub message: String,
pub reason: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/getnet/transformers.rs | hyperswitch_connectors | struct_definition | 35 | rust | GetnetErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/affirm.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use base64::Engine;
use common_enums::enums;
use common_utils::{
consts::BASE64_ENGINE,
errors::CustomResult,
ext_traits::BytesExt,
request::{Method, Req... | crates/hyperswitch_connectors/src/connectors/affirm.rs | hyperswitch_connectors | full_file | 6,150 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Payme {} | crates/hyperswitch_connectors/src/connectors/payme.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Payme | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Payme | null | null | null | null | null | null | null | null |
impl ApiEventMetric for GatewayStatusMap {
fn get_api_event_type(&self) -> Option<ApiEventsType> {
Some(ApiEventsType::Gsm)
}
} | crates/diesel_models/src/gsm.rs | diesel_models | impl_block | 38 | rust | null | GatewayStatusMap | ApiEventMetric for | impl ApiEventMetric for for GatewayStatusMap | null | null | null | null | null | null | null | null |
impl webhooks::IncomingWebhook for Santander {
async fn verify_webhook_source(
&self,
_request: &webhooks::IncomingWebhookRequestDetails<'_>,
_merchant_id: &common_utils::id_type::MerchantId,
_connector_webhook_details: Option<common_utils::pii::SecretSerdeValue>,
_connector_... | crates/hyperswitch_connectors/src/connectors/santander.rs | hyperswitch_connectors | impl_block | 452 | rust | null | Santander | webhooks::IncomingWebhook for | impl webhooks::IncomingWebhook for for Santander | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/blocklist.rs
Public structs: 2
use diesel::{Identifiable, Insertable, Queryable, Selectable};
use serde::{Deserialize, Serialize};
use crate::schema::blocklist;
#[derive(Clone, Debug, Eq, Insertable, PartialEq, Serialize, Deserialize)]
#[diesel(table_name = blocklist)]
pub struct Bloc... | crates/diesel_models/src/blocklist.rs | diesel_models | full_file | 252 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct FrmRouterData {
pub merchant_id: common_utils::id_type::MerchantId,
pub connector: String,
// TODO: change this to PaymentId type
pub payment_id: String,
pub attempt_id: String,
pub request: FrmRequest,
pub response: FrmResponse,
} | crates/router/src/types/fraud_check.rs | router | struct_definition | 66 | rust | FrmRouterData | null | null | null | null | null | null | null | null | null | null | null |
impl<'a> KafkaRefund<'a> {
pub fn from_storage(refund: &'a Refund) -> Self {
Self {
internal_reference_id: &refund.internal_reference_id,
refund_id: &refund.refund_id,
payment_id: &refund.payment_id,
merchant_id: &refund.merchant_id,
connector_tran... | crates/router/src/services/kafka/refund.rs | router | impl_block | 285 | rust | null | KafkaRefund | null | impl KafkaRefund | null | null | null | null | null | null | null | null |
pub fn handle_unified_connector_service_response_for_payment_register(
response: payments_grpc::PaymentServiceRegisterResponse,
) -> CustomResult<
(
AttemptStatus,
Result<PaymentsResponseData, ErrorResponse>,
u16,
),
UnifiedConnectorServiceError,
> {
let status = AttemptStatu... | crates/router/src/core/unified_connector_service.rs | router | function_signature | 122 | rust | null | null | null | null | handle_unified_connector_service_response_for_payment_register | null | null | null | null | null | null | null |
impl Responder {
let payload = json_payload.into_inner();
let flow = Flow::PmAuthLinkTokenCreate;
let api_auth = auth::ApiKeyAuth::default();
let (auth, _) = match crate::services::authentication::check_client_secret_and_get_auth(
req.headers(),
&payload,
api_auth,
) {
... | crates/router/src/routes/pm_auth.rs | router | impl_block | 287 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub(super) async fn free_redis_lock<A>(
state: &A,
unique_locking_key: &str,
merchant_id: common_utils::id_type::MerchantId,
lock_value: Option<String>,
) -> RouterResult<()>
where
A: SessionStateInfo,
{
let redis_conn = state
.store()
.get_redis_conn()
.change_context(er... | crates/router/src/core/webhooks/utils.rs | router | function_signature | 409 | rust | null | null | null | null | free_redis_lock | null | null | null | null | null | null | null |
pub async fn update_by_merchant_id_mandate_id(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
mandate_id: &str,
mandate: MandateUpdateInternal,
) -> StorageResult<Self> {
generics::generic_update_with_results::<<Self as HasTable>::Table, _, _, _>(
... | crates/diesel_models/src/query/mandate.rs | diesel_models | function_signature | 165 | rust | null | null | null | null | update_by_merchant_id_mandate_id | null | null | null | null | null | null | null |
impl Default for SqlxClient {
fn default() -> Self {
let database_url = format!(
"postgres://{}:{}@{}:{}/{}",
"db_user", "db_pass", "localhost", 5432, "hyperswitch_db"
);
Self {
#[allow(clippy::expect_used)]
pool: PgPoolOptions::new()
... | crates/analytics/src/sqlx.rs | analytics | impl_block | 103 | rust | null | SqlxClient | Default for | impl Default for for SqlxClient | null | null | null | null | null | null | null | null |
pub struct VirtualAccountsType {
pub country_code: String,
pub currency_code: String,
pub bank_id: Secret<String>,
pub bank_account_id: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/nomupay/transformers.rs | hyperswitch_connectors | struct_definition | 38 | rust | VirtualAccountsType | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_total_charged_amount(&self) -> common_types::MinorUnit {
self.all_captures
.iter()
.fold(common_types::MinorUnit::new(0), |accumulator, capture| {
accumulator
+ match capture.1.status {
storage_enums::CaptureStatus::C... | crates/router/src/core/payments/types.rs | router | function_signature | 122 | rust | null | null | null | null | get_total_charged_amount | null | null | null | null | null | null | null |
pub struct MerchantAccountSetter {
pub id: common_utils::id_type::MerchantId,
pub merchant_name: Option<Encryption>,
pub merchant_details: Option<Encryption>,
pub publishable_key: Option<String>,
pub storage_scheme: storage_enums::MerchantStorageScheme,
pub metadata: Option<pii::SecretSerdeValue... | crates/diesel_models/src/merchant_account.rs | diesel_models | struct_definition | 168 | rust | MerchantAccountSetter | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update_payouts_and_payout_attempt(
_payout_data: &mut PayoutData,
_merchant_context: &domain::MerchantContext,
_req: &payouts::PayoutCreateRequest,
_state: &SessionState,
) -> CustomResult<(), errors::ApiErrorResponse> {
todo!()
} | crates/router/src/core/payouts/helpers.rs | router | function_signature | 73 | rust | null | null | null | null | update_payouts_and_payout_attempt | null | null | null | null | null | null | null |
pub struct CryptopayWebhookDetails {
#[serde(rename = "type")]
pub service_type: String,
pub event: WebhookEvent,
pub data: CryptopayPaymentResponseData,
} | crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs | hyperswitch_connectors | struct_definition | 44 | rust | CryptopayWebhookDetails | null | null | null | null | null | null | null | null | null | null | null |
pub fn check_payments_receivable(&self) -> Option<api::PayPalOnboardingStatus> {
if !self.payments_receivable {
return Some(api::PayPalOnboardingStatus::PaymentsNotReceivable);
}
None
} | crates/router/src/types/api/connector_onboarding/paypal.rs | router | function_signature | 56 | rust | null | null | null | null | check_payments_receivable | null | null | null | null | null | null | null |
impl std::ops::Deref for PaymentsTokenReference {
type Target =
HashMap<common_utils::id_type::MerchantConnectorAccountId, ConnectorTokenReferenceRecord>;
fn deref(&self) -> &Self::Target {
&self.0
}
} | crates/diesel_models/src/payment_method.rs | diesel_models | impl_block | 56 | rust | null | PaymentsTokenReference | std::ops::Deref for | impl std::ops::Deref for for PaymentsTokenReference | null | null | null | null | null | null | null | null |
pub struct CardPayoutMethodSpecificInput {
card: Card,
payment_product_id: PaymentProductId,
} | crates/hyperswitch_connectors/src/connectors/payone/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | CardPayoutMethodSpecificInput | null | null | null | null | null | null | null | null | null | null | null |
pub struct BankAccountDetails {
pub account_name: Option<String>,
pub account_details: PaymentMethodTypeDetails,
pub payment_method_type: PaymentMethodType,
pub payment_method: PaymentMethod,
pub account_id: Secret<String>,
pub account_type: Option<String>,
pub balance: Option<types::FloatMa... | crates/pm_auth/src/types.rs | pm_auth | struct_definition | 71 | rust | BankAccountDetails | null | null | null | null | null | null | null | null | null | null | null |
pub async fn save_payment_method<FData>(
state: &SessionState,
connector_name: String,
save_payment_method_data: SavePaymentMethodData<FData>,
customer_id: Option<id_type::CustomerId>,
merchant_context: &domain::MerchantContext,
payment_method_type: Option<storage_enums::PaymentMethodType>,
... | crates/router/src/core/payments/tokenization.rs | router | function_signature | 4,981 | rust | null | null | null | null | save_payment_method | null | null | null | null | null | null | null |
impl api::RefundSync for Blackhawknetwork {} | crates/hyperswitch_connectors/src/connectors/blackhawknetwork.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Blackhawknetwork | api::RefundSync for | impl api::RefundSync for for Blackhawknetwork | null | null | null | null | null | null | null | null |
pub struct XenditMetadata {
pub for_user_id: String,
} | crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | XenditMetadata | null | null | null | null | null | null | null | null | null | null | null |
impl ProcessTrackerBatch {
pub fn to_redis_field_value_pairs(
&self,
) -> CustomResult<Vec<(&str, String)>, errors::ProcessTrackerError> {
Ok(vec![
("id", self.id.to_string()),
("group_name", self.group_name.to_string()),
("stream_name", self.stream_name.to_st... | crates/scheduler/src/consumer/types/batch.rs | scheduler | impl_block | 740 | rust | null | ProcessTrackerBatch | null | impl ProcessTrackerBatch | null | null | null | null | null | null | null | null |
pub async fn get_payment_intent_metrics(
&self,
metric: &PaymentIntentMetrics,
dimensions: &[PaymentIntentDimensions],
auth: &AuthInfo,
filters: &PaymentIntentFilters,
granularity: Option<Granularity>,
time_range: &TimeRange,
) -> types::MetricsResult<HashSet<... | crates/analytics/src/lib.rs | analytics | function_signature | 590 | rust | null | null | null | null | get_payment_intent_metrics | null | null | null | null | null | null | null |
File: crates/storage_impl/src/lookup.rs
use common_utils::errors::CustomResult;
use diesel_models::{
enums as storage_enums, kv,
reverse_lookup::{
ReverseLookup as DieselReverseLookup, ReverseLookupNew as DieselReverseLookupNew,
},
};
use error_stack::ResultExt;
use redis_interface::SetnxReply;
us... | crates/storage_impl/src/lookup.rs | storage_impl | full_file | 1,193 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl<'a> KafkaDisputeEvent<'a> {
pub fn from_storage(dispute: &'a Dispute) -> Self {
let currency = dispute.dispute_currency.unwrap_or(
dispute
.currency
.to_uppercase()
.parse_enum("Currency")
.unwrap_or_default(),
);
... | crates/router/src/services/kafka/dispute_event.rs | router | impl_block | 384 | rust | null | KafkaDisputeEvent | null | impl KafkaDisputeEvent | null | null | null | null | null | null | null | null |
pub struct Affirm {
amount_converter: &'static (dyn AmountConvertor<Output = MinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/affirm.rs | hyperswitch_connectors | struct_definition | 26 | rust | Affirm | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardRequestAttributes {
vault: Option<PaypalVault>,
verification: Option<ThreeDsMethod>,
} | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | struct_definition | 25 | rust | CardRequestAttributes | null | null | null | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Blackhawknetwork {} | crates/hyperswitch_connectors/src/connectors/blackhawknetwork.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Blackhawknetwork | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Blackhawknetwork | null | null | null | null | null | null | null | null |
impl Display for InvalidFileStorageConfig {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "file_storage: {}", self.0)
}
} | crates/external_services/src/file_storage.rs | external_services | impl_block | 46 | rust | null | InvalidFileStorageConfig | Display for | impl Display for for InvalidFileStorageConfig | null | null | null | null | null | null | null | null |
pub struct ShippingLines {
price: StringMajorUnit,
title: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/riskified/transformers/api.rs | hyperswitch_connectors | struct_definition | 19 | rust | ShippingLines | null | null | null | null | null | null | null | null | null | null | null |
pub async fn consumer_operations<T: SchedulerSessionState + 'static>(
state: &T,
settings: &SchedulerSettings,
workflow_selector: impl workflows::ProcessTrackerWorkflows<T> + 'static + Copy + std::fmt::Debug,
) -> CustomResult<(), errors::ProcessTrackerError> {
let stream_name = settings.stream.clone();... | crates/scheduler/src/consumer.rs | scheduler | function_signature | 313 | rust | null | null | null | null | consumer_operations | null | null | null | null | null | null | null |
File: crates/router/src/types/storage/subscription.rs
pub use diesel_models::subscription::{Subscription, SubscriptionNew, SubscriptionUpdate};
| crates/router/src/types/storage/subscription.rs | router | full_file | 26 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct SsoSignInRequest {
pub state: Secret<String>,
pub code: Secret<String>,
} | crates/api_models/src/user.rs | api_models | struct_definition | 22 | rust | SsoSignInRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct GivexGiftCardAdditionalData {
/// Last 4 digits of the gift card number
#[schema(value_type = String, example = "4242")]
pub last4: Secret<String>,
} | crates/api_models/src/payments/additional_info.rs | api_models | struct_definition | 47 | rust | GivexGiftCardAdditionalData | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/paystack.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use common_enums::enums;
use common_utils::{
crypto,
errors::CustomResult,
ext_traits::{ByteSliceExt, BytesExt},
request::{Method, Request, RequestBuild... | crates/hyperswitch_connectors/src/connectors/paystack.rs | hyperswitch_connectors | full_file | 5,332 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl webhooks::IncomingWebhook for Coingate {
fn get_webhook_source_verification_algorithm(
&self,
_request: &webhooks::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn crypto::VerifySignature + Send>, errors::ConnectorError> {
Ok(Box::new(crypto::HmacSha256))
}
fn g... | crates/hyperswitch_connectors/src/connectors/coingate.rs | hyperswitch_connectors | impl_block | 944 | rust | null | Coingate | webhooks::IncomingWebhook for | impl webhooks::IncomingWebhook for for Coingate | null | null | null | null | null | null | null | null |
pub(super) async fn delete_payment_token_data(
state: &SessionState,
key_for_token: &str,
) -> errors::RouterResult<()> {
let redis_conn = state
.store
.get_redis_conn()
.change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable("Failed to get redis conn... | crates/router/src/core/payment_methods/utils.rs | router | function_signature | 127 | rust | null | null | null | null | delete_payment_token_data | null | null | null | null | null | null | null |
impl PaypalConnectorCredentials {
pub fn get_client_id(&self) -> Secret<String> {
match self {
Self::StandardIntegration(item) => item.client_id.clone(),
Self::PartnerIntegration(item) => item.client_id.clone(),
}
}
pub fn get_client_secret(&self) -> Secret<String> {... | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | impl_block | 212 | rust | null | PaypalConnectorCredentials | null | impl PaypalConnectorCredentials | null | null | null | null | null | null | null | null |
impl Responder {
#[allow(clippy::expect_used)]
// safety: This shouldn't panic owing to the data type
let payload = json_payload
.into_inner()
.to_vec()
.pop()
.expect("Couldn't get GetRefundMetricRequest");
let flow = AnalyticsFlow::GetRef... | crates/router/src/analytics.rs | router | impl_block | 301 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub struct SubscriptionUpdate {
pub payment_method_id: Option<String>,
pub status: Option<String>,
pub modified_at: time::PrimitiveDateTime,
} | crates/diesel_models/src/subscription.rs | diesel_models | struct_definition | 32 | rust | SubscriptionUpdate | null | null | null | null | null | null | null | null | null | null | null |
pub async fn payment_method_delete_api() {} | crates/openapi/src/routes/payment_method.rs | openapi | function_signature | 9 | rust | null | null | null | null | payment_method_delete_api | null | null | null | null | null | null | null |
impl api::PaymentToken for Sift {} | crates/hyperswitch_connectors/src/connectors/sift.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Sift | api::PaymentToken for | impl api::PaymentToken for for Sift | null | null | null | null | null | null | null | null |
impl ThemeLineage {
/// Constructor for ThemeLineage
pub fn new(
entity_type: EntityType,
tenant_id: id_type::TenantId,
org_id: id_type::OrganizationId,
merchant_id: id_type::MerchantId,
profile_id: id_type::ProfileId,
) -> Self {
match entity_type {
... | crates/common_utils/src/types/user/theme.rs | common_utils | impl_block | 794 | rust | null | ThemeLineage | null | impl ThemeLineage | null | null | null | null | null | null | null | null |
pub async fn relay() {} | crates/openapi/src/routes/relay.rs | openapi | function_signature | 6 | rust | null | null | null | null | relay | null | null | null | null | null | null | null |
pub struct BillingConnectorPaymentsSyncFlowRouterData(
router_types::BillingConnectorPaymentsSyncRouterData,
); | crates/router/src/core/webhooks/recovery_incoming.rs | router | struct_definition | 22 | rust | BillingConnectorPaymentsSyncFlowRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub trait AuthEventMetricAccumulator {
type MetricOutput;
fn add_metrics_bucket(&mut self, metrics: &AuthEventMetricRow);
fn collect(self) -> Self::MetricOutput;
} | crates/analytics/src/auth_events/accumulator.rs | analytics | trait_definition | 43 | rust | null | null | AuthEventMetricAccumulator | null | null | null | null | null | null | null | null | null |
Web Documentation: Fraud & Risk Management | Hyperswitch
# Type: Web Doc
The Hyperswitch Fraud and Risk Management (FRM) platform offers a comprehensive Unified API designed to cater to your specific payment validation needs, effectively enhancing fraud protection within your payment ecosystem.
Key Benefits:
Processor... | https://docs.hyperswitch.io/explore-hyperswitch/payment-orchestration/fraud-and-risk-management | null | web_doc_file | 371 | doc | null | null | null | null | null | web | null | null | null | https://docs.hyperswitch.io/explore-hyperswitch/payment-orchestration/fraud-and-risk-management | Fraud & Risk Management | Hyperswitch | null |
impl AnalyticsDataSource for ClickhouseClient {
type Row = serde_json::Value;
async fn load_results<T>(
&self,
query: &str,
) -> common_utils::errors::CustomResult<Vec<T>, QueryExecutionError>
where
Self: LoadRow<T>,
{
self.execute_query(query)
.await
... | crates/analytics/src/clickhouse.rs | analytics | impl_block | 347 | rust | null | ClickhouseClient | AnalyticsDataSource for | impl AnalyticsDataSource for for ClickhouseClient | null | null | null | null | null | null | null | null |
File: crates/analytics/src/disputes.rs
pub mod accumulators;
mod core;
pub mod filters;
pub mod metrics;
pub mod types;
pub use accumulators::{DisputeMetricAccumulator, DisputeMetricsAccumulator};
pub trait DisputeAnalytics: metrics::DisputeMetricAnalytics {}
pub use self::core::{get_filters, get_metrics};
| crates/analytics/src/disputes.rs | analytics | full_file | 75 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentAttempt {
#[track_caller]
pub fn get_total_amount(&self) -> MinorUnit {
self.amount_details.get_net_amount()
}
pub fn get_total_surcharge_amount(&self) -> Option<MinorUnit> {
self.amount_details.surcharge_amount
}
pub fn extract_card_network(&self) -> Option<common_... | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | impl_block | 89 | rust | null | PaymentAttempt | null | impl PaymentAttempt | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Dwolla {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&DWOLLA_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*DWOLLA_SUPPORTED_PAYMENT_METHODS)
}
fn get_support... | crates/hyperswitch_connectors/src/connectors/dwolla.rs | hyperswitch_connectors | impl_block | 108 | rust | null | Dwolla | ConnectorSpecifications for | impl ConnectorSpecifications for for Dwolla | null | null | null | null | null | null | null | null |
impl api::RefundSync for Mifinity {} | crates/hyperswitch_connectors/src/connectors/mifinity.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Mifinity | api::RefundSync for | impl api::RefundSync for for Mifinity | null | null | null | null | null | null | null | null |
pub struct Breadpay {
amount_converter: &'static (dyn AmountConvertor<Output = StringMinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/breadpay.rs | hyperswitch_connectors | struct_definition | 27 | rust | Breadpay | null | null | null | null | null | null | null | null | null | null | null |
/// create a connection
pub fn get_recovery_decider_connection(
&self,
hyper_client: Client,
) -> Result<DeciderClient<Client>, Report<RecoveryDeciderError>> {
let uri = self
.base_url
.parse::<tonic::transport::Uri>()
.map_err(Report::from)
... | crates/external_services/src/grpc_client/revenue_recovery/recovery_decider_client.rs | external_services | function_signature | 128 | rust | null | null | null | null | get_recovery_decider_connection | null | null | null | null | null | null | null |
Documentation: api-reference/v1/disputes/disputes--retrieve.mdx
# Type: Doc File
---
openapi: get /disputes/{dispute_id}
--- | api-reference/v1/disputes/disputes--retrieve.mdx | null | doc_file | 38 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_gsm(
state: &app::SessionState,
original_connector_data: &api::ConnectorData,
payout_data: &PayoutData,
) -> RouterResult<Option<hyperswitch_domain_models::gsm::GatewayStatusMap>> {
let error_code = payout_data.payout_attempt.error_code.to_owned();
let error_message = payout_data.pa... | crates/router/src/core/payouts/retry.rs | router | function_signature | 146 | rust | null | null | null | null | get_gsm | null | null | null | null | null | null | null |
pub fn payment_method_session_retrieve() {} | crates/openapi/src/routes/payment_method.rs | openapi | function_signature | 9 | rust | null | null | null | null | payment_method_session_retrieve | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.FrmPaymentMethodType
{
"type": "object",
"description": "Details of FrmPaymentMethodType are mentioned here... it should be passed in payment connector create api call, and stored in merchant_connector_table",
"required": [
"payment_method_type",
"card_networks",
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 183 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"FrmPaymentMethodType"
] | null | null | null | null |
impl api::Payment for Cybersource {} | crates/hyperswitch_connectors/src/connectors/cybersource.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Cybersource | api::Payment for | impl api::Payment for for Cybersource | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.RoutingAlgorithmWrapper
{
"oneOf": [
{
"$ref": "#/components/schemas/StaticRoutingAlgorithm"
},
{
"$ref": "#/components/schemas/DynamicRoutingAlgorithm"
}
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 59 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"RoutingAlgorithmWrapper"
] | null | null | null | null |
pub async fn insert_pm_collect_link(
self,
conn: &PgPooledConn,
) -> StorageResult<PaymentMethodCollectLink> {
generics::generic_insert(conn, self)
.await
.and_then(|res: GenericLink| {
PaymentMethodCollectLink::try_from(res)
.chang... | crates/diesel_models/src/query/generic_link.rs | diesel_models | function_signature | 99 | rust | null | null | null | null | insert_pm_collect_link | null | null | null | null | null | null | null |
pub async fn insert_org_level_user_role_in_db(
self,
state: SessionState,
role_id: String,
user_status: UserStatus,
) -> UserResult<UserRole> {
let org_id = self
.get_new_merchant()
.get_new_organization()
.get_organization_id();
l... | crates/router/src/types/domain/user.rs | router | function_signature | 130 | rust | null | null | null | null | insert_org_level_user_role_in_db | null | null | null | null | null | null | null |
pub async fn perform_surcharge_decision_management_for_payment_method_list(
state: &SessionState,
algorithm_ref: routing::RoutingAlgorithmRef,
payment_attempt: &storage::PaymentAttempt,
payment_intent: &storage::PaymentIntent,
billing_address: Option<hyperswitch_domain_models::address::Address>,
... | crates/router/src/core/payment_methods/surcharge_decision_configs.rs | router | function_signature | 902 | rust | null | null | null | null | perform_surcharge_decision_management_for_payment_method_list | null | null | null | null | null | null | null |
File: crates/analytics/src/auth_events/metrics/frictionless_flow_count.rs
use std::collections::HashSet;
use api_models::analytics::{
auth_events::{AuthEventDimensions, AuthEventFilters, AuthEventMetricsBucketIdentifier},
Granularity, TimeRange,
};
use common_enums::DecoupledAuthenticationType;
use common_uti... | crates/analytics/src/auth_events/metrics/frictionless_flow_count.rs | analytics | full_file | 1,073 | null | null | null | null | null | null | null | null | null | null | null | null | null |
diesel_models::types::RecurringPaymentIntervalUnit::Day => Self::Day,
diesel_models::types::RecurringPaymentIntervalUnit::Month => Self::Month,
diesel_models::types::RecurringPaymentIntervalUnit::Year => Self::Year,
diesel_models::types::RecurringPaymentIntervalUnit::Hour... | crates/router/src/core/payments/transformers.rs#chunk5 | router | chunk | 8,170 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl Webhooks {
pub fn server(config: AppState) -> Scope {
use api_models::webhooks as webhook_type;
#[allow(unused_mut)]
let mut route = web::scope("/v2/webhooks")
.app_data(web::Data::new(config))
.service(
web::resource("/{merchant_id}/{profile_id}... | crates/router/src/routes/app.rs | router | impl_block | 245 | rust | null | Webhooks | null | impl Webhooks | null | null | null | null | null | null | null | null |
impl api::PaymentCapture for Vgs {} | crates/hyperswitch_connectors/src/connectors/vgs.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Vgs | api::PaymentCapture for | impl api::PaymentCapture for for Vgs | null | null | null | null | null | null | null | null |
pub async fn get_merchant_account(
state: SessionState,
req: api::MerchantId,
_profile_id: Option<id_type::ProfileId>,
) -> RouterResponse<api::MerchantAccountResponse> {
let db = state.store.as_ref();
let key_manager_state = &(&state).into();
let key_store = db
.get_merchant_key_store_b... | crates/router/src/core/admin.rs | router | function_signature | 232 | rust | null | null | null | null | get_merchant_account | null | null | null | null | null | null | null |
pub struct MerchantKeyStore {
pub merchant_id: common_utils::id_type::MerchantId,
pub key: Encryption,
#[serde(with = "custom_serde::iso8601")]
pub created_at: PrimitiveDateTime,
} | crates/diesel_models/src/merchant_key_store.rs | diesel_models | struct_definition | 51 | rust | MerchantKeyStore | null | null | null | null | null | null | null | null | null | null | null |
pub struct StripeConnectPayoutCreateResponse {
id: String,
description: Option<String>,
source_transaction: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/stripe/transformers/connect.rs | hyperswitch_connectors | struct_definition | 28 | rust | StripeConnectPayoutCreateResponse | null | null | null | null | null | null | null | null | null | null | null |
impl api::UasPostAuthenticationV2 for Recurly {} | crates/hyperswitch_connectors/src/connectors/recurly.rs | hyperswitch_connectors | impl_block | 14 | rust | null | Recurly | api::UasPostAuthenticationV2 for | impl api::UasPostAuthenticationV2 for for Recurly | null | null | null | null | null | null | null | null |
impl api::Refund for Vgs {} | crates/hyperswitch_connectors/src/connectors/vgs.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Vgs | api::Refund for | impl api::Refund for for Vgs | null | null | null | null | null | null | null | null |
impl masking::SerializableSecret for CustomerAcceptance {} | crates/common_types/src/payments.rs | common_types | impl_block | 10 | rust | null | CustomerAcceptance | masking::SerializableSecret for | impl masking::SerializableSecret for for CustomerAcceptance | null | null | null | null | null | null | null | null |
pub struct ApplepayPaymentMethod {
display_name: String,
network: String,
#[serde(rename = "type")]
pm_type: String,
} | crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs | hyperswitch_connectors | struct_definition | 33 | rust | ApplepayPaymentMethod | null | null | null | null | null | null | null | null | null | null | null |
impl Mask for String {
type Output = Self;
fn into_masked(self) -> Maskable<Self::Output> {
Maskable::new_masked(self.into())
}
} | crates/masking/src/maskable.rs | masking | impl_block | 39 | rust | null | String | Mask for | impl Mask for for String | null | null | null | null | null | null | null | null |
impl Parse for SchemaMeta {
fn parse(input: syn::parse::ParseStream<'_>) -> syn::Result<Self> {
let struct_name = input.parse::<syn::Ident>()?;
input.parse::<syn::Token![=]>()?;
let type_ident = input.parse::<syn::Ident>()?;
Ok(Self {
struct_name,
type_ident,
... | crates/router_derive/src/macros/generate_schema.rs | router_derive | impl_block | 82 | rust | null | SchemaMeta | Parse for | impl Parse for for SchemaMeta | null | null | null | null | null | null | null | null |
pub fn get_connector_and_supporting_payment_method_type_for_session_call(
&self,
) -> Vec<(&MerchantConnectorAccount, common_enums::PaymentMethodType, common_enums::PaymentMethod)> {
// This vector is created to work around lifetimes
let ref_vector = Vec::default();
... | crates/hyperswitch_domain_models/src/merchant_connector_account.rs | hyperswitch_domain_models | function_signature | 254 | rust | null | null | null | null | get_connector_and_supporting_payment_method_type_for_session_call | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &FloatMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/authipay.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub fn validate(&self) -> Result<(), ApplicationError> {
use common_utils::fp_utils::when;
when(self.redis_lock_expiry_seconds.is_default_or_empty(), || {
Err(ApplicationError::InvalidConfigurationValueError(
"redis_lock_expiry_seconds must not be empty or 0".into(),
... | crates/router/src/configs/validations.rs | router | function_signature | 69 | rust | null | null | null | null | validate | null | null | null | null | null | null | null |
pub struct AuthipayPaymentReceipt {
pub approved_amount: Amount,
pub processor_response_details: Option<Processor>,
} | crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs | hyperswitch_connectors | struct_definition | 25 | rust | AuthipayPaymentReceipt | null | null | null | null | null | null | null | null | null | null | null |
pub struct UnifiedAuthenticationServiceErrorResponse {
pub error: String,
} | crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs | hyperswitch_connectors | struct_definition | 14 | rust | UnifiedAuthenticationServiceErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.