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 fn new() -> &'static Self {
&Self {
amount_converter: &StringMinorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/mpgs.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Airwallex {} | crates/hyperswitch_connectors/src/connectors/airwallex.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Airwallex | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Airwallex | null | null | null | null | null | null | null | null |
impl api::revenue_recovery::BillingConnectorPaymentsSyncIntegration for Stripebilling {} | crates/hyperswitch_connectors/src/connectors/stripebilling.rs | hyperswitch_connectors | impl_block | 16 | rust | null | Stripebilling | api::revenue_recovery::BillingConnectorPaymentsSyncIntegration for | impl api::revenue_recovery::BillingConnectorPaymentsSyncIntegration for for Stripebilling | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.RoutingRetrieveResponse
{
"type": "object",
"description": "Response of the retrieved routing configs for a merchant account",
"properties": {
"algorithm": {
"allOf": [
{
"$ref": "#/components/schemas/MerchantRoutingAlgorithm"
}
],
... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 84 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"RoutingRetrieveResponse"
] | null | null | null | null |
Documentation: docs/CODE_OF_CONDUCT.md
# Type: Doc File
# Code of Conduct
The hyperswitch project adheres to the
[Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct).
This describes the minimum behavior expected from all contributors.
| docs/CODE_OF_CONDUCT.md | null | doc_file | 60 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn update_role(
state: web::Data<AppState>,
req: HttpRequest,
json_payload: web::Json<role_api::UpdateRoleRequest>,
path: web::Path<String>,
) -> HttpResponse {
let flow = Flow::UpdateRole;
let role_id = path.into_inner();
Box::pin(api::server_wrap(
flow,
state.clo... | crates/router/src/routes/user_role.rs | router | function_signature | 152 | rust | null | null | null | null | update_role | null | null | null | null | null | null | null |
impl api::MandateSetup for Affirm {} | crates/hyperswitch_connectors/src/connectors/affirm.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Affirm | api::MandateSetup for | impl api::MandateSetup for for Affirm | null | null | null | null | null | null | null | null |
pub struct FiservRouterData<T> {
pub amount: FloatMajorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | FiservRouterData | null | null | null | null | null | null | null | null | null | null | null |
File: crates/common_utils/src/pii.rs
Public structs: 3
//! Personal Identifiable Information protection.
use std::{convert::AsRef, fmt, ops, str::FromStr};
use diesel::{
backend::Backend,
deserialize,
deserialize::FromSql,
prelude::*,
serialize::{Output, ToSql},
sql_types, AsExpression,
};
u... | crates/common_utils/src/pii.rs | common_utils | full_file | 3,626 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl FraudCheckTransaction for Signifyd {} | crates/hyperswitch_connectors/src/connectors/signifyd.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Signifyd | FraudCheckTransaction for | impl FraudCheckTransaction for for Signifyd | null | null | null | null | null | null | null | null |
pub struct PaymeVoidRequest {
sale_currency: enums::Currency,
payme_sale_id: String,
seller_payme_id: Secret<String>,
language: String,
} | crates/hyperswitch_connectors/src/connectors/payme/transformers.rs | hyperswitch_connectors | struct_definition | 38 | rust | PaymeVoidRequest | null | null | null | null | null | null | null | null | null | null | null |
impl super::behaviour::Conversion for Profile {
type DstType = diesel_models::business_profile::Profile;
type NewDstType = diesel_models::business_profile::ProfileNew;
async fn convert(self) -> CustomResult<Self::DstType, ValidationError> {
Ok(diesel_models::business_profile::Profile {
... | crates/hyperswitch_domain_models/src/business_profile.rs | hyperswitch_domain_models | impl_block | 2,422 | rust | null | Profile | super::behaviour::Conversion for | impl super::behaviour::Conversion for for Profile | null | null | null | null | null | null | null | null |
pub async fn perform_debit_routing<F, Req, D>(
operation: &BoxedOperation<'_, F, Req, D>,
state: &SessionState,
business_profile: &domain::Profile,
payment_data: &mut D,
connector: Option<ConnectorCallType>,
) -> (
Option<ConnectorCallType>,
Option<open_router::DebitRoutingOutput>,
)
where
... | crates/router/src/core/debit_routing.rs | router | function_signature | 606 | rust | null | null | null | null | perform_debit_routing | null | null | null | null | null | null | null |
pub struct FortePaymentsSyncResponse {
pub transaction_id: String,
pub organization_id: Secret<String>,
pub location_id: Secret<String>,
pub original_transaction_id: Option<String>,
pub status: FortePaymentStatus,
pub action: ForteAction,
pub authorization_code: String,
pub authorization... | crates/hyperswitch_connectors/src/connectors/forte/transformers.rs | hyperswitch_connectors | struct_definition | 149 | rust | FortePaymentsSyncResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/jpmorgan.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 JpmorganTest;
... | crates/router/tests/connectors/jpmorgan.rs | router | full_file | 2,959 | null | null | null | null | null | null | null | null | null | null | null | null | null |
PaymentMethodType::Gcash => Self::Wallet,
PaymentMethodType::Mifinity => Self::Wallet,
PaymentMethodType::Ideal => Self::BankRedirect,
PaymentMethodType::Klarna => Self::PayLater,
PaymentMethodType::KakaoPay => Self::Wallet,
PaymentMethodType::Knet... | crates/common_enums/src/transformers.rs#chunk3 | common_enums | chunk | 4,869 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl PaymentIntentMetricsBucketIdentifier {
#[allow(clippy::too_many_arguments)]
pub fn new(
status: Option<IntentStatus>,
currency: Option<Currency>,
profile_id: Option<String>,
connector: Option<String>,
auth_type: Option<AuthenticationType>,
payment_method: Opt... | crates/api_models/src/analytics/payment_intents.rs | api_models | impl_block | 200 | rust | null | PaymentIntentMetricsBucketIdentifier | null | impl PaymentIntentMetricsBucketIdentifier | null | null | null | null | null | null | null | null |
pub struct NexixpayAuthType {
pub(super) api_key: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | NexixpayAuthType | null | null | null | null | null | null | null | null | null | null | null |
pub struct CoBadgedCardNetworks(pub Vec<CoBadgedCardNetworksInfo>); | crates/api_models/src/open_router.rs | api_models | struct_definition | 20 | rust | CoBadgedCardNetworks | null | null | null | null | null | null | null | null | null | null | null |
/// Get the IP address
pub fn get_ip_address(&self) -> Option<String> {
self.online
.as_ref()
.and_then(|data| data.ip_address.as_ref().map(|ip| ip.peek().to_owned()))
} | crates/common_types/src/payments.rs | common_types | function_signature | 54 | rust | null | null | null | null | get_ip_address | null | null | null | null | null | null | null |
pub trait RefundDistributionAccumulator {
type DistributionOutput;
fn add_distribution_bucket(&mut self, distribution: &RefundDistributionRow);
fn collect(self) -> Self::DistributionOutput;
} | crates/analytics/src/refunds/accumulator.rs | analytics | trait_definition | 43 | rust | null | null | RefundDistributionAccumulator | null | null | null | null | null | null | null | null | null |
File: crates/router/src/routes/disputes.rs
Public functions: 13
use actix_multipart::Multipart;
use actix_web::{web, HttpRequest, HttpResponse};
use api_models::disputes as dispute_models;
use router_env::{instrument, tracing, Flow};
use crate::{core::api_locking, services::authorization::permissions::Permission};
p... | crates/router/src/routes/disputes.rs | router | full_file | 5,119 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentCapture for Silverflow {} | crates/hyperswitch_connectors/src/connectors/silverflow.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Silverflow | api::PaymentCapture for | impl api::PaymentCapture for for Silverflow | null | null | null | null | null | null | null | null |
pub struct ErrorResponse {
errors: Vec<ErrorDetails>,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 13 | rust | ErrorResponse | null | null | null | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/process_tracker.rs
Public functions: 2
Public structs: 3
pub use common_enums::{enums::ProcessTrackerRunner, ApiVersion};
use common_utils::ext_traits::Encode;
use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable};
use error_stack::ResultExt;
use serde::{Deserializ... | crates/diesel_models/src/process_tracker.rs | diesel_models | full_file | 2,433 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::Refund for Mifinity {} | crates/hyperswitch_connectors/src/connectors/mifinity.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Mifinity | api::Refund for | impl api::Refund for for Mifinity | null | null | null | null | null | null | null | null |
impl api::MandateSetup for Bankofamerica {} | crates/hyperswitch_connectors/src/connectors/bankofamerica.rs | hyperswitch_connectors | impl_block | 13 | rust | null | Bankofamerica | api::MandateSetup for | impl api::MandateSetup for for Bankofamerica | null | null | null | null | null | null | null | null |
impl behaviour::Conversion for PaymentIntent {
type DstType = DieselPaymentIntent;
type NewDstType = DieselPaymentIntentNew;
async fn convert(self) -> CustomResult<Self::DstType, ValidationError> {
Ok(DieselPaymentIntent {
payment_id: self.payment_id,
merchant_id: self.merch... | crates/hyperswitch_domain_models/src/payments/payment_intent.rs | hyperswitch_domain_models | impl_block | 2,555 | rust | null | PaymentIntent | behaviour::Conversion for | impl behaviour::Conversion for for PaymentIntent | null | null | null | null | null | null | null | null |
File: crates/external_services/src/email/ses.rs
Public functions: 3
Public structs: 2
use std::time::{Duration, SystemTime};
use aws_sdk_sesv2::{
config::Region,
operation::send_email::SendEmailError,
types::{Body, Content, Destination, EmailContent, Message},
Client,
};
use aws_sdk_sts::config::Cre... | crates/external_services/src/email/ses.rs | external_services | full_file | 1,843 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct FlexitiPurchase {
status: FlexitiPurchaseStatus,
} | crates/hyperswitch_connectors/src/connectors/flexiti/transformers.rs | hyperswitch_connectors | struct_definition | 15 | rust | FlexitiPurchase | null | null | null | null | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &StringMinorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/inespay.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub async fn list_customer_payment_method_api(
state: web::Data<routes::AppState>,
req: HttpRequest,
path: web::Path<id_type::CustomerId>,
json_payload: web::Query<payment_methods::PaymentMethodListRequest>,
) -> HttpResponse {
let payload = json_payload.into_inner();
let customer_id = path.into... | crates/router/src/compatibility/stripe/customers.rs | router | function_signature | 279 | rust | null | null | null | null | list_customer_payment_method_api | null | null | null | null | null | null | null |
pub struct Shift4ThreeDsResponse {
pub enrolled: bool,
pub version: Option<String>,
#[serde(rename = "redirectUrl")]
pub redirect_url: Option<Url>,
pub token: Token,
} | crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs | hyperswitch_connectors | struct_definition | 46 | rust | Shift4ThreeDsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct ThreeDSecureInfo {
pub amount: MinorUnit,
pub currency: String,
pub enrolled: bool,
#[serde(rename = "liabilityShift")]
pub liability_shift: Option<String>,
pub version: String,
#[serde(rename = "authenticationFlow")]
pub authentication_flow: Option<SecretSerdeValue>,
} | crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs | hyperswitch_connectors | struct_definition | 72 | rust | ThreeDSecureInfo | null | null | null | null | null | null | null | null | null | null | null |
pub struct AuthorizedotnetSyncResponse {
transaction: Option<SyncTransactionResponse>,
messages: ResponseMessages,
} | crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs | hyperswitch_connectors | struct_definition | 24 | rust | AuthorizedotnetSyncResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn find_by_merchant_id_merchant_order_reference_id(
conn: &PgPooledConn,
merchant_id_input: &common_utils::id_type::MerchantId,
merchant_order_reference_id_input: &str,
) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
con... | crates/diesel_models/src/query/payout_attempt.rs | diesel_models | function_signature | 121 | rust | null | null | null | null | find_by_merchant_id_merchant_order_reference_id | null | null | null | null | null | null | null |
Documentation: api-reference/essentials/go-live.mdx
# Type: Doc File
---
title: Go-live Checklist
---
Refer to this checklist for a seamless transition as you prepare to go live with your integration.
<Warning>
The connector configurations set up in the sandbox need to be replicated on the Hyperswitch production acc... | api-reference/essentials/go-live.mdx | null | doc_file | 650 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn payouts_retrieve(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<id_type::PayoutId>,
query_params: web::Query<payout_types::PayoutRetrieveBody>,
) -> HttpResponse {
let payout_retrieve_request = payout_types::PayoutRetrieveRequest {
payout_id: path.into_inner(),
... | crates/router/src/routes/payouts.rs | router | function_signature | 280 | rust | null | null | null | null | payouts_retrieve | null | null | null | null | null | null | null |
pub struct XenditPaymentResponse {
pub id: String,
pub status: PaymentStatus,
pub actions: Option<Vec<Action>>,
pub payment_method: PaymentMethodInfo,
pub failure_code: Option<String>,
pub reference_id: Secret<String>,
pub amount: FloatMajorUnit,
pub currency: Currency,
} | crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs | hyperswitch_connectors | struct_definition | 68 | rust | XenditPaymentResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn perform_pre_authentication(
state: &SessionState,
key_store: &domain::MerchantKeyStore,
card: hyperswitch_domain_models::payment_method_data::Card,
token: String,
business_profile: &domain::Profile,
acquirer_details: Option<types::AcquirerDetails>,
payment_id: common_utils::id_t... | crates/router/src/core/authentication.rs | router | function_signature | 737 | rust | null | null | null | null | perform_pre_authentication | null | null | null | null | null | null | null |
pub struct MifinityPayload {
trace_id: String,
initialization_token: String,
} | crates/hyperswitch_connectors/src/connectors/mifinity/transformers.rs | hyperswitch_connectors | struct_definition | 20 | rust | MifinityPayload | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let payload = json_payload.into_inner();
let flow = Flow::GsmRuleCreate;
Box::pin(api::server_wrap(
flow,
state.clone(),
&req,
payload,
|state, _, payload, _| gsm::create_gsm_rule(state, payload),
&ADMIN_API_AUTH,
api_locking::LockAct... | crates/router/src/routes/gsm.rs | router | impl_block | 91 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub struct StripePaymentMethodData {
#[serde(rename = "type")]
pub stype: StripePaymentMethodType,
pub billing_details: Option<StripeBillingDetails>,
#[serde(flatten)]
pub payment_method_details: Option<StripePaymentMethodDetails>, // enum
pub metadata: Option<Value>,
} | crates/router/src/compatibility/stripe/setup_intents/types.rs | router | struct_definition | 66 | rust | StripePaymentMethodData | null | null | null | null | null | null | null | null | null | null | null |
pub struct BecsBankDebitAdditionalData {
/// Partially masked account number for Becs payment method
#[schema(value_type = String, example = "0001****3456")]
pub account_number: MaskedBankAccount,
/// Bank-State-Branch (bsb) number
#[schema(value_type = String, example = "000000")]
pub bsb_numb... | crates/api_models/src/payments/additional_info.rs | api_models | struct_definition | 130 | rust | BecsBankDebitAdditionalData | null | null | null | null | null | null | null | null | null | null | null |
pub struct PlaidLinkTokenRequest {
client_name: String,
country_codes: Vec<String>,
language: String,
products: Vec<String>,
user: User,
android_package_name: Option<String>,
redirect_uri: Option<String>,
} | crates/pm_auth/src/connector/plaid/transformers.rs | pm_auth | struct_definition | 53 | rust | PlaidLinkTokenRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn routing_events_core(
pool: &AnalyticsProvider,
req: RoutingEventsRequest,
merchant_id: &common_utils::id_type::MerchantId,
) -> AnalyticsResult<Vec<RoutingEventsResult>> {
let data = match pool {
AnalyticsProvider::Sqlx(_) => Err(FiltersError::NotImplemented(
"Connector ... | crates/analytics/src/routing_events/core.rs | analytics | function_signature | 164 | rust | null | null | null | null | routing_events_core | null | null | null | null | null | null | null |
pub struct Card {
pub number: CardNumber,
pub exp_month: Secret<String>,
pub exp_year: Secret<String>,
pub cardholder_name: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs | hyperswitch_connectors | struct_definition | 37 | rust | Card | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentToken for Helcim {} | crates/hyperswitch_connectors/src/connectors/helcim.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Helcim | api::PaymentToken for | impl api::PaymentToken for for Helcim | null | null | null | null | null | null | null | null |
/// lowers the provided key (enum variant) & value to the respective DirValue
///
/// For example
/// ```notrust
/// CardType = Visa
/// ```notrust
///
/// This serves for the purpose were we have the DirKey as an explicit Enum type and value as one
/// of the member of the same Enum.
/// So particularly it lowers a pr... | crates/euclid/src/frontend/ast/lowering.rs | euclid | macro | 342 | rust | null | null | null | null | null | null | null | null | declarative | null | null | null |
pub struct ConnectorRoutingData {
pub connector_data: ConnectorData,
pub network: Option<common_enums::CardNetwork>,
} | crates/router/src/types/api/fraud_check.rs | router | struct_definition | 28 | rust | ConnectorRoutingData | null | null | null | null | null | null | null | null | null | null | null |
pub struct SignedKey {
key_value: String,
key_expiration: String,
} | crates/hyperswitch_connectors/src/connectors/fiserv/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | SignedKey | null | null | null | null | null | null | null | null | null | null | null |
impl Organization {
pub fn new(org_new: OrganizationNew) -> Self {
let OrganizationNew {
id,
organization_name,
organization_details,
metadata,
created_at,
modified_at,
version,
organization_type,
pla... | crates/diesel_models/src/organization.rs | diesel_models | impl_block | 137 | rust | null | Organization | null | impl Organization | null | null | null | null | null | null | null | null |
pub fn is_disabled(&self) -> bool {
match self {
Self::MerchantConnectorAccount(merchant_connector_account) => {
merchant_connector_account.disabled.unwrap_or(false)
}
Self::MerchantConnectorDetails(_) => false,
}
} | crates/hyperswitch_domain_models/src/merchant_connector_account.rs | hyperswitch_domain_models | function_signature | 52 | rust | null | null | null | null | is_disabled | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_convertor: &FloatMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/helcim.rs | hyperswitch_connectors | function_signature | 29 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PayoutLinkResponse
{
"type": "object",
"required": [
"payout_link_id",
"link"
],
"properties": {
"payout_link_id": {
"type": "string"
},
"link": {
"type": "string"
}
}
} | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 78 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PayoutLinkResponse"
] | null | null | null | null |
pub struct MerchantAccountUpdate {
/// Name of the Merchant Account
#[schema(example = "NewAge Retailer")]
pub merchant_name: Option<String>,
/// Details about the merchant
pub merchant_details: Option<MerchantDetails>,
/// Metadata is useful for storing additional, unstructured information on... | crates/api_models/src/admin.rs | api_models | struct_definition | 113 | rust | MerchantAccountUpdate | null | null | null | null | null | null | null | null | null | null | null |
impl api::MandateSetup for Flexiti {} | crates/hyperswitch_connectors/src/connectors/flexiti.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Flexiti | api::MandateSetup for | impl api::MandateSetup for for Flexiti | null | null | null | null | null | null | null | null |
pub struct FlowResponse {
pub next_action: Option<NextAction>,
pub redirect: Option<Redirect>,
pub return_url: Option<Url>,
} | crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs | hyperswitch_connectors | struct_definition | 33 | rust | FlowResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct KlarnaRefundSyncResponse {
pub refund_id: String,
} | crates/hyperswitch_connectors/src/connectors/klarna/transformers.rs | hyperswitch_connectors | struct_definition | 17 | rust | KlarnaRefundSyncResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn initiate_payment_link(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
path: web::Path<(
common_utils::id_type::MerchantId,
common_utils::id_type::PaymentId,
) | crates/router/src/routes/payment_link.rs | router | function_signature | 55 | rust | null | null | null | null | initiate_payment_link | null | null | null | null | null | null | null |
File: crates/api_models/src/profile_acquirer.rs
Public structs: 3
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;
#[derive(Debug, Serialize, Deserialize, ToSchema)]
pub struct ProfileAcquirerCreate {
/// The merchant id assigned by the acquirer
#[schema(value_type= String,example = "M123456789")]
... | crates/api_models/src/profile_acquirer.rs | api_models | full_file | 1,149 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let payload = json_payload.into_inner();
let flow = Flow::GsmRuleDelete;
Box::pin(api::server_wrap(
flow,
state,
&req,
payload,
|state, _, payload, _| gsm::delete_gsm_rule(state, payload),
&ADMIN_API_AUTH,
api_locking::LockAction::No... | crates/router/src/routes/gsm.rs | router | impl_block | 90 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub fn server(config: AppState) -> Scope {
use api_models::webhooks as webhook_type;
#[allow(unused_mut)]
let mut route = web::scope("/v2/webhooks")
.app_data(web::Data::new(config))
.service(
web::resource("/{merchant_id}/{profile_id}/{connector_id}")
... | crates/router/src/routes/app.rs | router | function_signature | 239 | rust | null | null | null | null | server | null | null | null | null | null | null | null |
pub struct ServiceSessionIds {
pub correlation_id: Option<String>,
pub merchant_transaction_id: Option<String>,
pub x_src_flow_id: Option<String>,
} | crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs | hyperswitch_domain_models | struct_definition | 34 | rust | ServiceSessionIds | null | null | null | null | null | null | null | null | null | null | null |
impl api::RefundSync for Datatrans {} | crates/hyperswitch_connectors/src/connectors/datatrans.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Datatrans | api::RefundSync for | impl api::RefundSync for for Datatrans | null | null | null | null | null | null | null | null |
pub struct ArchipelTransactionMetadata {
pub transaction_id: String,
pub transaction_date: String,
pub financial_network_code: Option<String>,
pub issuer_transaction_id: Option<String>,
pub response_code: Option<String>,
pub authorization_code: Option<String>,
pub payment_account_reference: ... | crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs | hyperswitch_connectors | struct_definition | 67 | rust | ArchipelTransactionMetadata | null | null | null | null | null | null | null | null | null | null | null |
pub struct Health; | crates/drainer/src/health_check.rs | drainer | struct_definition | 4 | rust | Health | null | null | null | null | null | null | null | null | null | null | null |
pub struct AirwallexRedirectFormData {
#[serde(rename = "JWT")]
jwt: Option<Secret<String>>,
#[serde(rename = "threeDSMethodData")]
three_ds_method_data: Option<Secret<String>>,
token: Option<Secret<String>>,
provider: Option<String>,
version: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs | hyperswitch_connectors | struct_definition | 67 | rust | AirwallexRedirectFormData | null | null | null | null | null | null | null | null | null | null | null |
/// Default limit for payouts list API
pub fn default_payouts_list_limit() -> u32 {
10
} | crates/common_utils/src/consts.rs | common_utils | function_signature | 28 | rust | null | null | null | null | default_payouts_list_limit | null | null | null | null | null | null | null |
impl RefundExecute for Payone {} | crates/hyperswitch_connectors/src/connectors/payone.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Payone | RefundExecute for | impl RefundExecute for for Payone | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs
Public functions: 11
Public structs: 32
use base64::Engine;
use common_enums::enums;
use common_utils::{
consts::BASE64_ENGINE,
crypto::{EncodeMessage, SignMessage},
ext_traits::{Encode, ValueExt},
types::StringMinorUnit,
};
us... | crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs#chunk0 | hyperswitch_connectors | chunk | 8,162 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl api::ConnectorAccessToken for Sift {} | crates/hyperswitch_connectors/src/connectors/sift.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Sift | api::ConnectorAccessToken for | impl api::ConnectorAccessToken for for Sift | null | null | null | null | null | null | null | null |
pub async fn get_profile_auth_event_sankey(
state: web::Data<AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<TimeRange>,
) -> impl Responder {
let flow = AnalyticsFlow::GetSankey;
let payload = json_payload.into_inner();
Box::pin(api::server_wrap(
... | crates/router/src/analytics.rs | router | function_signature | 277 | rust | null | null | null | null | get_profile_auth_event_sankey | null | null | null | null | null | null | null |
impl api::Refund for Cashtocode {} | crates/hyperswitch_connectors/src/connectors/cashtocode.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Cashtocode | api::Refund for | impl api::Refund for for Cashtocode | null | null | null | null | null | null | null | null |
pub fn validate(&self) -> Result<(), &str> {
// Validate host domain name
let host_domain_valid = self
.domain_name
.clone()
.map(|host_domain| link_utils::validate_strict_domain(&host_domain))
.unwrap_or(true);
if !host_domain_valid {
... | crates/api_models/src/admin.rs | api_models | function_signature | 154 | rust | null | null | null | null | validate | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Checkbook {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&CHECKBOOK_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*CHECKBOOK_SUPPORTED_PAYMENT_METHODS)
}
fn get... | crates/hyperswitch_connectors/src/connectors/checkbook.rs | hyperswitch_connectors | impl_block | 105 | rust | null | Checkbook | ConnectorSpecifications for | impl ConnectorSpecifications for for Checkbook | null | null | null | null | null | null | null | null |
pub struct ExecutePcrWorkflow; | crates/router/src/workflows/revenue_recovery.rs | router | struct_definition | 7 | rust | ExecutePcrWorkflow | null | null | null | null | null | null | null | null | null | null | null |
pub trait RefundFilterAnalytics: LoadRow<RefundFilterRow> {} | crates/analytics/src/refunds/filters.rs | analytics | trait_definition | 16 | rust | null | null | RefundFilterAnalytics | null | null | null | null | null | null | null | null | null |
pub struct CoBadgedCardNetworksInfo {
pub network: common_enums::CardNetwork,
pub saving_percentage: f64,
} | crates/api_models/src/open_router.rs | api_models | struct_definition | 31 | rust | CoBadgedCardNetworksInfo | null | null | null | null | null | null | null | null | null | null | null |
impl CallbackMapper {
pub async fn insert(self, conn: &PgPooledConn) -> StorageResult<Self> {
generics::generic_insert(conn, self).await
}
pub async fn find_by_id(conn: &PgPooledConn, id: &str) -> StorageResult<Self> {
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
... | crates/diesel_models/src/query/callback_mapper.rs | diesel_models | impl_block | 104 | rust | null | CallbackMapper | null | impl CallbackMapper | null | null | null | null | null | null | null | null |
pub struct NetceteraAuthenticationSuccessResponse {
#[serde(rename = "threeDSServerTransID")]
pub three_ds_server_trans_id: String,
pub trans_status: common_enums::TransactionStatus,
pub authentication_value: Option<Secret<String>>,
pub eci: Option<String>,
pub acs_challenge_mandated: Option<ACS... | crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs | hyperswitch_connectors | struct_definition | 122 | rust | NetceteraAuthenticationSuccessResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct TokenioRouterData<T> {
pub amount: StringMajorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/tokenio/transformers.rs | hyperswitch_connectors | struct_definition | 25 | rust | TokenioRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub fn get_webhook_object_from_body(
body: &[u8],
) -> CustomResult<GetnetWebhookNotificationResponseBody, errors::ConnectorError> {
let body_bytes = bytes::Bytes::copy_from_slice(body);
let parsed_param: GetnetWebhookNotificationResponse =
parse_url_encoded_to_struct(body_bytes)
.change... | crates/hyperswitch_connectors/src/connectors/getnet/transformers.rs | hyperswitch_connectors | function_signature | 213 | rust | null | null | null | null | get_webhook_object_from_body | null | null | null | null | null | null | null |
pub fn new(
profile_id: common_utils::id_type::ProfileId,
euclid_algorithm_id: common_utils::id_type::RoutingId,
decision_engine_algorithm_id: String,
is_active_rule: bool,
) -> Self {
Self {
profile_id,
euclid_algorithm_id,
decision_engine... | crates/api_models/src/routing.rs | api_models | function_signature | 80 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
impl Customer {
#[cfg(feature = "v2")]
pub async fn update_by_id(
conn: &PgPooledConn,
id: id_type::GlobalCustomerId,
customer: CustomerUpdateInternal,
) -> StorageResult<Self> {
match generics::generic_update_by_id::<<Self as HasTable>::Table, _, _, _>(
conn,
... | crates/diesel_models/src/query/customers.rs | diesel_models | impl_block | 1,094 | rust | null | Customer | null | impl Customer | null | null | null | null | null | null | null | null |
impl api::PaymentToken for Stripe {} | crates/hyperswitch_connectors/src/connectors/stripe.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Stripe | api::PaymentToken for | impl api::PaymentToken for for Stripe | null | null | null | null | null | null | null | null |
impl IncomingWebhook for Payu {
fn get_webhook_object_reference_id(
&self,
_request: &IncomingWebhookRequestDetails<'_>,
) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
Err(report!(errors::ConnectorError::WebhooksNotImplemented))
}
fn get_web... | crates/hyperswitch_connectors/src/connectors/payu.rs | hyperswitch_connectors | impl_block | 190 | rust | null | Payu | IncomingWebhook for | impl IncomingWebhook for for Payu | null | null | null | null | null | null | null | null |
pub async fn generic_delete_one_with_result<T, P, R>(
conn: &PgPooledConn,
predicate: P,
) -> StorageResult<R>
where
T: FilterDsl<P> + HasTable<Table = T> + Table + 'static,
Filter<T, P>: IntoUpdateTarget,
DeleteStatement<
<Filter<T, P> as HasTable>::Table,
<Filter<T, P> as IntoUpdat... | crates/diesel_models/src/query/generics.rs | diesel_models | function_signature | 278 | rust | null | null | null | null | generic_delete_one_with_result | null | null | null | null | null | null | null |
File: crates/router/src/db/payment_method_session.rs
#[cfg(feature = "v2")]
use crate::core::errors::{self, CustomResult};
use crate::db::MockDb;
#[cfg(feature = "v2")]
#[async_trait::async_trait]
pub trait PaymentMethodsSessionInterface {
async fn insert_payment_methods_session(
&self,
state: &co... | crates/router/src/db/payment_method_session.rs | router | full_file | 1,754 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn do_gsm_multiple_connector_actions(
state: &app::SessionState,
mut connectors_routing_data: IntoIter<api::ConnectorRoutingData>,
original_connector_data: api::ConnectorData,
payout_data: &mut PayoutData,
merchant_context: &domain::MerchantContext,
) -> RouterResult<()> {
let mut retr... | crates/router/src/core/payouts/retry.rs | router | function_signature | 369 | rust | null | null | null | null | do_gsm_multiple_connector_actions | null | null | null | null | null | null | null |
pub trait PayoutAttemptInterface {
type Error;
async fn insert_payout_attempt(
&self,
_payout_attempt: PayoutAttemptNew,
_payouts: &Payouts,
_storage_scheme: MerchantStorageScheme,
) -> error_stack::Result<PayoutAttempt, Self::Error>;
async fn update_payout_attempt(
... | crates/hyperswitch_domain_models/src/payouts/payout_attempt.rs | hyperswitch_domain_models | trait_definition | 398 | rust | null | null | PayoutAttemptInterface | null | null | null | null | null | null | null | null | null |
impl webhooks::IncomingWebhook for Fiserv {
fn get_webhook_object_reference_id(
&self,
_request: &webhooks::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> {
Err(report!(errors::ConnectorError::WebhooksNotImplemented))... | crates/hyperswitch_connectors/src/connectors/fiserv.rs | hyperswitch_connectors | impl_block | 214 | rust | null | Fiserv | webhooks::IncomingWebhook for | impl webhooks::IncomingWebhook for for Fiserv | null | null | null | null | null | null | null | null |
impl api::PaymentAuthorize for Elavon {} | crates/hyperswitch_connectors/src/connectors/elavon.rs | hyperswitch_connectors | impl_block | 10 | rust | null | Elavon | api::PaymentAuthorize for | impl api::PaymentAuthorize for for Elavon | null | null | null | null | null | null | null | null |
pub struct InjectorRequest {
/// Token data from the vault
pub token_data: TokenData,
/// Payload template to process
pub connector_payload: ConnectorPayload,
/// HTTP connection configuration
pub connection_config: ConnectionConfig,
} | crates/injector/src/types.rs | injector | struct_definition | 52 | rust | InjectorRequest | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaymentMethod {
pub customer_id: common_utils::id_type::GlobalCustomerId,
pub merchant_id: common_utils::id_type::MerchantId,
pub created_at: PrimitiveDateTime,
pub last_modified: PrimitiveDateTime,
pub payment_method_data: Option<Encryption>,
pub locker_id: Option<String>,
pub la... | crates/diesel_models/src/payment_method.rs | diesel_models | struct_definition | 291 | rust | PaymentMethod | null | null | null | null | null | null | null | null | null | null | null |
pub struct PayeezyCaptureOrVoidRequest {
transaction_tag: String,
transaction_type: PayeezyTransactionType,
amount: String,
currency_code: String,
} | crates/hyperswitch_connectors/src/connectors/payeezy/transformers.rs | hyperswitch_connectors | struct_definition | 38 | rust | PayeezyCaptureOrVoidRequest | null | null | null | null | null | null | null | null | null | null | null |
impl Responder {
let flow = AnalyticsFlow::GetSankey;
let payload = json_payload.into_inner();
Box::pin(api::server_wrap(
flow,
state,
&req,
payload,
|state, auth: AuthenticationData, req, _| async move {
let org_id = au... | crates/router/src/analytics.rs | router | impl_block | 204 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.PaymentsExternalAuthenticationResponse
{
"type": "object",
"required": [
"trans_status",
"three_ds_requestor_url"
],
"properties": {
"trans_status": {
"$ref": "#/components/schemas/TransactionStatus"
},
"acs_url": {
"type": "string",
"... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 405 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"PaymentsExternalAuthenticationResponse"
] | null | null | null | null |
pub struct TotalSmartRetries; | crates/api_models/src/analytics/payment_intents.rs | api_models | struct_definition | 7 | rust | TotalSmartRetries | null | null | null | null | null | null | null | null | null | null | null |
pub struct AtomeDetails {
shopper_phone: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs | hyperswitch_connectors | struct_definition | 14 | rust | AtomeDetails | 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.