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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
File: crates/diesel_models/src/gsm.rs
Public structs: 4
//! Gateway status mapping
use common_enums::ErrorCategory;
use common_utils::{
custom_serde,
events::{ApiEventMetric, ApiEventsType},
};
use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
use time::PrimitiveDateTime;
use crate:... | crates/diesel_models/src/gsm.rs | diesel_models | full_file | 997 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl IncomingWebhook for Zen {
fn get_webhook_source_verification_algorithm(
&self,
_request: &IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn crypto::VerifySignature + Send>, errors::ConnectorError> {
Ok(Box::new(crypto::Sha256))
}
fn get_webhook_source_verificatio... | crates/hyperswitch_connectors/src/connectors/zen.rs | hyperswitch_connectors | impl_block | 1,267 | rust | null | Zen | IncomingWebhook for | impl IncomingWebhook for for Zen | null | null | null | null | null | null | null | null |
pub fn payments_connector_session() {} | crates/openapi/src/routes/payments.rs | openapi | function_signature | 7 | rust | null | null | null | null | payments_connector_session | null | null | null | null | null | null | null |
pub async fn list_enabled_by_profile_id(
conn: &PgPooledConn,
profile_id: &common_utils::id_type::ProfileId,
connector_type: common_enums::ConnectorType,
) -> StorageResult<Vec<Self>> {
generics::generic_filter::<<Self as HasTable>::Table, _, _, _>(
conn,
dsl:... | crates/diesel_models/src/query/merchant_connector_account.rs | diesel_models | function_signature | 134 | rust | null | null | null | null | list_enabled_by_profile_id | null | null | null | null | null | null | null |
pub struct VerifyWebhookSourceResponseData {
pub verify_webhook_status: VerifyWebhookStatus,
} | crates/hyperswitch_domain_models/src/router_response_types.rs | hyperswitch_domain_models | struct_definition | 22 | rust | VerifyWebhookSourceResponseData | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentToken for Phonepe {} | crates/hyperswitch_connectors/src/connectors/phonepe.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Phonepe | api::PaymentToken for | impl api::PaymentToken for for Phonepe | null | null | null | null | null | null | null | null |
pub fn is_ephemeral_auth<A: SessionStateInfo + Sync + Send>(
headers: &HeaderMap,
api_auth: ApiKeyAuth,
) -> RouterResult<Box<dyn AuthenticateAndFetch<AuthenticationData, A>>> {
let api_key = get_api_key(headers)?;
if !api_key.starts_with("epk") {
Ok(Box::new(HeaderAuth(api_auth)))
} else {... | crates/router/src/services/authentication.rs | router | function_signature | 100 | rust | null | null | null | null | is_ephemeral_auth | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/silverflow.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)]
struct SilverflowTe... | crates/router/tests/connectors/silverflow.rs | router | full_file | 2,926 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct NuveiSessionResponse {
pub session_token: Secret<String>,
pub internal_request_id: i64,
pub status: String,
pub err_code: i64,
pub reason: String,
pub merchant_id: Secret<String>,
pub merchant_site_id: Secret<String>,
pub version: String,
pub client_request_id: String,
} | crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs | hyperswitch_connectors | struct_definition | 79 | rust | NuveiSessionResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct NexixpayPreProcessingRequest {
operation_id: Option<String>,
three_d_s_auth_response: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs | hyperswitch_connectors | struct_definition | 29 | rust | NexixpayPreProcessingRequest | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.Wallet
{
"oneOf": [
{
"type": "object",
"required": [
"paypal"
],
"properties": {
"paypal": {
"$ref": "#/components/schemas/Paypal"
}
}
},
{
"type": "object",
"required": [
"venmo"
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 121 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"Wallet"
] | null | null | null | null |
pub trait UniqueConstraints {
fn unique_constraints(&self) -> Vec<String>;
fn table_name(&self) -> &str;
async fn check_for_constraints(
&self,
redis_conn: &Arc<RedisConnectionPool>,
) -> CustomResult<(), RedisError> {
let constraints = self.unique_constraints();
let sadd... | crates/storage_impl/src/lib.rs | storage_impl | trait_definition | 145 | rust | null | null | UniqueConstraints | null | null | null | null | null | null | null | null | null |
pub fn update_enabled_features(&mut self, feature_to_enable: DynamicRoutingFeatures) {
self.enabled_feature = feature_to_enable
} | crates/api_models/src/routing.rs | api_models | function_signature | 29 | rust | null | null | null | null | update_enabled_features | null | null | null | null | null | null | null |
pub struct PaysafeCard {
pub card_num: CardNumber,
pub card_expiry: PaysafeCardExpiry,
#[serde(skip_serializing_if = "Option::is_none")]
pub cvv: Option<Secret<String>>,
pub holder_name: Option<Secret<String>>,
} | crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs | hyperswitch_connectors | struct_definition | 60 | rust | PaysafeCard | null | null | null | null | null | null | null | null | null | null | null |
- **connector:** [Fiuu] log keys in the PSync response ([#7189](https://github.com/juspay/hyperswitch/pull/7189)) ([`c044fff`](https://github.com/juspay/hyperswitch/commit/c044ffff0c47ee5d3ef5f905c3f590fae4ac9a24))
- **connectors:** [fiuu] update pm_filters for apple pay and google pay ([#7182](https://github.com/jusp... | CHANGELOG.md#chunk14 | null | doc_chunk | 8,175 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/openapi/src/routes/routing.rs
Public functions: 20
#[cfg(feature = "v1")]
/// Routing - Create
///
/// Create a routing config
#[utoipa::path(
post,
path = "/routing",
request_body = RoutingConfigRequest,
responses(
(status = 200, description = "Routing config created", body = Rou... | crates/openapi/src/routes/routing.rs | openapi | full_file | 4,197 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn switch_profile_for_user_in_org_and_merchant(
state: web::Data<AppState>,
http_req: HttpRequest,
json_payload: web::Json<user_api::SwitchProfileRequest>,
) -> HttpResponse {
let flow = Flow::SwitchProfile;
Box::pin(api::server_wrap(
flow,
state.clone(),
&http_req,... | crates/router/src/routes/user.rs | router | function_signature | 142 | rust | null | null | null | null | switch_profile_for_user_in_org_and_merchant | null | null | null | null | null | null | null |
pub struct AuthToken {
pub user_id: String,
pub merchant_id: id_type::MerchantId,
pub role_id: String,
pub exp: u64,
pub org_id: id_type::OrganizationId,
pub profile_id: id_type::ProfileId,
pub tenant_id: Option<id_type::TenantId>,
} | crates/router/src/services/authentication.rs | router | struct_definition | 74 | rust | AuthToken | null | null | null | null | null | null | null | null | null | null | null |
pub async fn find_by_fingerprint_id(
conn: &PgPooledConn,
fingerprint_id: &str,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
conn,
dsl::locker_fingerprint_id.eq(fingerprint_id.to_owned()),
)
.await
} | crates/diesel_models/src/query/payment_method.rs | diesel_models | function_signature | 77 | rust | null | null | null | null | find_by_fingerprint_id | null | null | null | null | null | null | null |
impl common_utils::events::ApiEventMetric for GetTokenDataRequest {} | crates/api_models/src/payment_methods.rs | api_models | impl_block | 15 | rust | null | GetTokenDataRequest | common_utils::events::ApiEventMetric for | impl common_utils::events::ApiEventMetric for for GetTokenDataRequest | null | null | null | null | null | null | null | null |
pub struct OutgoingWebhookEvent {
tenant_id: common_utils::id_type::TenantId,
merchant_id: common_utils::id_type::MerchantId,
event_id: String,
event_type: OutgoingWebhookEventType,
#[serde(flatten)]
content: Option<OutgoingWebhookEventContent>,
is_error: bool,
error: Option<Value>,
... | crates/router/src/events/outgoing_webhook_logs.rs | router | struct_definition | 119 | rust | OutgoingWebhookEvent | null | null | null | null | null | null | null | null | null | null | null |
pub struct ArchipelTenantId(pub String); | crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs | hyperswitch_connectors | struct_definition | 9 | rust | ArchipelTenantId | null | null | null | null | null | null | null | null | null | null | null |
pub struct ProphetpayVoidRequest {
pub transaction_id: String,
pub profile: Secret<String>,
pub ref_info: String,
pub inquiry_reference: String,
pub action_type: i8,
} | crates/hyperswitch_connectors/src/connectors/prophetpay/transformers.rs | hyperswitch_connectors | struct_definition | 44 | rust | ProphetpayVoidRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/core/webhooks/network_tokenization_incoming.rs
Public functions: 8
Public structs: 2
use std::str::FromStr;
use ::payment_methods::controller::PaymentMethodsController;
use api_models::webhooks::WebhookResponseTracker;
use async_trait::async_trait;
use common_utils::{
crypto::Encryptable... | crates/router/src/core/webhooks/network_tokenization_incoming.rs | router | full_file | 3,427 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct L2L3Data {
pub order_date: Option<time::PrimitiveDateTime>,
pub tax_status: Option<common_enums::TaxStatus>,
pub customer_tax_registration_id: Option<Secret<String>>,
pub order_details: Option<Vec<api_models::payments::OrderDetailsWithAmount>>,
pub discount_amount: Option<MinorUnit>,
... | crates/hyperswitch_domain_models/src/router_data.rs | hyperswitch_domain_models | struct_definition | 207 | rust | L2L3Data | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v2/payment-methods/payment-method--create-intent.mdx
# Type: Doc File
---
openapi: post /v2/payment-methods/create-intent
--- | api-reference/v2/payment-methods/payment-method--create-intent.mdx | null | doc_file | 40 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardInfoUpdateRequest {
pub card_iin: String,
pub card_issuer: Option<String>,
pub card_network: Option<enums::CardNetwork>,
pub card_type: Option<String>,
pub card_subtype: Option<String>,
pub card_issuing_country: Option<String>,
pub bank_code_id: Option<String>,
pub bank_co... | crates/api_models/src/cards_info.rs | api_models | struct_definition | 108 | rust | CardInfoUpdateRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct ReportRequest {
pub time_range: TimeRange,
pub emails: Option<Vec<Secret<String, EmailStrategy>>>,
} | crates/api_models/src/analytics.rs | api_models | struct_definition | 28 | rust | ReportRequest | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/src/types/api/verify_connector.rs
Public structs: 1
pub mod paypal;
pub mod stripe;
use error_stack::ResultExt;
use crate::{
consts,
core::errors,
services::{
self,
connector_integration_interface::{BoxedConnectorIntegrationInterface, ConnectorEnum},
},
types::... | crates/router/src/types/api/verify_connector.rs | router | full_file | 1,632 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl FilteredPaymentMethodsEnabled {
fn merge_and_transform(self) -> MergedEnabledPaymentMethodTypes {
let values = self
.0
.into_iter()
// BTreeMap used to ensure soretd response, otherwise the response is arbitrarily ordered
.fold(BTreeMap::new(), |mut acc, ... | crates/router/src/core/payments/payment_methods.rs | router | impl_block | 284 | rust | null | FilteredPaymentMethodsEnabled | null | impl FilteredPaymentMethodsEnabled | null | null | null | null | null | null | null | null |
/// Generate a key for pm_auth
pub fn get_pm_auth_key(&self) -> String {
format!("pm_auth_{}", self.get_string_repr())
} | crates/common_utils/src/id_type/payment.rs | common_utils | function_signature | 35 | rust | null | null | null | null | get_pm_auth_key | null | null | null | null | null | null | null |
impl MandateSetup for Riskified {} | crates/hyperswitch_connectors/src/connectors/riskified.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Riskified | MandateSetup for | impl MandateSetup for for Riskified | null | null | null | null | null | null | null | null |
pub struct ProcessingInformation {
action_list: Option<Vec<BankOfAmericaActionsList>>,
action_token_types: Option<Vec<BankOfAmericaActionsTokenType>>,
authorization_options: Option<BankOfAmericaAuthorizationOptions>,
commerce_indicator: String,
capture: Option<bool>,
capture_options: Option<Capt... | crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs | hyperswitch_connectors | struct_definition | 73 | rust | ProcessingInformation | null | null | null | null | null | null | null | null | null | null | null |
pub struct ApiKeyNew {
pub key_id: common_utils::id_type::ApiKeyId,
pub merchant_id: common_utils::id_type::MerchantId,
pub name: String,
pub description: Option<String>,
pub hashed_api_key: HashedApiKey,
pub prefix: String,
pub created_at: PrimitiveDateTime,
pub expires_at: Option<Primi... | crates/diesel_models/src/api_keys.rs | diesel_models | struct_definition | 92 | rust | ApiKeyNew | null | null | null | null | null | null | null | null | null | null | null |
pub struct CoBadgedCardDataToBeSaved {
pub co_badged_card_networks: Vec<common_enums::CardNetwork>,
pub issuer_country_code: common_enums::CountryAlpha2,
pub is_regulated: bool,
pub regulated_name: Option<common_enums::RegulatedName>,
} | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 67 | rust | CoBadgedCardDataToBeSaved | null | null | null | null | null | null | null | null | null | null | null |
pub struct RefundResponse {
refund_id: String,
refund_status: RefundStatus,
} | crates/hyperswitch_connectors/src/connectors/moneris/transformers.rs | hyperswitch_connectors | struct_definition | 21 | rust | RefundResponse | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSync for Trustpayments {} | crates/hyperswitch_connectors/src/connectors/trustpayments.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Trustpayments | api::PaymentSync for | impl api::PaymentSync for for Trustpayments | null | null | null | null | null | null | null | null |
pub struct Context(HashMap<String, Option<ValueType>>); | crates/euclid/src/backend/interpreter/types.rs | euclid | struct_definition | 12 | rust | Context | null | null | null | null | null | null | null | null | null | null | null |
Web Documentation: Hyperswitch architecture | Hyperswitch
# Type: Web Doc
Hyperswitch comprises two distinct app services:
Router
and
Scheduler
which in turn consists of
Producer
and
Consumer
, where each service has its specific responsibilities to process payment-related tasks efficiently.
Router
The Router is the m... | https://docs.hyperswitch.io/learn-more/hyperswitch-architecture | null | web_doc_file | 727 | doc | null | null | null | null | null | web | null | null | null | https://docs.hyperswitch.io/learn-more/hyperswitch-architecture | Hyperswitch architecture | Hyperswitch | null |
File: crates/analytics/src/payments/metrics/sessionized_metrics/avg_ticket_size.rs
use std::collections::HashSet;
use api_models::analytics::{
payments::{PaymentDimensions, PaymentFilters, PaymentMetricsBucketIdentifier},
Granularity, TimeRange,
};
use common_utils::errors::ReportSwitchExt;
use diesel_models:... | crates/analytics/src/payments/metrics/sessionized_metrics/avg_ticket_size.rs | analytics | full_file | 1,028 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardDetails {
card_number: CardNumber,
expiry_month: Secret<String>,
expiry_year: Secret<String>,
verification: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs | hyperswitch_connectors | struct_definition | 33 | rust | CardDetails | null | null | null | null | null | null | null | null | null | null | null |
File: crates/storage_impl/src/lib.rs
Public functions: 7
Public structs: 1
use std::{fmt::Debug, sync::Arc};
use diesel_models as store;
use error_stack::ResultExt;
use hyperswitch_domain_models::{
behaviour::{Conversion, ReverseConversion},
merchant_key_store::MerchantKeyStore,
};
use masking::StrongSecret... | crates/storage_impl/src/lib.rs | storage_impl | full_file | 3,558 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/// set response status code
pub fn set_status_code(&mut self, code: u16) {
self.status_code = Some(code);
} | crates/hyperswitch_interfaces/src/events/routing_api_logs.rs | hyperswitch_interfaces | function_signature | 33 | rust | null | null | null | null | set_status_code | null | null | null | null | null | null | null |
Web Documentation: 3DS / Strong Customer Authentication | Hyperswitch
# Type: Web Doc
3D Secure (3DS) is a robust security protocol designed to prevent fraud in card-not-present transactions. By employing multi-factor authentication mechanisms such as biometrics or OTPs, 3DS helps issuers verify the authenticity of tr... | https://docs.hyperswitch.io/explore-hyperswitch/payment-orchestration/3ds-decision-manager | null | web_doc_file | 397 | doc | null | null | null | null | null | web | null | null | null | https://docs.hyperswitch.io/explore-hyperswitch/payment-orchestration/3ds-decision-manager | 3DS / Strong Customer Authentication | Hyperswitch | null |
pub struct NetworkTokenDataForVault {
pub network_token_data: payment_method_data::NetworkTokenData,
pub network_token_req_ref_id: String,
} | crates/hyperswitch_domain_models/src/payments.rs | hyperswitch_domain_models | struct_definition | 33 | rust | NetworkTokenDataForVault | null | null | null | null | null | null | null | null | null | null | null |
pub fn payments_post_session_tokens() {} | crates/openapi/src/routes/payments.rs | openapi | function_signature | 8 | rust | null | null | null | null | payments_post_session_tokens | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/hipay/transformers.rs
Public structs: 14
use std::collections::HashMap;
use common_enums::{enums, CardNetwork};
use common_utils::{
pii::{self},
request::Method,
types::StringMajorUnit,
};
use hyperswitch_domain_models::{
payment_method_data::Payment... | crates/hyperswitch_connectors/src/connectors/hipay/transformers.rs | hyperswitch_connectors | full_file | 6,331 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Affirm {} | crates/hyperswitch_connectors/src/connectors/affirm.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Affirm | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Affirm | null | null | null | null | null | null | null | null |
File: crates/analytics/src/refunds/distribution/sessionized_distribution.rs
mod refund_error_message;
mod refund_reason;
pub(super) use refund_error_message::RefundErrorMessage;
pub(super) use refund_reason::RefundReason;
pub use super::{RefundDistribution, RefundDistributionAnalytics, RefundDistributionRow};
| crates/analytics/src/refunds/distribution/sessionized_distribution.rs | analytics | full_file | 65 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorValidation for Archipel {
fn validate_mandate_payment(
&self,
pm_type: Option<enums::PaymentMethodType>,
pm_data: PaymentMethodData,
) -> CustomResult<(), errors::ConnectorError> {
let mandate_supported_pmd = std::collections::HashSet::from([PaymentMethodDataType::C... | crates/hyperswitch_connectors/src/connectors/archipel.rs | hyperswitch_connectors | impl_block | 95 | rust | null | Archipel | ConnectorValidation for | impl ConnectorValidation for for Archipel | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::PaymentLinkRetrieve;
let payload = json_payload.into_inner();
let api_auth = auth::ApiKeyAuth::default();
let (auth_type, _) =
match auth::check_client_secret_and_get_auth(req.headers(), &payload, api_auth) {
Ok(auth) => auth,
Err(err) =... | crates/router/src/routes/payment_link.rs | router | impl_block | 154 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub fn server(state: AppState) -> Scope {
let mut route = web::scope("/v2/payment-method-sessions").app_data(web::Data::new(state));
route = route.service(
web::resource("")
.route(web::post().to(payment_methods::payment_methods_session_create)),
);
route =
... | crates/router/src/routes/app.rs | router | function_signature | 254 | rust | null | null | null | null | server | null | null | null | null | null | null | null |
pub struct SantanderPix {
pub end_to_end_id: Secret<String>,
#[serde(rename = "txid")]
pub transaction_id: Secret<String>,
#[serde(rename = "valor")]
pub value: String,
#[serde(rename = "horario")]
pub time: String,
#[serde(rename = "infoPagador")]
pub info_payer: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/santander/transformers.rs | hyperswitch_connectors | struct_definition | 82 | rust | SantanderPix | null | null | null | null | null | null | null | null | null | null | null |
pub struct JuspaythreedsserverCard {
number: cards::CardNumber,
expiry_month: Secret<String>,
expiry_year: Secret<String>,
cvc: Secret<String>,
complete: bool,
} | crates/hyperswitch_connectors/src/connectors/juspaythreedsserver/transformers.rs | hyperswitch_connectors | struct_definition | 46 | rust | JuspaythreedsserverCard | null | null | null | null | null | null | null | null | null | null | null |
impl api::Payment for Paysafe {} | crates/hyperswitch_connectors/src/connectors/paysafe.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Paysafe | api::Payment for | impl api::Payment for for Paysafe | null | null | null | null | null | null | null | null |
impl GetAuthType for ApiKeyAuth {
fn get_auth_type(&self) -> detached::PayloadType {
detached::PayloadType::ApiKey
}
} | crates/router/src/services/authentication.rs | router | impl_block | 34 | rust | null | ApiKeyAuth | GetAuthType for | impl GetAuthType for for ApiKeyAuth | null | null | null | null | null | null | null | null |
pub async fn custom_revenue_recovery_core(
state: SessionState,
req_state: ReqState,
merchant_context: MerchantContext,
profile: domain::Profile,
request: api_models::payments::RecoveryPaymentsCreate,
) -> RouterResponse<payments_api::RecoveryPaymentsResponse> {
let store = state.store.as_ref();... | crates/router/src/core/revenue_recovery/api.rs | router | function_signature | 861 | rust | null | null | null | null | custom_revenue_recovery_core | null | null | null | null | null | null | null |
pub struct RoutingRetrieveLinkQueryWrapper {
pub routing_query: RoutingRetrieveQuery,
pub profile_id: common_utils::id_type::ProfileId,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 32 | rust | RoutingRetrieveLinkQueryWrapper | null | null | null | null | null | null | null | null | null | null | null |
pub struct RoleInfoResponseNew {
pub role_id: String,
pub role_name: String,
pub entity_type: EntityType,
pub groups: Vec<PermissionGroup>,
pub scope: RoleScope,
} | crates/api_models/src/user_role/role.rs | api_models | struct_definition | 45 | rust | RoleInfoResponseNew | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorRedirectResponse for Payme {
fn get_flow_type(
&self,
_query_params: &str,
_json_payload: Option<serde_json::Value>,
action: enums::PaymentAction,
) -> CustomResult<enums::CallConnectorAction, errors::ConnectorError> {
match action {
enums::Payme... | crates/hyperswitch_connectors/src/connectors/payme.rs | hyperswitch_connectors | impl_block | 118 | rust | null | Payme | ConnectorRedirectResponse for | impl ConnectorRedirectResponse for for Payme | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.CryptoResponse
{
"allOf": [
{
"allOf": [
{
"$ref": "#/components/schemas/CryptoData"
}
],
"nullable": true
},
{
"type": "object"
}
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 68 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CryptoResponse"
] | null | null | null | null |
pub async fn get_gsm_record(
state: &SessionState,
error_code: Option<String>,
error_message: Option<String>,
connector_name: Option<String>,
flow: &str,
) -> Option<hyperswitch_domain_models::gsm::GatewayStatusMap> {
let connector_name = connector_name.unwrap_or_default();
let get_gsm = || ... | crates/router/src/core/payouts/helpers.rs | router | function_signature | 349 | rust | null | null | null | null | get_gsm_record | null | null | null | null | null | null | null |
pub struct MerchantId(String); | crates/router/src/types/domain/user.rs | router | struct_definition | 6 | rust | MerchantId | null | null | null | null | null | null | null | null | null | null | null |
pub struct RefundsLedger {
pub amount: f64,
#[serde(rename = "assoc_transaction_id")]
pub associated_transaction_id: String, // Connector transaction id
#[serde(rename = "id")]
pub ledger_id: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/payload/responses.rs | hyperswitch_connectors | struct_definition | 55 | rust | RefundsLedger | null | null | null | null | null | null | null | null | null | null | null |
pub fn percentage(input: &str) -> ParseResult<&str, u8> {
error::context(
"volume_split_percentage",
combinator::map_res(
sequence::terminated(
complete::take_while_m_n(1, 2, |c: char| c.is_ascii_digit()),
complete::tag("%"),
),
|o:... | crates/euclid/src/frontend/ast/parser.rs | euclid | function_signature | 112 | rust | null | null | null | null | percentage | null | null | null | null | null | null | null |
pub struct AuthenticationConnectorData {
pub connector: ConnectorEnum,
pub connector_name: enums::AuthenticationConnectors,
} | crates/router/src/types/api/authentication.rs | router | struct_definition | 25 | rust | AuthenticationConnectorData | null | null | null | null | null | null | null | null | null | null | null |
pub struct SantanderWebhookBody {
pub message: MessageCode, // meaning of this enum variant is not clear
pub function: FunctionType, // event type of the webhook
pub payment_type: WebhookPaymentType,
pub issue_date: String,
pub payment_date: String,
pub bank_code: String,
pub payment_chann... | crates/hyperswitch_connectors/src/connectors/santander/transformers.rs | hyperswitch_connectors | struct_definition | 262 | rust | SantanderWebhookBody | null | null | null | null | null | null | null | null | null | null | null |
pub fn validate_dummy_connector_create(self, is_dummy_connector_enabled: bool) -> bool {
matches!(
self,
Self::DummyConnector1
| Self::DummyConnector2
| Self::DummyConnector3
| Self::DummyConnector4
| Self::DummyConnector5
... | crates/common_enums/src/connector_enums.rs | common_enums | function_signature | 90 | rust | null | null | null | null | validate_dummy_connector_create | null | null | null | null | null | null | null |
pub fn transform_to_sql_values(&mut self, values: &[impl ToSql<T>]) -> QueryResult<String> {
let res = values
.iter()
.map(|i| i.to_sql(&self.table_engine))
.collect::<error_stack::Result<Vec<String>, ParsingError>>()
.change_context(QueryBuildingError::SqlSeriali... | crates/analytics/src/query.rs | analytics | function_signature | 101 | rust | null | null | null | null | transform_to_sql_values | null | null | null | null | null | null | null |
pub async fn check_if_profile_id_is_present_in_payment_intent(
payment_id: PaymentId,
state: &SessionState,
auth_data: &AuthenticationData,
) -> CustomResult<(), errors::ApiErrorResponse> {
todo!()
} | crates/router/src/core/verification/utils.rs | router | function_signature | 51 | rust | null | null | null | null | check_if_profile_id_is_present_in_payment_intent | null | null | null | null | null | null | null |
pub struct MandateDetails {
#[serde(rename = "type")]
pub res_type: String,
pub alias: String,
pub expiry_month: Secret<String>,
pub expiry_year: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs | hyperswitch_connectors | struct_definition | 44 | rust | MandateDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayboxRsyncRequest {
#[serde(rename = "DATEQ")]
pub date: String,
#[serde(rename = "TYPE")]
pub transaction_type: String,
#[serde(rename = "NUMQUESTION")]
pub paybox_request_number: String,
#[serde(rename = "VERSION")]
pub version: String,
#[serde(rename = "SITE")]
... | crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs | hyperswitch_connectors | struct_definition | 156 | rust | PayboxRsyncRequest | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PaymentsRequest
{
"type": "object",
"properties": {
"amount": {
"type": "integer",
"format": "int64",
"description": "The primary amount for the payment, provided in the lowest denomination of the specified currency (e.g., 6540 for $65.40 USD). This field... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 4,443 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PaymentsRequest"
] | null | null | null | null |
impl ConnectorCommon for Thunes {
fn id(&self) -> &'static str {
"thunes"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Base
// TODO! Check connector documentation, on which unit they are processing the currency.
// If the connector accepts am... | crates/hyperswitch_connectors/src/connectors/thunes.rs | hyperswitch_connectors | impl_block | 460 | rust | null | Thunes | ConnectorCommon for | impl ConnectorCommon for for Thunes | null | null | null | null | null | null | null | null |
pub struct HyperswitchVaultCustomerCreateResponse {
id: String,
} | crates/hyperswitch_connectors/src/connectors/hyperswitch_vault/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | HyperswitchVaultCustomerCreateResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct NovalnetMandate {
token: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs | hyperswitch_connectors | struct_definition | 16 | rust | NovalnetMandate | null | null | null | null | null | null | null | null | null | null | null |
pub struct BarclaycardRefundRequest {
order_information: OrderInformation,
client_reference_information: ClientReferenceInformation,
} | crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | BarclaycardRefundRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn generate_external_token(
state: SessionState,
user: authentication::UserFromToken,
external_service_type: ExternalServiceType,
) -> RouterResponse<external_service_auth_api::ExternalTokenResponse> {
let token = ExternalToken::new_token(
user.user_id.clone(),
user.merchant_id... | crates/router/src/core/external_service_auth.rs | router | function_signature | 186 | rust | null | null | null | null | generate_external_token | null | null | null | null | null | null | null |
impl api::PaymentSession for Custombilling {} | crates/hyperswitch_connectors/src/connectors/custombilling.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Custombilling | api::PaymentSession for | impl api::PaymentSession for for Custombilling | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Ebanx {} | crates/hyperswitch_connectors/src/connectors/ebanx.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Ebanx | api::RefundExecute for | impl api::RefundExecute for for Ebanx | null | null | null | null | null | null | null | null |
impl Fiservemea {
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMajorUnitForConnector,
}
}
pub fn generate_authorization_signature(
&self,
auth: fiservemea::FiservemeaAuthType,
request_id: &str,
payload: &str,
timestamp:... | crates/hyperswitch_connectors/src/connectors/fiservemea.rs | hyperswitch_connectors | impl_block | 214 | rust | null | Fiservemea | null | impl Fiservemea | null | null | null | null | null | null | null | null |
pub struct DisputedAmountAccumulator {
pub total: Option<i64>,
} | crates/analytics/src/disputes/accumulators.rs | analytics | struct_definition | 19 | rust | DisputedAmountAccumulator | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v1/api-key/api-key--retrieve.mdx
# Type: Doc File
---
openapi: get /api_keys/{merchant_id}/{key_id}
--- | api-reference/v1/api-key/api-key--retrieve.mdx | null | doc_file | 37 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorResponseNew {
#[instrument(skip(conn))]
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<ConnectorResponse> {
let payment_attempt_update = PaymentAttemptUpdate::ConnectorResponse {
authentication_data: self.authentication_data.clone(),
encoded_data: s... | crates/diesel_models/src/query/connector_response.rs | diesel_models | impl_block | 257 | rust | null | ConnectorResponseNew | null | impl ConnectorResponseNew | null | null | null | null | null | null | null | null |
pub async fn authentication_sync_post_update(
state: web::Data<app::AppState>,
req: HttpRequest,
path: web::Path<(
common_utils::id_type::MerchantId,
common_utils::id_type::AuthenticationId,
) | crates/router/src/routes/authentication.rs | router | function_signature | 54 | rust | null | null | null | null | authentication_sync_post_update | null | null | null | null | null | null | null |
impl OrganizationId {
/// Get an organization id from String
pub fn try_from_string(org_id: String) -> CustomResult<Self, ValidationError> {
Self::try_from(std::borrow::Cow::from(org_id))
}
} | crates/common_utils/src/id_type/organization.rs | common_utils | impl_block | 50 | rust | null | OrganizationId | null | impl OrganizationId | null | null | null | null | null | null | null | null |
pub struct PaymentRedirectCompleteAuthorize; | crates/router/src/core/payments.rs | router | struct_definition | 7 | rust | PaymentRedirectCompleteAuthorize | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/ebanx.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use api_models::webhooks::{IncomingWebhookEvent, ObjectReferenceId};
#[cfg(feature = "payouts")]
use common_utils::request::RequestContent;
#[cfg(feature = "payouts")]
use common_utils::request::{... | crates/hyperswitch_connectors/src/connectors/ebanx.rs | hyperswitch_connectors | full_file | 3,805 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl UserErrors {
pub fn get_error_message(&self) -> String {
match self {
Self::InternalServerError => "Something went wrong".to_string(),
Self::InvalidCredentials => "Incorrect email or password".to_string(),
Self::UserNotFound => "Email doesn’t exist. Register".to_stri... | crates/router/src/core/errors/user.rs | router | impl_block | 956 | rust | null | UserErrors | null | impl UserErrors | null | null | null | null | null | null | null | null |
pub fn build_generic_expired_link_html(
link_data: &GenericExpiredLinkData,
) -> CustomResult<String, errors::ApiErrorResponse> {
let mut tera = Tera::default();
let mut context = Context::new();
// Build HTML
let html_template = include_str!("../../core/generic_link/expired_link/index.html").to_st... | crates/router/src/services/api/generic_link_response.rs | router | function_signature | 166 | rust | null | null | null | null | build_generic_expired_link_html | null | null | null | null | null | null | null |
Documentation: api-reference/README.md
# Type: Doc File
# Api Reference
We use the [openapi specification](https://swagger.io/specification) for the api reference. The openapi file is generated from the code base [openapi_spec_v1.json](v1/openapi_spec_v1.json).
## How to generate the file
This file is automatically... | api-reference/README.md | null | doc_file | 391 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct SubMerchant {
pub city: String,
pub name: Secret<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
pub postal_code: Secret<String>,
pub merchant_id: Secret<String>,
pub country_code: String,
pub street: Secret<String>,
#[serde(skip_seria... | crates/hyperswitch_connectors/src/connectors/worldpay/requests.rs | hyperswitch_connectors | struct_definition | 92 | rust | SubMerchant | null | null | null | null | null | null | null | null | null | null | null |
pub async fn find_by_merchant_id(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
get_disabled: bool,
) -> StorageResult<Vec<Self>> {
if get_disabled {
generics::generic_filter::<<Self as HasTable>::Table, _, _, _>(
conn,
... | crates/diesel_models/src/query/merchant_connector_account.rs | diesel_models | function_signature | 197 | rust | null | null | null | null | find_by_merchant_id | null | null | null | null | null | null | null |
impl api::Refund for Mollie {} | crates/hyperswitch_connectors/src/connectors/mollie.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Mollie | api::Refund for | impl api::Refund for for Mollie | null | null | null | null | null | null | null | null |
impl api::PaymentSession for Aci {} | crates/hyperswitch_connectors/src/connectors/aci.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Aci | api::PaymentSession for | impl api::PaymentSession for for Aci | null | null | null | null | null | null | null | null |
pub async fn update(
conn: &PgPooledConn,
connector: String,
flow: String,
sub_flow: String,
code: String,
message: String,
gsm: GatewayStatusMappingUpdate,
) -> StorageResult<Self> {
generics::generic_update_with_results::<
<Self as HasTab... | crates/diesel_models/src/query/gsm.rs | diesel_models | function_signature | 202 | rust | null | null | null | null | update | null | null | null | null | null | null | null |
impl PaymentVoid for Payone {} | crates/hyperswitch_connectors/src/connectors/payone.rs | hyperswitch_connectors | impl_block | 7 | rust | null | Payone | PaymentVoid for | impl PaymentVoid for for Payone | null | null | null | null | null | null | null | null |
pub struct PaymePaySaleResponse {
sale_status: SaleStatus,
payme_sale_id: String,
payme_transaction_id: Option<String>,
buyer_key: Option<Secret<String>>,
status_error_details: Option<String>,
status_error_code: Option<u32>,
sale_3ds: Option<bool>,
redirect_url: Option<Url>,
} | crates/hyperswitch_connectors/src/connectors/payme/transformers.rs | hyperswitch_connectors | struct_definition | 77 | rust | PaymePaySaleResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct PoCreate; | crates/hyperswitch_domain_models/src/router_flow_types/payouts.rs | hyperswitch_domain_models | struct_definition | 5 | rust | PoCreate | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_auth_type_and_flow<A: SessionStateInfo + Sync + Send>(
headers: &HeaderMap,
api_auth: ApiKeyAuth,
) -> RouterResult<(
Box<dyn AuthenticateAndFetch<AuthenticationData, A>>,
api::AuthFlow,
)> {
let api_key = get_api_key(headers)?;
if api_key.starts_with("pk_") {
return Ok((
... | crates/router/src/services/authentication.rs | router | function_signature | 129 | rust | null | null | null | null | get_auth_type_and_flow | 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.