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 JpmorganRefundResponse {
pub transaction_id: Option<String>,
pub request_id: String,
pub transaction_state: JpmorganTransactionState,
pub amount: MinorUnit,
pub currency: common_enums::Currency,
pub response_status: JpmorganResponseStatus,
pub response_code: String,
pub respon... | crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs | hyperswitch_connectors | struct_definition | 99 | rust | JpmorganRefundResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn extended_card_info_toggle(
state: SessionState,
merchant_id: &id_type::MerchantId,
profile_id: &id_type::ProfileId,
ext_card_info_choice: admin_types::ExtendedCardInfoChoice,
) -> RouterResponse<admin_types::ExtendedCardInfoChoice> {
let db = state.store.as_ref();
let key_manager_st... | crates/router/src/core/admin.rs | router | function_signature | 376 | rust | null | null | null | null | extended_card_info_toggle | null | null | null | null | null | null | null |
impl Responder {
// safety: This shouldn't panic owing to the data type
#[allow(clippy::expect_used)]
let payload = json_payload
.into_inner()
.to_vec()
.pop()
.expect("Couldn't get GetApiEventMetricRequest");
let flow = AnalyticsFlow::GetA... | crates/router/src/analytics.rs | router | impl_block | 192 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
impl api::RefundSync for Chargebee {} | crates/hyperswitch_connectors/src/connectors/chargebee.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Chargebee | api::RefundSync for | impl api::RefundSync for for Chargebee | null | null | null | null | null | null | null | null |
pub struct UploadFileResponse {
pub provider_file_id: String,
} | crates/hyperswitch_domain_models/src/router_response_types.rs | hyperswitch_domain_models | struct_definition | 15 | rust | UploadFileResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct BankAccountTokenData {
pub payment_method_type: api_enums::PaymentMethodType,
pub payment_method: api_enums::PaymentMethod,
pub connector_details: BankAccountConnectorDetails,
} | crates/api_models/src/payment_methods.rs | api_models | struct_definition | 44 | rust | BankAccountTokenData | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/nmi.rs
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use api_models::webhooks::IncomingWebhookEvent;
use common_enums::{enums, CallConnectorAction, PaymentAction};
use common_utils::{
crypto,
errors::CustomResult,
ext_traits::ByteSlice... | crates/hyperswitch_connectors/src/connectors/nmi.rs#chunk0 | hyperswitch_connectors | chunk | 8,187 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn lock_connector_customer_status(
state: &SessionState,
connector_customer_id: &str,
payment_id: &id_type::GlobalPaymentId,
) -> CustomResult<bool, errors::StorageError> {
let redis_conn =
state
.store
.get_redis_conn()
... | crates/router/src/types/storage/revenue_recovery_redis_operation.rs | router | function_signature | 258 | rust | null | null | null | null | lock_connector_customer_status | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.DisputeResponse
{
"type": "object",
"required": [
"dispute_id",
"payment_id",
"attempt_id",
"amount",
"currency",
"dispute_stage",
"dispute_status",
"connector",
"connector_status",
"connector_dispute_id",
"created_at"
],
"proper... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 652 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"DisputeResponse"
] | null | null | null | null |
OpenAPI Block Path: components.schemas.ApplePayPredecryptData
{
"type": "object",
"description": "This struct represents the decrypted Apple Pay payment data",
"required": [
"application_primary_account_number",
"application_expiration_month",
"application_expiration_year",
"payment_data"
],
"... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 232 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"ApplePayPredecryptData"
] | null | null | null | null |
pub struct MandateCardDetails {
/// The last 4 digits of card
pub last4_digits: Option<String>,
/// The expiry month of card
#[schema(value_type = Option<String>)]
pub card_exp_month: Option<Secret<String>>,
/// The expiry year of card
#[schema(value_type = Option<String>)]
pub card_exp_... | crates/api_models/src/mandates.rs | api_models | struct_definition | 332 | rust | MandateCardDetails | null | null | null | null | null | null | null | null | null | null | null |
pub async fn retrieve_dispute(
state: SessionState,
merchant_context: domain::MerchantContext,
profile_id: Option<common_utils::id_type::ProfileId>,
req: dispute_models::DisputeRetrieveRequest,
) -> RouterResponse<api_models::disputes::DisputeResponse> {
let dispute = state
.store
.f... | crates/router/src/core/disputes.rs | router | function_signature | 836 | rust | null | null | null | null | retrieve_dispute | null | null | null | null | null | null | null |
pub struct StorageSubscription; | crates/router_env/src/logger/storage.rs | router_env | struct_definition | 5 | rust | StorageSubscription | null | null | null | null | null | null | null | null | null | null | null |
impl api::Payment for Fiserv {} | crates/hyperswitch_connectors/src/connectors/fiserv.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Fiserv | api::Payment for | impl api::Payment for for Fiserv | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.FeatureStatus
{
"type": "string",
"description": "The status of the feature",
"enum": [
"not_supported",
"supported"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 47 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"FeatureStatus"
] | null | null | null | null |
pub async fn log_payout_delete(
&self,
delete_old_payout: &KafkaPayout<'_>,
tenant_id: TenantID,
) -> MQResult<()> {
self.log_event(&KafkaEvent::old(
delete_old_payout,
tenant_id.clone(),
self.ckh_database_name.clone(),
))
.attach_p... | crates/router/src/services/kafka.rs | router | function_signature | 101 | rust | null | null | null | null | log_payout_delete | null | null | null | null | null | null | null |
pub trait RoutingEventLogAnalytics: LoadRow<RoutingEventsResult> {} | crates/analytics/src/routing_events/events.rs | analytics | trait_definition | 15 | rust | null | null | RoutingEventLogAnalytics | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/customers/payment_methods"
{
"get": {
"tags": [
"Payment Methods"
],
"summary": "List customer saved payment methods for a Payment",
"description": "Lists all the applicable payment methods for a particular payment tied to the `client_secret`.",
"operationId": "Li... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 801 | .json | null | null | null | null | null | openapi_spec | paths | [
"/customers/payment_methods"
] | null | null | null | null |
impl FromStr for AciRefundStatus {
type Err = error_stack::Report<errors::ConnectorError>;
fn from_str(s: &str) -> Result<Self, Self::Err> {
if FAILURE_CODES.contains(&s) {
Ok(Self::Failed)
} else if PENDING_CODES.contains(&s) {
Ok(Self::Pending)
} else if SUCCESS... | crates/hyperswitch_connectors/src/connectors/aci/transformers.rs | hyperswitch_connectors | impl_block | 129 | rust | null | AciRefundStatus | FromStr for | impl FromStr for for AciRefundStatus | null | null | null | null | null | null | null | null |
impl Worldpayxml {
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMinorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/worldpayxml.rs | hyperswitch_connectors | impl_block | 35 | rust | null | Worldpayxml | null | impl Worldpayxml | null | null | null | null | null | null | null | null |
File: crates/router/src/services/api/client.rs
Public functions: 2
Public structs: 3
use std::time::Duration;
use common_utils::errors::ReportSwitchExt;
use error_stack::ResultExt;
pub use external_services::http_client::{self, client};
use http::{HeaderValue, Method};
use hyperswitch_interfaces::types::Proxy;
use ... | crates/router/src/services/api/client.rs | router | full_file | 1,927 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentIncrementalAuthorization for Paypal {} | crates/hyperswitch_connectors/src/connectors/paypal.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Paypal | PaymentIncrementalAuthorization for | impl PaymentIncrementalAuthorization for for Paypal | null | null | null | null | null | null | null | null |
pub struct GetSdkEventFiltersRequest {
pub time_range: TimeRange,
#[serde(default)]
pub group_by_names: Vec<SdkEventDimensions>,
} | crates/api_models/src/analytics.rs | api_models | struct_definition | 34 | rust | GetSdkEventFiltersRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn call_proxy_api(
state: &SessionState,
payment_intent: &payments_domain::PaymentIntent,
revenue_recovery_payment_data: &storage::revenue_recovery::RevenueRecoveryPaymentData,
revenue_recovery: &payments_api::PaymentRevenueRecoveryMetadata,
payment_processor_token: &str,
) -> RouterResult... | crates/router/src/core/revenue_recovery/api.rs | router | function_signature | 525 | rust | null | null | null | null | call_proxy_api | null | null | null | null | null | null | null |
pub fn get_resource_name(resource: Resource, entity_type: EntityType) -> Option<&'static str> {
match (resource, entity_type) {
(Resource::Payment, _) => Some("Payments"),
(Resource::Refund, _) => Some("Refunds"),
(Resource::Dispute, _) => Some("Disputes"),
(Resource::Mandate, _) => ... | crates/router/src/services/authorization/permissions.rs | router | function_signature | 485 | rust | null | null | null | null | get_resource_name | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.GiftCardDetails
{
"type": "object",
"required": [
"number",
"cvc"
],
"properties": {
"number": {
"type": "string",
"description": "The gift card number"
},
"cvc": {
"type": "string",
"description": "The card verification code."
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 94 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"GiftCardDetails"
] | null | null | null | null |
impl ConnectorSpecifications for Elavon {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&ELAVON_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*ELAVON_SUPPORTED_PAYMENT_METHODS)
}
fn get_support... | crates/hyperswitch_connectors/src/connectors/elavon.rs | hyperswitch_connectors | impl_block | 109 | rust | null | Elavon | ConnectorSpecifications for | impl ConnectorSpecifications for for Elavon | null | null | null | null | null | null | null | null |
## 1.70.1 (2023-11-03)
### Revert
- Fix(analytics): feat(analytics): analytics APIs ([#2777](https://github.com/juspay/hyperswitch/pull/2777)) ([`169d33b`](https://github.com/juspay/hyperswitch/commit/169d33bf8157b1a9910c841c8c55eddc4d2ad168))
**Full Changelog:** [`v1.70.0...v1.70.1`](https://github.com/juspay/hyper... | CHANGELOG.md#chunk47 | null | doc_chunk | 8,129 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl behaviour::Conversion for CustomerAddress {
type DstType = diesel_models::address::Address;
type NewDstType = diesel_models::address::AddressNew;
async fn convert(self) -> CustomResult<Self::DstType, ValidationError> {
let converted_address = Address::convert(self.address).await?;
Ok(d... | crates/router/src/types/domain/address.rs | router | impl_block | 290 | rust | null | CustomerAddress | behaviour::Conversion for | impl behaviour::Conversion for for CustomerAddress | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/payone/transformers.rs
Public structs: 10
#[cfg(feature = "payouts")]
use api_models::payouts::PayoutMethodData;
#[cfg(feature = "payouts")]
use cards::CardNumber;
#[cfg(feature = "payouts")]
use common_enums::{PayoutStatus, PayoutType};
use common_utils::types::Mino... | crates/hyperswitch_connectors/src/connectors/payone/transformers.rs | hyperswitch_connectors | full_file | 1,988 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct GpaymentsMetaData {
pub endpoint_prefix: String,
pub merchant_id: common_utils::id_type::MerchantId,
} | crates/hyperswitch_connectors/src/connectors/gpayments/transformers.rs | hyperswitch_connectors | struct_definition | 28 | rust | GpaymentsMetaData | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::RoutingCreateConfig;
Box::pin(oss_api::server_wrap(
flow,
state,
&req,
json_payload.into_inner(),
|state, auth: auth::AuthenticationData, payload, _| {
let merchant_context = domain::MerchantContext::NormalMerchant(Box::new(
... | crates/router/src/routes/routing.rs | router | impl_block | 215 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
impl AuthNFlowType {
pub fn get_acs_url(&self) -> Option<String> {
if let Self::Challenge(challenge_params) = self {
challenge_params.acs_url.as_ref().map(ToString::to_string)
} else {
None
}
}
pub fn get_challenge_request(&self) -> Option<String> {
if... | crates/hyperswitch_domain_models/src/router_request_types/authentication.rs | hyperswitch_domain_models | impl_block | 325 | rust | null | AuthNFlowType | null | impl AuthNFlowType | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.KlarnaSessionTokenResponse
{
"type": "object",
"required": [
"session_token",
"session_id"
],
"properties": {
"session_token": {
"type": "string",
"description": "The session token for Klarna"
},
"session_id": {
"type": "string",
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 101 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"KlarnaSessionTokenResponse"
] | null | null | null | null |
impl ConnectorSpecifications for Katapult {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&KATAPULT_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*KATAPULT_SUPPORTED_PAYMENT_METHODS)
}
fn get_s... | crates/hyperswitch_connectors/src/connectors/katapult.rs | hyperswitch_connectors | impl_block | 111 | rust | null | Katapult | ConnectorSpecifications for | impl ConnectorSpecifications for for Katapult | null | null | null | null | null | null | null | null |
pub trait CustomerInterface
where
Customer: behaviour::Conversion<
DstType = storage_types::Customer,
NewDstType = storage_types::CustomerNew,
>,
{
type Error;
#[cfg(feature = "v1")]
async fn delete_customer_by_customer_id_merchant_id(
&self,
customer_id: &id_type::Cu... | crates/hyperswitch_domain_models/src/customer.rs | hyperswitch_domain_models | trait_definition | 900 | rust | null | null | CustomerInterface | null | null | null | null | null | null | null | null | null |
pub async fn create_platform(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<user_api::PlatformAccountCreateRequest>,
) -> HttpResponse {
let flow = Flow::CreatePlatformAccount;
Box::pin(api::server_wrap(
flow,
state,
&req,
json_payload.into_inn... | crates/router/src/routes/user.rs | router | function_signature | 145 | rust | null | null | null | null | create_platform | null | null | null | null | null | null | null |
pub struct OrderData {
pub consent_id: String,
pub customer_id: id_type::CustomerId,
} | crates/router/src/types/payment_methods.rs | router | struct_definition | 23 | rust | OrderData | null | null | null | null | null | null | null | null | null | null | null |
pub struct BodyKey {
pub api_key: Secret<String>,
pub key1: Secret<String>,
} | crates/test_utils/src/connector_auth.rs | test_utils | struct_definition | 22 | rust | BodyKey | null | null | null | null | null | null | null | null | null | null | null |
Self::CimbVaBankTransfer
}
domain::payments::BankTransferData::DanamonVaBankTransfer { .. } => {
Self::DanamonVaBankTransfer
}
domain::payments::BankTransferData::MandiriVaBankTransfer { .. } ... | crates/router/src/connector/utils.rs#chunk3 | router | chunk | 1,820 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn perform_decision_management(
record: common_types::payments::DecisionManagerRecord,
payment_data: &core_routing::PaymentsDslInput<'_>,
) -> RouterResult<common_types::payments::ConditionalConfigs> {
let interpreter = backend::VirInterpreterBackend::with_program(record.program)
.change_context... | crates/router/src/core/payments/conditional_configs.rs | router | function_signature | 159 | rust | null | null | null | null | perform_decision_management | null | null | null | null | null | null | null |
pub struct AccessTokenAuthentication; | crates/hyperswitch_domain_models/src/router_flow_types/access_token_auth.rs | hyperswitch_domain_models | struct_definition | 5 | rust | AccessTokenAuthentication | null | null | null | null | null | null | null | null | null | null | null |
pub struct Moneris {
amount_converter: &'static (dyn AmountConvertor<Output = MinorUnit> + Sync),
} | crates/hyperswitch_connectors/src/connectors/moneris.rs | hyperswitch_connectors | struct_definition | 27 | rust | Moneris | null | null | null | null | null | null | null | null | null | null | null |
pub struct CheckoutRedirectResponse {
pub status: Option<CheckoutRedirectResponseStatus>,
#[serde(rename = "cko-session-id")]
pub cko_session_id: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs | hyperswitch_connectors | struct_definition | 37 | rust | CheckoutRedirectResponse | null | null | null | null | null | null | null | null | null | null | null |
/// from to_currency -> base currency
pub fn forward_conversion(
&self,
amt: Decimal,
from_currency: Currency,
) -> Result<Decimal, CurrencyConversionError> {
let from_factor = self
.conversion
.get(&from_currency)
.ok_or_else(|| {
... | crates/currency_conversion/src/types.rs | currency_conversion | function_signature | 110 | rust | null | null | null | null | forward_conversion | null | null | null | null | null | null | null |
pub fn construct_authentication_router_data(
state: &SessionState,
merchant_id: common_utils::id_type::MerchantId,
authentication_connector: String,
payment_method_data: domain::PaymentMethodData,
payment_method: PaymentMethod,
billing_address: hyperswitch_domain_models::address::Address,
sh... | crates/router/src/core/authentication/transformers.rs | router | function_signature | 456 | rust | null | null | null | null | construct_authentication_router_data | null | null | null | null | null | null | null |
impl RequestContent {
pub fn get_inner_value(&self) -> Secret<String> {
match self {
Self::Json(i) => serde_json::to_string(&i).unwrap_or_default().into(),
Self::FormUrlEncoded(i) => serde_urlencoded::to_string(i).unwrap_or_default().into(),
Self::Xml(i) => quick_xml::se:... | crates/common_utils/src/request.rs | common_utils | impl_block | 119 | rust | null | RequestContent | null | impl RequestContent | null | null | null | null | null | null | null | null |
impl Currency {
/// Convert the amount to its base denomination based on Currency and return String
pub fn to_currency_base_unit(self, amount: i64) -> Result<String, TryFromIntError> {
let amount_f64 = self.to_currency_base_unit_asf64(amount)?;
Ok(format!("{amount_f64:.2}"))
}
/// Conve... | crates/common_enums/src/enums.rs | common_enums | impl_block | 5,693 | rust | null | Currency | null | impl Currency | null | null | null | null | null | null | null | null |
pub async fn find_by_global_id(
conn: &PgPooledConn,
id: &common_utils::id_type::GlobalRefundId,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
conn,
dsl::id.eq(id.to_owned()),
)
.await
} | crates/diesel_models/src/query/refund.rs | diesel_models | function_signature | 79 | rust | null | null | null | null | find_by_global_id | null | null | null | null | null | null | null |
pub struct ProgramThreeDsDecisionRule {
pub default_selection: ThreeDSDecisionRule,
#[schema(value_type = RuleThreeDsDecisionRule)]
pub rules: Vec<ast::Rule<ThreeDSDecisionRule>>,
#[schema(value_type = HashMap<String, serde_json::Value>)]
pub metadata: std::collections::HashMap<String, serde_json::V... | crates/api_models/src/routing.rs | api_models | struct_definition | 77 | rust | ProgramThreeDsDecisionRule | null | null | null | null | null | null | null | null | null | null | null |
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<DynamicRoutingStats> {
generics::generic_insert(conn, self).await
} | crates/diesel_models/src/query/dynamic_routing_stats.rs | diesel_models | function_signature | 36 | rust | null | null | null | null | insert | null | null | null | null | null | null | null |
pub async fn update_customer_payment_method(
state: routes::SessionState,
merchant_context: domain::MerchantContext,
req: api::PaymentMethodUpdate,
payment_method_id: &str,
) -> errors::RouterResponse<api::PaymentMethodResponse> {
// Currently update is supported only for cards
if let Some(card_... | crates/router/src/core/payment_methods/cards.rs | router | function_signature | 1,810 | rust | null | null | null | null | update_customer_payment_method | null | null | null | null | null | null | null |
File: crates/common_utils/src/id_type/tenant.rs
Public functions: 2
use crate::{
consts::DEFAULT_GLOBAL_TENANT_ID,
errors::{CustomResult, ValidationError},
};
crate::id_type!(
TenantId,
"A type for tenant_id that can be used for unique identifier for a tenant"
);
crate::impl_id_type_methods!(TenantId... | crates/common_utils/src/id_type/tenant.rs | common_utils | full_file | 269 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct FrmRoutingAlgorithm {
pub data: String,
#[serde(rename = "type")]
pub algorithm_type: String,
} | crates/router/src/types/api/routing.rs | router | struct_definition | 28 | rust | FrmRoutingAlgorithm | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_gsm<F, FData>(
state: &app::SessionState,
router_data: &types::RouterData<F, FData, types::PaymentsResponseData>,
) -> RouterResult<Option<hyperswitch_domain_models::gsm::GatewayStatusMap>> {
let error_response = router_data.response.as_ref().err();
let error_code = error_response.map(|... | crates/router/src/core/payments/retry.rs | router | function_signature | 159 | rust | null | null | null | null | get_gsm | null | null | null | null | null | null | null |
pub fn from_input(input: BackendInput) -> Self {
let payment = input.payment;
let payment_method = input.payment_method;
let meta_data = input.metadata;
let acquirer_data = input.acquirer_data;
let customer_device_data = input.customer_device_data;
let issuer_data = input... | crates/euclid/src/backend/vir_interpreter/types.rs | euclid | function_signature | 880 | rust | null | null | null | null | from_input | null | null | null | null | null | null | null |
impl PaymentIntentMetricAccumulator for ProcessedAmountAccumulator {
type MetricOutput = (
Option<u64>,
Option<u64>,
Option<u64>,
Option<u64>,
Option<u64>,
Option<u64>,
);
#[inline]
fn add_metrics_bucket(&mut self, metrics: &PaymentIntentMetricRow) {
... | crates/analytics/src/payment_intents/accumulator.rs | analytics | impl_block | 559 | rust | null | ProcessedAmountAccumulator | PaymentIntentMetricAccumulator for | impl PaymentIntentMetricAccumulator for for ProcessedAmountAccumulator | null | null | null | null | null | null | null | null |
pub struct GetCardToken {
pub card_reference: String,
pub customer_id: id_type::CustomerId,
} | crates/router/src/types/payment_methods.rs | router | struct_definition | 24 | rust | GetCardToken | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_payment_link_config_based_on_priority(
payment_create_link_config: Option<api_models::payments::PaymentCreatePaymentLinkConfig>,
business_link_config: Option<diesel_models::business_profile::BusinessPaymentLinkConfig>,
merchant_name: String,
default_domain_name: String,
payment_link_confi... | crates/router/src/core/payment_link.rs | router | function_signature | 879 | rust | null | null | null | null | get_payment_link_config_based_on_priority | null | null | null | null | null | null | null |
impl api::PaymentSync for Getnet {} | crates/hyperswitch_connectors/src/connectors/getnet.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Getnet | api::PaymentSync for | impl api::PaymentSync for for Getnet | null | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/cryptopay.rs
use hyperswitch_domain_models::address::{Address, AddressDetails, PhoneDetails};
use masking::Secret;
use router::types::{self, api, domain, storage::enums, PaymentAddress};
use crate::{
connector_auth,
utils::{self, ConnectorActions},
};
#[derive(Clone, Copy... | crates/router/tests/connectors/cryptopay.rs | router | full_file | 1,194 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/analytics/src/payments/metrics/sessionized_metrics/debit_routing.rs
use std::collections::HashSet;
use api_models::analytics::{
payments::{PaymentDimensions, PaymentFilters, PaymentMetricsBucketIdentifier},
Granularity, TimeRange,
};
use common_utils::errors::ReportSwitchExt;
use diesel_models::e... | crates/analytics/src/payments/metrics/sessionized_metrics/debit_routing.rs | analytics | full_file | 1,058 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn increment_blocked_count_in_cache<A>(
state: &A,
cache_key: &str,
expiry: i64,
) -> RouterResult<()>
where
A: SessionStateInfo + Sync,
{
let redis_conn = get_redis_connection(state)?;
let value: Option<i32> = redis_conn
.get_key(&cache_key.into())
.await
.cha... | crates/router/src/services/card_testing_guard.rs | router | function_signature | 165 | rust | null | null | null | null | increment_blocked_count_in_cache | null | null | null | null | null | null | null |
pub struct VoltErrorList {
pub property: String,
pub message: String,
} | crates/hyperswitch_connectors/src/connectors/volt/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | VoltErrorList | null | null | null | null | null | null | null | null | null | null | null |
- - -
## 2025.08.25.0
### Features
- **connector:**
- [BHN] Add BHN GiftCard Flow( Alpha) ([#8701](https://github.com/juspay/hyperswitch/pull/8701)) ([`cb34ec5`](https://github.com/juspay/hyperswitch/commit/cb34ec51e0f2b4ba071602f5fe974429de542b80))
- [AFFIRM] BNPL flow added (Alpha) ([#8795](https://github.com... | CHANGELOG.md#chunk1 | null | doc_chunk | 8,192 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct VerifyWebhookSourceRequestData {
pub webhook_headers: actix_web::http::header::HeaderMap,
pub webhook_body: Vec<u8>,
pub merchant_secret: api_models::webhooks::ConnectorWebhookSecrets,
} | crates/hyperswitch_domain_models/src/router_request_types.rs | hyperswitch_domain_models | struct_definition | 52 | rust | VerifyWebhookSourceRequestData | null | null | null | null | null | null | null | null | null | null | null |
impl Bamboraapac {
pub const fn new() -> &'static Self {
&Self {
amount_converter: &MinorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/bamboraapac.rs | hyperswitch_connectors | impl_block | 37 | rust | null | Bamboraapac | null | impl Bamboraapac | null | null | null | null | null | null | null | null |
}
fn get_webhook_event_type(
&self,
request: &IncomingWebhookRequestDetails<'_>,
) -> CustomResult<IncomingWebhookEvent, errors::ConnectorError> {
let details: airwallex::AirwallexWebhookData = request
.body
.parse_struct("airwallexWebhookData")
.... | crates/hyperswitch_connectors/src/connectors/airwallex.rs#chunk1 | hyperswitch_connectors | chunk | 2,033 | null | null | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PayoutRetrieveBody
{
"type": "object",
"properties": {
"force_sync": {
"type": "boolean",
"nullable": true
},
"merchant_id": {
"type": "string",
"nullable": true
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 71 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PayoutRetrieveBody"
] | null | null | null | null |
OpenAPI Block Path: components.schemas.CardTokenResponse
{
"allOf": [
{
"allOf": [
{
"$ref": "#/components/schemas/CardTokenAdditionalData"
}
],
"nullable": true
},
{
"type": "object"
}
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 69 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CardTokenResponse"
] | null | null | null | null |
pub struct SessionState {
pub store: Box<dyn StorageInterface>,
/// Global store is used for global schema operations in tables like Users and Tenants
pub global_store: Box<dyn GlobalStorageInterface>,
pub accounts_store: Box<dyn AccountsStorageInterface>,
pub conf: Arc<settings::Settings<RawSecret>... | crates/router/src/routes/app.rs | router | struct_definition | 245 | rust | SessionState | null | null | null | null | null | null | null | null | null | null | null |
pub struct MandateToken {
pub href: Secret<String>,
pub token_id: String,
pub token_expiry_date_time: String,
} | crates/hyperswitch_connectors/src/connectors/worldpay/response.rs | hyperswitch_connectors | struct_definition | 30 | rust | MandateToken | null | null | null | null | null | null | null | null | null | null | null |
impl CycleCheck {
pub fn new() -> Self {
Self(FxHashMap::default())
}
} | crates/hyperswitch_constraint_graph/src/types.rs | hyperswitch_constraint_graph | impl_block | 23 | rust | null | CycleCheck | null | impl CycleCheck | null | null | null | null | null | null | null | null |
File: crates/euclid_macros/src/inner/knowledge.rs
use std::{
fmt::{Display, Formatter},
hash::Hash,
rc::Rc,
};
use proc_macro2::{Span, TokenStream};
use quote::{format_ident, quote};
use rustc_hash::{FxHashMap, FxHashSet};
use syn::{parse::Parse, Token};
mod strength {
syn::custom_punctuation!(Normal... | crates/euclid_macros/src/inner/knowledge.rs | euclid_macros | full_file | 4,251 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_theme_lineage_from_user_token(
user_from_token: &UserFromToken,
state: &SessionState,
request_entity_type: &EntityType,
) -> UserResult<ThemeLineage> {
let tenant_id = user_from_token
.tenant_id
.clone()
.unwrap_or(state.tenant.tenant_id.clone());
let org_id ... | crates/router/src/utils/user/theme.rs | router | function_signature | 147 | rust | null | null | null | null | get_theme_lineage_from_user_token | null | null | null | null | null | null | null |
pub fn as_bool(self) -> bool {
match self {
Self::Skip => false,
Self::Calculate => true,
}
} | crates/common_enums/src/enums.rs | common_enums | function_signature | 31 | rust | null | null | null | null | as_bool | null | null | null | null | null | null | null |
pub async fn get_total_count_of_payouts(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
active_payout_ids: &[common_utils::id_type::PayoutId],
connector: Option<Vec<String>>,
currency: Option<Vec<enums::Currency>>,
status: Option<Vec<enums::PayoutSt... | crates/diesel_models/src/query/payouts.rs | diesel_models | function_signature | 389 | rust | null | null | null | null | get_total_count_of_payouts | null | null | null | null | null | null | null |
pub async fn routing_link_config() {} | crates/openapi/src/routes/profile.rs | openapi | function_signature | 8 | rust | null | null | null | null | routing_link_config | null | null | null | null | null | null | null |
Documentation: api-reference/v1/payments/payments--post-session-tokens.mdx
# Type: Doc File
---
openapi: post /payments/{payment_id}/post_session_tokens
--- | api-reference/v1/payments/payments--post-session-tokens.mdx | null | doc_file | 40 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundExecute for Worldpay {} | crates/hyperswitch_connectors/src/connectors/worldpay.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Worldpay | api::RefundExecute for | impl api::RefundExecute for for Worldpay | null | null | null | null | null | null | null | null |
pub struct ResponseRouterData<Flow, R, Request, Response> {
pub response: R,
pub data: PaymentAuthRouterData<Flow, Request, Response>,
pub http_code: u16,
} | crates/pm_auth/src/types.rs | pm_auth | struct_definition | 46 | rust | ResponseRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub struct FacilitapaySubject {
pub social_name: Secret<String>,
pub document_type: DocumentType,
pub document_number: Secret<String>,
// In documentation, both CountryAlpha2 and String are used. We cannot rely on CountryAlpha2.
pub fiscal_country: String,
pub updated_at: Option<String>,
pub... | crates/hyperswitch_connectors/src/connectors/facilitapay/responses.rs | hyperswitch_connectors | struct_definition | 316 | rust | FacilitapaySubject | null | null | null | null | null | null | null | null | null | null | null |
pub struct Shift4RouterData<T> {
pub amount: MinorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs | hyperswitch_connectors | struct_definition | 24 | rust | Shift4RouterData | null | null | null | null | null | null | null | null | null | null | null |
pub fn collect(self) -> DisputeMetricsBucketValue {
let (challenge_rate, won_rate, lost_rate, total_dispute) =
self.disputes_status_rate.collect().unwrap_or_default();
DisputeMetricsBucketValue {
disputes_challenged: challenge_rate,
disputes_won: won_rate,
... | crates/analytics/src/disputes/accumulators.rs | analytics | function_signature | 104 | rust | null | null | null | null | collect | null | null | null | null | null | null | null |
impl Responder {
let flow = Flow::UpdateDynamicRoutingConfigs;
let routing_payload_wrapper = routing_types::ContractBasedRoutingPayloadWrapper {
updated_config: json_payload.into_inner(),
algorithm_id: path.algorithm_id.clone(),
profile_id: path.profile_id.clone(),
};
Box::pin(os... | crates/router/src/routes/routing.rs | router | impl_block | 278 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub async fn generate_profile_refund_report(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<ReportRequest>,
) -> impl Responder {
let flow = AnalyticsFlow::GenerateRefundReport;
Box::pin(api::server_wrap(
flow,
state.c... | crates/router/src/analytics.rs | router | function_signature | 413 | rust | null | null | null | null | generate_profile_refund_report | null | null | null | null | null | null | null |
impl utils::MultipleCaptureSyncResponse for ActionResponse {
fn get_connector_capture_id(&self) -> String {
self.action_id.clone()
}
fn get_capture_attempt_status(&self) -> AttemptStatus {
match self.approved {
Some(true) => AttemptStatus::Charged,
Some(false) => Att... | crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs | hyperswitch_connectors | impl_block | 161 | rust | null | ActionResponse | utils::MultipleCaptureSyncResponse for | impl utils::MultipleCaptureSyncResponse for for ActionResponse | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_interfaces/src/conversion_impls.rs
use common_utils::{errors::CustomResult, id_type};
use error_stack::ResultExt;
#[cfg(feature = "frm")]
use hyperswitch_domain_models::router_data_v2::flow_common_types::FrmFlowData;
#[cfg(feature = "payouts")]
use hyperswitch_domain_models::router_data_v2::fl... | crates/hyperswitch_interfaces/src/conversion_impls.rs#chunk0 | hyperswitch_interfaces | chunk | 8,187 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct RefundErrorMessageDistributionRow {
pub count: i64,
pub total: i64,
pub refund_error_message: String,
} | crates/analytics/src/refunds/accumulator.rs | analytics | struct_definition | 33 | rust | RefundErrorMessageDistributionRow | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaysafeConnectorMetadataObject {
pub account_id: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | PaysafeConnectorMetadataObject | null | null | null | null | null | null | null | null | null | null | null |
pub struct AirwallexObjectData {
pub object: serde_json::Value,
} | crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | AirwallexObjectData | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
use api_models::payments::PaymentsGetIntentRequest;
use hyperswitch_domain_models::payments::PaymentIntentData;
let flow = Flow::PaymentsGetIntent;
let header_payload = match HeaderPayload::foreign_try_from(req.headers()) {
Ok(headers) => headers,
Err(err) => {
... | crates/router/src/routes/payments.rs | router | impl_block | 375 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
impl Responder {
let routing_payload_wrapper = routing_types::RoutingPayloadWrapper {
updated_config: json_payload.into_inner(),
profile_id: path.into_inner(),
};
Box::pin(oss_api::server_wrap(
Flow::RoutingUpdateDefaultConfig,
state,
&req,
routing_payload_wra... | crates/router/src/routes/routing.rs | router | impl_block | 239 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.MobilePaymentConsent
{
"type": "string",
"enum": [
"consent_required",
"consent_not_required",
"consent_optional"
]
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 48 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"MobilePaymentConsent"
] | null | null | null | null |
pub struct NetceteraPreAuthenticationRequest {
cardholder_account_number: cards::CardNumber,
scheme_id: Option<netcetera_types::SchemeId>,
} | crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs | hyperswitch_connectors | struct_definition | 37 | rust | NetceteraPreAuthenticationRequest | null | null | null | null | null | null | null | null | null | null | null |
impl Mandate {
pub async fn find_by_merchant_id_mandate_id(
conn: &PgPooledConn,
merchant_id: &common_utils::id_type::MerchantId,
mandate_id: &str,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
conn,
dsl::merchan... | crates/diesel_models/src/query/mandate.rs | diesel_models | impl_block | 688 | rust | null | Mandate | null | impl Mandate | null | null | null | null | null | null | null | null |
Documentation: api-reference/v2/connector-account/connector-account--create.mdx
# Type: Doc File
---
openapi: post /v2/connector-accounts
--- | api-reference/v2/connector-account/connector-account--create.mdx | null | doc_file | 37 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn lower_program<O>(
dir_program: dir::DirProgram<O>,
) -> Result<vir::ValuedProgram<O>, AnalysisError> {
Ok(vir::ValuedProgram {
default_selection: dir_program.default_selection,
rules: dir_program
.rules
.into_iter()
.map(lower_rule)
.collect... | crates/euclid/src/frontend/dir/lowering.rs | euclid | function_signature | 116 | rust | null | null | null | null | lower_program | null | null | null | null | null | null | null |
impl TokenioErrorResponse {
pub fn from_bytes(bytes: &[u8]) -> Self {
// First try to parse as JSON
if let Ok(json_response) = serde_json::from_slice::<Self>(bytes) {
json_response
} else {
// If JSON parsing fails, treat as plain text
let text = String::f... | crates/hyperswitch_connectors/src/connectors/tokenio/transformers.rs | hyperswitch_connectors | impl_block | 230 | rust | null | TokenioErrorResponse | null | impl TokenioErrorResponse | null | null | null | null | null | null | null | null |
File: crates/router/src/core/payments/conditional_configs.rs
Public functions: 3
use api_models::{conditional_configs::DecisionManagerRecord, routing};
use common_utils::ext_traits::StringExt;
use error_stack::ResultExt;
use euclid::backend::{self, inputs as dsl_inputs, EuclidBackend};
use router_env::{instrument, tr... | crates/router/src/core/payments/conditional_configs.rs | router | full_file | 786 | null | null | 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.