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 GsmUpdateRequest {
/// The connector through which payment has gone through
pub connector: String,
/// The flow in which the code and message occurred for a connector
pub flow: String,
/// The sub_flow in which the code and message occurred for a connector
pub sub_flow: String,
/... | crates/api_models/src/gsm.rs | api_models | struct_definition | 489 | rust | GsmUpdateRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_action_url_from_paypal(
state: SessionState,
tracking_id: String,
return_url: String,
) -> RouterResult<String> {
let referral_request = Box::pin(build_referral_request(
state.clone(),
tracking_id,
return_url,
))
.await?;
let referral_response = http_... | crates/router/src/core/connector_onboarding/paypal.rs | router | function_signature | 169 | rust | null | null | null | null | get_action_url_from_paypal | null | null | null | null | null | null | null |
File: crates/router/src/core/files.rs
Public functions: 3
pub mod helpers;
use api_models::files;
use error_stack::ResultExt;
use super::errors::{self, RouterResponse};
use crate::{
consts,
routes::SessionState,
services::ApplicationResponse,
types::{api, domain},
};
pub async fn files_create_core(... | crates/router/src/core/files.rs | router | full_file | 989 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct Server {
pub port: u16,
pub workers: usize,
pub host: String,
} | crates/scheduler/src/configs/settings.rs | scheduler | struct_definition | 25 | rust | Server | null | null | null | null | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
#[cfg(feature = "payouts")]
amount_converter: &FloatMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/nomupay.rs | hyperswitch_connectors | function_signature | 38 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub struct BraintreeCancelRequest {
query: String,
variables: VariableCancelInput,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | BraintreeCancelRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/api_models/src/analytics/frm.rs
Public functions: 1
Public structs: 6
use std::{
collections::hash_map::DefaultHasher,
hash::{Hash, Hasher},
};
use common_enums::enums::FraudCheckStatus;
#[derive(
Clone,
Copy,
Debug,
Default,
Eq,
PartialEq,
serde::Serialize,
ser... | crates/api_models/src/analytics/frm.rs | api_models | full_file | 909 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn find_by_merchant_id(
conn: &PgPooledConn,
identifier: &common_utils::id_type::MerchantId,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
conn,
dsl::merchant_id.eq(identifier.to_owned()),
)
.await
... | crates/diesel_models/src/query/merchant_account.rs | diesel_models | function_signature | 79 | rust | null | null | null | null | find_by_merchant_id | null | null | null | null | null | null | null |
pub fn create_merchant_connector_account(
self,
source: MerchantConnectorAccount,
) -> MerchantConnectorAccount {
MerchantConnectorAccount {
connector_type: self.connector_type.unwrap_or(source.connector_type),
connector_account_details: self
.connecto... | crates/diesel_models/src/merchant_connector_account.rs | diesel_models | function_signature | 139 | rust | null | null | null | null | create_merchant_connector_account | null | null | null | null | null | null | null |
impl api::PaymentSync for Stripe {} | crates/hyperswitch_connectors/src/connectors/stripe.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Stripe | api::PaymentSync for | impl api::PaymentSync for for Stripe | null | null | null | null | null | null | null | null |
impl std::error::Error for InvalidCrmConfig {} | crates/external_services/src/crm.rs | external_services | impl_block | 12 | rust | null | InvalidCrmConfig | std::error::Error for | impl std::error::Error for for InvalidCrmConfig | null | null | null | null | null | null | null | null |
pub async fn update(
self,
conn: &PgPooledConn,
merchant_connector_account: MerchantConnectorAccountUpdateInternal,
) -> StorageResult<Self> {
match generics::generic_update_by_id::<<Self as HasTable>::Table, _, _, _>(
conn,
self.id.to_owned(),
mer... | crates/diesel_models/src/query/merchant_connector_account.rs | diesel_models | function_signature | 120 | rust | null | null | null | null | update | null | null | null | null | null | null | null |
Documentation: api-reference/v1/gsm/gsm--get.mdx
# Type: Doc File
---
openapi: post /gsm/get
--- | api-reference/v1/gsm/gsm--get.mdx | null | doc_file | 32 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn server(config: routes::AppState) -> Scope {
web::scope("/customers")
.app_data(web::Data::new(config))
.service(web::resource("").route(web::post().to(customer_create)))
.service(
web::resource("/{customer_id}")
.route(web::get().to(... | crates/router/src/compatibility/stripe/app.rs | router | function_signature | 127 | rust | null | null | null | null | server | null | null | null | null | null | null | null |
pub fn polymorphic_schema(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let input = syn::parse_macro_input!(input as syn::DeriveInput);
macros::polymorphic_macro_derive_inner(input)
.unwrap_or_else(|error| error.into_compile_error())
.into()
} | crates/router_derive/src/lib.rs | router_derive | function_signature | 68 | rust | null | null | null | null | polymorphic_schema | null | null | null | null | null | null | null |
pub struct VoidBankTransaction {
#[serde(rename = "id")]
pub transaction_id: String,
pub value: StringMajorUnit,
pub currency: api_models::enums::Currency,
pub iof_value: Option<StringMajorUnit>,
pub fx_value: Option<StringMajorUnit>,
pub exchange_rate: Option<StringMajorUnit>,
pub excha... | crates/hyperswitch_connectors/src/connectors/facilitapay/responses.rs | hyperswitch_connectors | struct_definition | 217 | rust | VoidBankTransaction | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.TimeRange
{
"type": "object",
"description": "A type representing a range of time for filtering, including a mandatory start time and an optional end time.",
"required": [
"start_time"
],
"properties": {
"start_time": {
"type": "string",
"format": "da... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 177 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"TimeRange"
] | null | null | null | null |
File: crates/router/src/db/blocklist_lookup.rs
use error_stack::report;
use router_env::{instrument, tracing};
use storage_impl::MockDb;
use super::Store;
use crate::{
connection,
core::errors::{self, CustomResult},
db::kafka_store::KafkaStore,
types::storage,
};
#[async_trait::async_trait]
pub trait... | crates/router/src/db/blocklist_lookup.rs | router | full_file | 1,102 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl<K, V> Default for DenseMap<K, V> {
fn default() -> Self {
Self::new()
}
} | crates/hyperswitch_constraint_graph/src/dense_map.rs | hyperswitch_constraint_graph | impl_block | 29 | rust | null | DenseMap | Default for | impl Default for for DenseMap | null | null | null | null | null | null | null | null |
pub async fn list_invitations_for_user(
state: web::Data<AppState>,
req: HttpRequest,
) -> HttpResponse {
let flow = Flow::ListInvitationsForUser;
Box::pin(api::server_wrap(
flow,
state.clone(),
&req,
(),
|state, user_id_from_token, _, _| {
user_role_... | crates/router/src/routes/user_role.rs | router | function_signature | 127 | rust | null | null | null | null | list_invitations_for_user | null | null | null | null | null | null | null |
pub struct SquarePaymentsRequest {
amount_money: SquarePaymentsAmountData,
idempotency_key: Secret<String>,
source_id: Secret<String>,
autocomplete: bool,
external_details: SquarePaymentsRequestExternalDetails,
} | crates/hyperswitch_connectors/src/connectors/square/transformers.rs | hyperswitch_connectors | struct_definition | 48 | rust | SquarePaymentsRequest | null | null | null | null | null | null | null | null | null | null | null |
impl api::Refund for Mpgs {} | crates/hyperswitch_connectors/src/connectors/mpgs.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Mpgs | api::Refund for | impl api::Refund for for Mpgs | null | null | null | null | null | null | null | null |
impl api::Refund for Paysafe {} | crates/hyperswitch_connectors/src/connectors/paysafe.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Paysafe | api::Refund for | impl api::Refund for for Paysafe | null | null | null | null | null | null | null | null |
pub struct JuspaythreedsserverAuthType {
pub(super) api_key: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/juspaythreedsserver/transformers.rs | hyperswitch_connectors | struct_definition | 23 | rust | JuspaythreedsserverAuthType | null | null | null | null | null | null | null | null | null | null | null |
pub async fn routing_update_default_config() {} | crates/openapi/src/routes/routing.rs | openapi | function_signature | 9 | rust | null | null | null | null | routing_update_default_config | null | null | null | null | null | null | null |
pub struct DlocalPaymentsCancelRequest {
pub cancel_id: String,
} | crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | DlocalPaymentsCancelRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn new_token(
user_id: String,
purpose: TokenPurpose,
origin: domain::Origin,
settings: &Settings,
path: Vec<TokenPurpose>,
tenant_id: Option<id_type::TenantId>,
) -> UserResult<String> {
let exp_duration =
std::time::Duration::from_secs(... | crates/router/src/services/authentication.rs | router | function_signature | 143 | rust | null | null | null | null | new_token | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/silverflow/transformers.rs
Public structs: 35
use common_enums::enums;
use common_utils::types::MinorUnit;
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{ConnectorAuthType, RouterData},
router_flow_types::{
... | crates/hyperswitch_connectors/src/connectors/silverflow/transformers.rs | hyperswitch_connectors | full_file | 5,895 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentToken for Trustpayments {} | crates/hyperswitch_connectors/src/connectors/trustpayments.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Trustpayments | api::PaymentToken for | impl api::PaymentToken for for Trustpayments | null | null | null | null | null | null | null | null |
pub async fn get_retries(
state: &app::SessionState,
retries: Option<i32>,
merchant_id: &common_utils::id_type::MerchantId,
retry_type: PayoutRetryType,
) -> Option<i32> {
match retries {
Some(retries) => Some(retries),
None => {
let key = merchant_id.get_max_auto_single_... | crates/router/src/core/payouts/retry.rs | router | function_signature | 215 | rust | null | null | null | null | get_retries | null | null | null | null | null | null | null |
impl api::PaymentCapture for Juspaythreedsserver {} | crates/hyperswitch_connectors/src/connectors/juspaythreedsserver.rs | hyperswitch_connectors | impl_block | 14 | rust | null | Juspaythreedsserver | api::PaymentCapture for | impl api::PaymentCapture for for Juspaythreedsserver | null | null | null | null | null | null | null | null |
pub fn set_three_d_s_comp_ind(mut self, three_d_s_comp_ind: ThreeDSCompInd) -> Self {
self.three_d_s_comp_ind = Some(three_d_s_comp_ind);
self
} | crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs | hyperswitch_connectors | function_signature | 47 | rust | null | null | null | null | set_three_d_s_comp_ind | null | null | null | null | null | null | null |
pub struct PaymentMethod {
pub customer_id: common_utils::id_type::CustomerId,
pub merchant_id: common_utils::id_type::MerchantId,
pub payment_method_id: String,
#[diesel(deserialize_as = super::OptionalDieselArray<storage_enums::Currency>)]
pub accepted_currency: Option<Vec<storage_enums::Currency>... | crates/diesel_models/src/payment_method.rs | diesel_models | struct_definition | 410 | rust | PaymentMethod | null | null | null | null | null | null | null | null | null | null | null |
pub struct Hipay {
amount_converter: &'static (dyn AmountConvertor<Output = StringMajorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/hipay.rs | hyperswitch_connectors | struct_definition | 27 | rust | Hipay | null | null | null | null | null | null | null | null | null | null | null |
Web Documentation: Previous Roadmap - Q3 2025 | Hyperswitch
# Type: Web Doc
🗺️ Our Roadmap typically pans out over a 3-month period and we establish topics we work on upfront.
👂And as always, we listen to your feedback and adapt our plans if needed.
Core Values
Our core values have pretty much remained the same sinc... | https://docs.hyperswitch.io/about-hyperswitch/roadmap/previous-roadmap-q3-2025 | null | web_doc_file | 1,027 | doc | null | null | null | null | null | web | null | null | null | https://docs.hyperswitch.io/about-hyperswitch/roadmap/previous-roadmap-q3-2025 | Previous Roadmap - Q3 2025 | Hyperswitch | null |
pub async fn add_payment_method_data(
state: routes::SessionState,
req: api::PaymentMethodCreate,
merchant_context: domain::MerchantContext,
pm_id: String,
) -> errors::RouterResponse<api::PaymentMethodResponse> {
let db = &*state.store;
let cards = PmCards {
state: &state,
merch... | crates/router/src/core/payment_methods/cards.rs | router | function_signature | 1,440 | rust | null | null | null | null | add_payment_method_data | 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/hyperswitch_domain_models/src/mandates.rs | hyperswitch_domain_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 OpenMsearchOutput {
#[serde(default)]
pub responses: Vec<OpensearchOutput>,
pub error: Option<OpensearchErrorDetails>,
} | crates/api_models/src/analytics/search.rs | api_models | struct_definition | 36 | rust | OpenMsearchOutput | null | null | null | null | null | null | null | null | null | null | null |
impl Default for PollConfig {
fn default() -> Self {
Self {
delay_in_secs: consts::DEFAULT_POLL_DELAY_IN_SECS,
frequency: consts::DEFAULT_POLL_FREQUENCY,
}
}
} | crates/router/src/types.rs | router | impl_block | 44 | rust | null | PollConfig | Default for | impl Default for for PollConfig | null | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/unified_authentication_service.rs
use hyperswitch_domain_models::payment_method_data::{Card, PaymentMethodData};
use masking::Secret;
use router::types::{self, api, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
#[derive(Clone, Copy)]... | crates/router/tests/connectors/unified_authentication_service.rs | router | full_file | 2,938 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentToken for Razorpay {} | crates/hyperswitch_connectors/src/connectors/razorpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Razorpay | api::PaymentToken for | impl api::PaymentToken for for Razorpay | null | null | null | null | null | null | null | null |
pub struct BarclaycardAuthenticationErrorResponse {
pub response: AuthenticationErrorInformation,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | BarclaycardAuthenticationErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Square {
fn id(&self) -> &'static str {
"square"
}
fn common_get_content_type(&self) -> &'static str {
"application/json"
}
fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str {
connectors.square.base_url.as_ref()
}
fn get_auth_he... | crates/hyperswitch_connectors/src/connectors/square.rs | hyperswitch_connectors | impl_block | 471 | rust | null | Square | ConnectorCommon for | impl ConnectorCommon for for Square | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.ProfileAcquirerUpdate
{
"type": "object",
"properties": {
"acquirer_assigned_merchant_id": {
"type": "string",
"example": "M987654321",
"nullable": true
},
"merchant_name": {
"type": "string",
"example": "Updated Retailer Name",
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 248 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"ProfileAcquirerUpdate"
] | null | null | null | null |
pub(crate) async fn decide_retry_failure_action(
state: &SessionState,
merchant_id: &id_type::MerchantId,
pt: storage::ProcessTracker,
revenue_recovery_payment_data: &storage::revenue_recovery::RevenueRecoveryPaymentData,
payment_attempt: &PaymentAttempt,
payment_intent: ... | crates/router/src/core/revenue_recovery/types.rs | router | function_signature | 392 | rust | null | null | null | null | decide_retry_failure_action | null | null | null | null | null | null | null |
/// Calculate the net amount for the order
pub fn calculate_net_amount(&self) -> MinorUnit {
self.order_amount
+ self.shipping_cost.unwrap_or(MinorUnit::zero())
+ self.surcharge_amount.unwrap_or(MinorUnit::zero())
+ self.tax_on_surcharge.unwrap_or(MinorUnit::zero())
} | crates/hyperswitch_domain_models/src/payments.rs | hyperswitch_domain_models | function_signature | 76 | rust | null | null | null | null | calculate_net_amount | null | null | null | null | null | null | null |
pub struct VaultFingerprintResponse {
pub fingerprint_id: String,
} | crates/router/src/types/payment_methods.rs | router | struct_definition | 15 | rust | VaultFingerprintResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct DefendDisputeRequestData {
pub dispute_id: String,
pub connector_dispute_id: String,
} | crates/hyperswitch_domain_models/src/router_request_types.rs | hyperswitch_domain_models | struct_definition | 26 | rust | DefendDisputeRequestData | null | null | null | null | null | null | null | null | null | null | null |
impl ResponseError for CustomJsonError {
fn status_code(&self) -> StatusCode {
StatusCode::BAD_REQUEST
}
fn error_response(&self) -> actix_web::HttpResponse<actix_web::body::BoxBody> {
use actix_web::http::header;
actix_web::HttpResponseBuilder::new(self.sta... | crates/router/src/utils.rs | router | impl_block | 99 | rust | null | CustomJsonError | ResponseError for | impl ResponseError for for CustomJsonError | null | null | null | null | null | null | null | null |
pub struct PayuRefundResponseData {
refund_id: String,
ext_refund_id: String,
amount: String,
currency_code: enums::Currency,
description: String,
creation_date_time: String,
status: RefundStatus,
status_date_time: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/payu/transformers.rs | hyperswitch_connectors | struct_definition | 64 | rust | PayuRefundResponseData | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorRedirectResponse for Trustpay {
fn get_flow_type(
&self,
_query_params: &str,
_json_payload: Option<serde_json::Value>,
action: PaymentAction,
) -> CustomResult<enums::CallConnectorAction, errors::ConnectorError> {
match action {
PaymentAction::P... | crates/hyperswitch_connectors/src/connectors/trustpay.rs | hyperswitch_connectors | impl_block | 110 | rust | null | Trustpay | ConnectorRedirectResponse for | impl ConnectorRedirectResponse for for Trustpay | null | null | null | null | null | null | null | null |
pub async fn deep_health_check(
state: web::Data<routes::AppState>,
service: web::Data<String>,
) -> impl actix_web::Responder {
let mut checks = HashMap::new();
let stores = state.stores.clone();
let app_state = Arc::clone(&state.into_inner());
let service_name = service.into_inner();
for (... | crates/router/src/bin/scheduler.rs | router | function_signature | 309 | rust | null | null | null | null | deep_health_check | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::ApiKeyCreate;
let payload = json_payload.into_inner();
Box::pin(api::server_wrap(
flow,
state,
&req,
payload,
|state, auth::AuthenticationDataWithoutProfile { key_store, .. }, payload, _| async {
api_keys::create_api_key(... | crates/router/src/routes/api_keys.rs | router | impl_block | 149 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub async fn routing_link_config() {} | crates/openapi/src/routes/routing.rs | openapi | function_signature | 8 | rust | null | null | null | null | routing_link_config | null | null | null | null | null | null | null |
pub struct PayoneRouterData<T> {
pub amount: MinorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/payone/transformers.rs | hyperswitch_connectors | struct_definition | 24 | rust | PayoneRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn retrieve_poll_status(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<String>,
) -> HttpResponse {
let flow = Flow::RetrievePollStatus;
let poll_id = PollId {
poll_id: path.into_inner(),
};
Box::pin(api::server_wrap(
flow,
state,
&re... | crates/router/src/routes/poll.rs | router | function_signature | 172 | rust | null | null | null | null | retrieve_poll_status | null | null | null | null | null | null | null |
pub struct Pay3dsRequest {
buyer_name: Secret<String>,
buyer_email: pii::Email,
buyer_key: Secret<String>,
payme_sale_id: String,
meta_data_jwt: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/payme/transformers.rs | hyperswitch_connectors | struct_definition | 46 | rust | Pay3dsRequest | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.SurchargeResponse
{
"oneOf": [
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"fixed"
]
},
"value": {
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 195 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"SurchargeResponse"
] | null | null | null | null |
fn to_old_router_data(
new_router_data: RouterDataV2<T, Self, Req, Resp>,
) -> CustomResult<RouterData<T, Req, Resp>, ConnectorError>
where
Self: Sized,
{
let Self {
merchant_id,
customer_id,
connector_customer,
payment_id,
... | crates/hyperswitch_interfaces/src/conversion_impls.rs#chunk1 | hyperswitch_interfaces | chunk | 525 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl Checkbook {
pub fn new() -> &'static Self {
&Self {
amount_converter: &FloatMajorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/checkbook.rs | hyperswitch_connectors | impl_block | 34 | rust | null | Checkbook | null | impl Checkbook | null | null | null | null | null | null | null | null |
pub fn get_connector_auth(
connector: enums::Connector,
connector_data: &settings::ConnectorOnboarding,
) -> RouterResult<types::ConnectorAuthType> {
match connector {
enums::Connector::Paypal => Ok(types::ConnectorAuthType::BodyKey {
api_key: connector_data.paypal.client_secret.clone(),... | crates/router/src/utils/connector_onboarding.rs | router | function_signature | 125 | rust | null | null | null | null | get_connector_auth | null | null | null | null | null | null | null |
pub async fn find_by_payment_id_merchant_id(
conn: &PgPooledConn,
payment_id: &common_utils::id_type::PaymentId,
merchant_id: &common_utils::id_type::MerchantId,
) -> StorageResult<Vec<Self>> {
generics::generic_filter::<
<Self as HasTable>::Table,
_,
... | crates/diesel_models/src/query/refund.rs | diesel_models | function_signature | 145 | rust | null | null | null | null | find_by_payment_id_merchant_id | null | null | null | null | null | null | null |
pub struct AuthorizeResponse {
pub is_email_sent: bool,
//this field is added for audit/debug reasons
#[serde(skip_serializing)]
pub user_id: String,
} | crates/api_models/src/user.rs | api_models | struct_definition | 40 | rust | AuthorizeResponse | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::PaymentsCreateAndConfirmIntent;
let header_payload = match HeaderPayload::foreign_try_from(req.headers()) {
Ok(headers) => headers,
Err(err) => {
return api::log_and_return_error_response(err);
}
};
let auth_type = if state.conf.merc... | crates/router/src/routes/payments.rs | router | impl_block | 321 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub fn new_for_create(
mut previous_captures: Vec<storage::Capture>,
new_capture: storage::Capture,
) -> Self {
previous_captures.push(new_capture.clone());
Self {
all_captures: previous_captures
.into_iter()
.map(|capture| (capture.capture... | crates/router/src/core/payments/types.rs | router | function_signature | 104 | rust | null | null | null | null | new_for_create | null | null | null | null | null | null | null |
/// Performs Payment Sync/Get
pub async fn payment_get(
&self,
payment_get_request: payments_grpc::PaymentServiceGetRequest,
connector_auth_metadata: ConnectorAuthMetadata,
grpc_headers: GrpcHeaders,
) -> UnifiedConnectorServiceResult<tonic::Response<payments_grpc::PaymentService... | crates/external_services/src/grpc_client/unified_connector_service.rs | external_services | function_signature | 219 | rust | null | null | null | null | payment_get | null | null | null | null | null | null | null |
pub struct DigitalvirgoRouterData<T> {
pub amount: FloatMajorUnit,
pub surcharge_amount: Option<FloatMajorUnit>,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/digitalvirgo/transformers.rs | hyperswitch_connectors | struct_definition | 37 | rust | DigitalvirgoRouterData | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/core/card_testing_guard/utils.rs
Public functions: 3
use error_stack::ResultExt;
use hyperswitch_domain_models::{
card_testing_guard_data::CardTestingGuardData, router_request_types::BrowserInformation,
};
use masking::{PeekInterface, Secret};
use router_env::logger;
use super::errors;
us... | crates/router/src/core/card_testing_guard/utils.rs | router | full_file | 1,346 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl UserRole {
fn check_user_in_lineage(
tenant_id: id_type::TenantId,
org_id: Option<id_type::OrganizationId>,
merchant_id: Option<id_type::MerchantId>,
profile_id: Option<id_type::ProfileId>,
) -> Box<
dyn diesel::BoxableExpression<<Self as HasTable>::Table, Pg, SqlTyp... | crates/diesel_models/src/query/user_role.rs | diesel_models | impl_block | 2,368 | rust | null | UserRole | null | impl UserRole | null | null | null | null | null | null | null | null |
/// get_surcharge_dsk_key
pub fn get_surcharge_dsk_key(&self) -> String {
format!("surcharge_dsl_{}", self.get_string_repr())
} | crates/common_utils/src/id_type/merchant.rs | common_utils | function_signature | 39 | rust | null | null | null | null | get_surcharge_dsk_key | null | null | null | null | null | null | null |
pub struct TokenizationNew {
pub id: common_utils::id_type::GlobalTokenId,
pub merchant_id: common_utils::id_type::MerchantId,
pub customer_id: common_utils::id_type::GlobalCustomerId,
pub locker_id: String,
pub flag: common_enums::TokenizationFlag,
pub version: common_enums::ApiVersion,
} | crates/hyperswitch_domain_models/src/tokenization.rs | hyperswitch_domain_models | struct_definition | 79 | rust | TokenizationNew | null | null | null | null | null | null | null | null | null | null | null |
impl SerializableSecret for u8 {} | crates/masking/src/serde.rs | masking | impl_block | 7 | rust | null | u8 | SerializableSecret for | impl SerializableSecret for for u8 | null | null | null | null | null | null | null | null |
impl DefendDispute for Adyen {} | crates/hyperswitch_connectors/src/connectors/adyen.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Adyen | DefendDispute for | impl DefendDispute for for Adyen | null | null | null | null | null | null | null | null |
pub fn generate_authorization_signature(
&self,
auth: fiserv::FiservAuthType,
request_id: &str,
payload: &str,
timestamp: i128,
) -> CustomResult<String, errors::ConnectorError> {
let fiserv::FiservAuthType {
api_key,
api_secret,
..... | crates/hyperswitch_connectors/src/connectors/fiserv.rs | hyperswitch_connectors | function_signature | 170 | rust | null | null | null | null | generate_authorization_signature | null | null | null | null | null | null | null |
pub fn get_payment_merchant_connector_account_id_using_account_reference_id(
&self,
account_reference_id: String,
) -> Option<id_type::MerchantConnectorAccountId> {
self.feature_metadata.as_ref().and_then(|metadata| {
metadata.revenue_recovery.as_ref().and_then(|recovery| {
... | crates/hyperswitch_domain_models/src/merchant_connector_account.rs | hyperswitch_domain_models | function_signature | 100 | rust | null | null | null | null | get_payment_merchant_connector_account_id_using_account_reference_id | null | null | null | null | null | null | null |
pub async fn list_initial_attempts_by_profile_id_primary_object_id(
conn: &PgPooledConn,
profile_id: &common_utils::id_type::ProfileId,
primary_object_id: &str,
) -> StorageResult<Vec<Self>> {
generics::generic_filter::<<Self as HasTable>::Table, _, _, _>(
conn,
... | crates/diesel_models/src/query/events.rs | diesel_models | function_signature | 155 | rust | null | null | null | null | list_initial_attempts_by_profile_id_primary_object_id | null | null | null | null | null | null | null |
impl api::PaymentSession for Bamboraapac {} | crates/hyperswitch_connectors/src/connectors/bamboraapac.rs | hyperswitch_connectors | impl_block | 12 | rust | null | Bamboraapac | api::PaymentSession for | impl api::PaymentSession for for Bamboraapac | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Hyperwallet {} | crates/hyperswitch_connectors/src/connectors/hyperwallet.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Hyperwallet | api::PaymentVoid for | impl api::PaymentVoid for for Hyperwallet | null | null | null | null | null | null | null | null |
pub struct PaypalSetupMandatesResponse {
id: String,
customer: Customer,
payment_source: ZeroMandateSourceItem,
links: Vec<PaypalLinks>,
} | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | struct_definition | 40 | rust | PaypalSetupMandatesResponse | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.AuthenticationSyncResponse
{
"type": "object",
"required": [
"authentication_id",
"merchant_id",
"status",
"amount",
"currency",
"created_at",
"profile_id"
],
"properties": {
"authentication_id": {
"type": "string",
"description"... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 1,443 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"AuthenticationSyncResponse"
] | null | null | null | null |
File: crates/router_derive/src/macros/api_error/helpers.rs
use proc_macro2::TokenStream;
use quote::ToTokens;
use syn::{
parse::Parse, spanned::Spanned, DeriveInput, Field, Fields, LitStr, Token, TypePath, Variant,
};
use crate::macros::helpers::{get_metadata_inner, occurrence_error};
mod keyword {
use syn::... | crates/router_derive/src/macros/api_error/helpers.rs | router_derive | full_file | 1,840 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/drainer/src/errors.rs
use redis_interface as redis;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum DrainerError {
#[error("Error in parsing config : {0}")]
ConfigParsingError(String),
#[error("Error during redis operation : {0:?}")]
RedisError(error_stack::Report<redis::errors::Re... | crates/drainer/src/errors.rs | drainer | full_file | 455 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Stax {} | crates/hyperswitch_connectors/src/connectors/stax.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Stax | api::PaymentSync for | impl api::PaymentSync for for Stax | null | null | null | null | null | null | null | null |
impl api::MandateSetup for UnifiedAuthenticationService {} | crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs | hyperswitch_connectors | impl_block | 12 | rust | null | UnifiedAuthenticationService | api::MandateSetup for | impl api::MandateSetup for for UnifiedAuthenticationService | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs
Public structs: 17
use common_utils::{pii, types::MinorUnit};
use crate::{
payment_address::PaymentAddress,
payment_method_data::ApplePayFlow,
router_data::{
AccessToken, ConnectorResponseData, PaymentMethodBalance, Pa... | crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs | hyperswitch_domain_models | full_file | 1,793 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::MandateSetup for Paytm {} | crates/hyperswitch_connectors/src/connectors/paytm.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Paytm | api::MandateSetup for | impl api::MandateSetup for for Paytm | null | null | null | null | null | null | null | null |
pub async fn unlink_routing_config(
state: SessionState,
merchant_context: domain::MerchantContext,
request: routing_types::RoutingConfigRequest,
authentication_profile_id: Option<common_utils::id_type::ProfileId>,
transaction_type: enums::TransactionType,
) -> RouterResponse<routing_types::RoutingD... | crates/router/src/core/routing.rs | router | function_signature | 678 | rust | null | null | null | null | unlink_routing_config | null | null | null | null | null | null | null |
impl api::PaymentCapture for Nexixpay {} | crates/hyperswitch_connectors/src/connectors/nexixpay.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Nexixpay | api::PaymentCapture for | impl api::PaymentCapture for for Nexixpay | null | null | null | null | null | null | null | null |
pub async fn generic_user_roles_list_for_org_and_extra(
conn: &PgPooledConn,
user_id: Option<String>,
tenant_id: id_type::TenantId,
org_id: id_type::OrganizationId,
merchant_id: Option<id_type::MerchantId>,
profile_id: Option<id_type::ProfileId>,
version: Option<U... | crates/diesel_models/src/query/user_role.rs | diesel_models | function_signature | 391 | rust | null | null | null | null | generic_user_roles_list_for_org_and_extra | null | null | null | null | null | null | null |
impl GetCaptureMethod for PaymentsSyncData {
fn get_capture_method(&self) -> Option<enums::CaptureMethod> {
self.capture_method
}
} | crates/hyperswitch_connectors/src/connectors/aci/transformers.rs | hyperswitch_connectors | impl_block | 34 | rust | null | PaymentsSyncData | GetCaptureMethod for | impl GetCaptureMethod for for PaymentsSyncData | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Archipel {} | crates/hyperswitch_connectors/src/connectors/archipel.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Archipel | api::RefundExecute for | impl api::RefundExecute for for Archipel | null | null | null | null | null | null | null | null |
/// Take ownership of a secret value
pub fn new(secret: Secret) -> Self {
Self {
inner_secret: secret,
masking_strategy: PhantomData,
}
} | crates/masking/src/strong_secret.rs | masking | function_signature | 39 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub struct PaymentVoidRequest {
reference: String,
} | crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs | hyperswitch_connectors | struct_definition | 12 | rust | PaymentVoidRequest | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.BlikBankRedirectAdditionalData
{
"type": "object",
"properties": {
"blik_code": {
"type": "string",
"example": "3GD9MO",
"nullable": true
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 63 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"BlikBankRedirectAdditionalData"
] | null | null | null | null |
File: crates/router_derive/src/macros/api_error.rs
Public functions: 3
mod helpers;
use std::collections::HashMap;
use proc_macro2::TokenStream;
use quote::quote;
use syn::{
punctuated::Punctuated, token::Comma, Data, DeriveInput, Fields, Ident, ImplGenerics,
TypeGenerics, Variant, WhereClause,
};
use crat... | crates/router_derive/src/macros/api_error.rs | router_derive | full_file | 2,080 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct Address {
line1: Option<Secret<String>>,
line2: Option<Secret<String>>,
zip: Option<Secret<String>>,
state: Option<Secret<String>>,
city: Option<String>,
country: Option<api_models::enums::CountryAlpha2>,
} | crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs | hyperswitch_connectors | struct_definition | 59 | rust | Address | null | null | null | null | null | null | null | null | null | null | null |
pub struct ChargebeeInvoiceBillingAddress {
pub line1: Option<Secret<String>>,
pub line2: Option<Secret<String>>,
pub line3: Option<Secret<String>>,
pub state: Option<Secret<String>>,
pub country: Option<enums::CountryAlpha2>,
pub zip: Option<Secret<String>>,
pub city: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs | hyperswitch_connectors | struct_definition | 76 | rust | ChargebeeInvoiceBillingAddress | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_domain_models/src/router_data.rs
Public functions: 7
Public structs: 20
use std::{collections::HashMap, marker::PhantomData};
use common_types::{payments as common_payment_types, primitive_wrappers};
use common_utils::{
errors::IntegrityCheckError,
ext_traits::{OptionExt, ValueExt},... | crates/hyperswitch_domain_models/src/router_data.rs#chunk0 | hyperswitch_domain_models | chunk | 8,192 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn server(state: AppState) -> Scope {
let mut route = web::scope("/payments").app_data(web::Data::new(state));
#[cfg(feature = "olap")]
{
route = route
.service(
web::resource("/list")
.route(web::get().to(payments::pay... | crates/router/src/routes/app.rs | router | function_signature | 1,212 | rust | null | null | null | null | server | null | null | null | null | null | null | null |
pub fn get_payment_method_create_from_payment_method_migrate(
card_number: CardNumber,
payment_method_migrate: &PaymentMethodMigrate,
) -> Self {
let card_details =
payment_method_migrate
.card
.as_ref()
.map(|payment_method_migrate... | crates/api_models/src/payment_methods.rs | api_models | function_signature | 435 | rust | null | null | null | null | get_payment_method_create_from_payment_method_migrate | 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.