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/router/src/db/dashboard_metadata.rs
use common_utils::id_type;
use diesel_models::{enums, user::dashboard_metadata as storage};
use error_stack::{report, ResultExt};
use router_env::{instrument, tracing};
use storage_impl::MockDb;
use crate::{
connection,
core::errors::{self, CustomResult},
s... | crates/router/src/db/dashboard_metadata.rs | router | full_file | 2,687 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct DashboardMetadata {
pub id: i32,
pub user_id: Option<String>,
pub merchant_id: id_type::MerchantId,
pub org_id: id_type::OrganizationId,
pub data_key: enums::DashboardMetadata,
pub data_value: Secret<serde_json::Value>,
pub created_by: String,
pub created_at: PrimitiveDateTime... | crates/diesel_models/src/user/dashboard_metadata.rs | diesel_models | struct_definition | 98 | rust | DashboardMetadata | null | null | null | null | null | null | null | null | null | null | null |
pub fn new() -> &'static Self {
&Self {
amount_converter: &FloatMajorUnitForConnector,
}
} | crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs | hyperswitch_connectors | function_signature | 28 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
File: crates/storage_impl/src/connection.rs
Public functions: 3
use bb8::PooledConnection;
use common_utils::errors;
use diesel::PgConnection;
use error_stack::ResultExt;
pub type PgPool = bb8::Pool<async_bb8_diesel::ConnectionManager<PgConnection>>;
pub type PgPooledConn = async_bb8_diesel::Connection<PgConnection... | crates/storage_impl/src/connection.rs | storage_impl | full_file | 512 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct AccessTokenFlowData {} | crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs | hyperswitch_domain_models | struct_definition | 6 | rust | AccessTokenFlowData | null | null | null | null | null | null | null | null | null | null | null |
pub struct AciWebhookCustomerDetails {
#[serde(rename = "givenName")]
pub given_name: Option<Secret<String>>,
pub surname: Option<Secret<String>>,
#[serde(rename = "merchantCustomerId")]
pub merchant_customer_id: Option<Secret<String>>,
pub sex: Option<Secret<String>>,
pub email: Option<Emai... | crates/hyperswitch_connectors/src/connectors/aci/transformers.rs | hyperswitch_connectors | struct_definition | 75 | rust | AciWebhookCustomerDetails | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: paths."/payments"
{
"post": {
"tags": [
"Payments"
],
"summary": "Payments - Create",
"description": "Creates a payment resource, which represents a customer's intent to pay.\nThis endpoint is the starting point for various payment flows:\n",
"operationId": "Create a Paym... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 5,651 | .json | null | null | null | null | null | openapi_spec | paths | [
"/payments"
] | null | null | null | null |
pub struct DeRoutableConnectorChoice {
pub gateway_name: RoutableConnectors,
#[schema(value_type = String)]
pub gateway_id: Option<common_utils::id_type::MerchantConnectorAccountId>,
} | crates/api_models/src/routing.rs | api_models | struct_definition | 45 | rust | DeRoutableConnectorChoice | null | null | null | null | null | null | null | null | null | null | null |
pub struct Shift4WebhookObjectResource {
pub data: serde_json::Value,
} | crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs | hyperswitch_connectors | struct_definition | 19 | rust | Shift4WebhookObjectResource | null | null | null | null | null | null | null | null | null | null | null |
pub struct AcquirerConfig {
/// The merchant id assigned by the acquirer
#[schema(value_type= String,example = "M123456789")]
pub acquirer_assigned_merchant_id: String,
/// merchant name
#[schema(value_type= String,example = "NewAge Retailer")]
pub merchant_name: String,
/// Network provider... | crates/common_types/src/domain.rs | common_types | struct_definition | 220 | rust | AcquirerConfig | null | null | null | null | null | null | null | null | null | null | null |
pub struct PaysafePaymentHandleRequest {
pub merchant_ref_num: String,
pub amount: MinorUnit,
pub settle_with_auth: bool,
pub card: PaysafeCard,
pub currency_code: enums::Currency,
pub payment_type: PaysafePaymentType,
pub transaction_type: TransactionType,
pub return_links: Vec<ReturnLi... | crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs | hyperswitch_connectors | struct_definition | 85 | rust | PaysafePaymentHandleRequest | null | null | null | null | 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 GetAuthEventMetricRequest");
let flow = AnalyticsFlow::Get... | crates/router/src/analytics.rs | router | impl_block | 282 | rust | null | Responder | null | impl Responder | null | null | null | null | null | null | null | null |
pub struct UasTokenDetails {
pub payment_token: cards::CardNumber,
pub payment_account_reference: String,
pub token_expiration_month: Secret<String>,
pub token_expiration_year: Secret<String>,
} | crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs | hyperswitch_connectors | struct_definition | 46 | rust | UasTokenDetails | null | null | null | null | null | null | null | null | null | null | null |
impl api::revenue_recovery_v2::RevenueRecoveryV2 for Recurly {} | crates/hyperswitch_connectors/src/connectors/recurly.rs | hyperswitch_connectors | impl_block | 19 | rust | null | Recurly | api::revenue_recovery_v2::RevenueRecoveryV2 for | impl api::revenue_recovery_v2::RevenueRecoveryV2 for for Recurly | null | null | null | null | null | null | null | null |
pub fn number_comparison(input: &str) -> ParseResult<&str, ast::NumberComparison> {
let operator = combinator::map_res(
branch::alt((
complete::tag(">="),
complete::tag("<="),
complete::tag(">"),
complete::tag("<"),
)),
|s: &str| match s {
... | crates/euclid/src/frontend/ast/parser.rs | euclid | function_signature | 220 | rust | null | null | null | null | number_comparison | null | null | null | null | null | null | null |
pub fn get_address(&self) -> Option<payments::AddressDetails> {
self.address.clone()
} | crates/api_models/src/customers.rs | api_models | function_signature | 24 | rust | null | null | null | null | get_address | null | null | null | null | null | null | null |
pub struct WebhookBody {
pub api_version: Option<String>,
pub id: String,
pub created: String,
pub merchant_id: common_utils::id_type::MerchantId,
#[serde(rename = "type")]
pub event_type: WebhookEvent,
pub payment: Option<serde_json::Value>,
pub refund: Option<serde_json::Value>,
pu... | crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs | hyperswitch_connectors | struct_definition | 102 | rust | WebhookBody | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentVoid for Square {} | crates/hyperswitch_connectors/src/connectors/square.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Square | api::PaymentVoid for | impl api::PaymentVoid for for Square | null | null | null | null | null | null | null | null |
pub fn get_id(&self) -> &common_utils::id_type::ProfileId {
&self.profile_id
} | crates/hyperswitch_domain_models/src/business_profile.rs | hyperswitch_domain_models | function_signature | 26 | rust | null | null | null | null | get_id | null | null | null | null | null | null | null |
pub struct EncryptDataRequest {
#[serde(flatten)]
pub identifier: Identifier,
pub data: DecryptedData,
} | crates/common_utils/src/types/keymanager.rs | common_utils | struct_definition | 27 | rust | EncryptDataRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn payments_retrieve_with_gateway_creds(
state: web::Data<app::AppState>,
req: actix_web::HttpRequest,
json_payload: web::Json<payment_types::PaymentRetrieveBodyWithCredentials>,
) -> impl Responder {
let api_auth = auth::ApiKeyAuth {
is_connected_allowed: false,
is_platform_al... | crates/router/src/routes/payments.rs | router | function_signature | 474 | rust | null | null | null | null | payments_retrieve_with_gateway_creds | null | null | null | null | null | null | null |
pub struct ExtendedCardInfoConfig {
/// Merchant public key
#[schema(value_type = String)]
pub public_key: Secret<String>,
/// TTL for extended card info
#[schema(default = 900, maximum = 7200, value_type = u16)]
#[serde(default)]
pub ttl_in_secs: TtlForExtendedCardInfo,
} | crates/api_models/src/admin.rs | api_models | struct_definition | 81 | rust | ExtendedCardInfoConfig | null | null | null | null | null | null | null | null | null | null | null |
impl CaptureUpdate {
pub fn apply_changeset(self, source: Capture) -> Capture {
let CaptureUpdateInternal {
status,
error_message,
error_code,
error_reason,
modified_at: _,
connector_capture_id,
connector_response_reference_... | crates/diesel_models/src/capture.rs | diesel_models | impl_block | 182 | rust | null | CaptureUpdate | null | impl CaptureUpdate | null | null | null | null | null | null | null | null |
File: crates/euclid/src/frontend/dir.rs
Public functions: 8
Public structs: 5
//! Domain Intermediate Representation
pub mod enums;
pub mod lowering;
pub mod transformers;
use strum::IntoEnumIterator;
// use common_utils::types::MinorUnit;
use crate::{enums as euclid_enums, frontend::ast, types};
#[macro_export]
... | crates/euclid/src/frontend/dir.rs#chunk0 | euclid | chunk | 8,190 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl Relay {
pub fn new(
relay_request: &api_models::relay::RelayRequest,
merchant_id: &id_type::MerchantId,
profile_id: &id_type::ProfileId,
) -> Self {
let relay_id = id_type::RelayId::generate();
Self {
id: relay_id.clone(),
connector_resource_i... | crates/hyperswitch_domain_models/src/relay.rs | hyperswitch_domain_models | impl_block | 208 | rust | null | Relay | null | impl Relay | null | null | null | null | null | null | null | null |
pub struct RoleInfoWithGroupsResponse {
pub role_id: String,
pub groups: Vec<PermissionGroup>,
pub role_name: String,
pub role_scope: RoleScope,
pub entity_type: EntityType,
} | crates/api_models/src/user_role/role.rs | api_models | struct_definition | 47 | rust | RoleInfoWithGroupsResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct SepaBankDebitAdditionalData {
/// Partially masked international bank account number (iban) for SEPA
#[schema(value_type = String, example = "DE8937******013000")]
pub iban: MaskedIban,
/// Bank account's owner name
#[schema(value_type = Option<String>, example = "John Doe")]
pub ban... | crates/api_models/src/payments/additional_info.rs | api_models | struct_definition | 96 | rust | SepaBankDebitAdditionalData | null | null | null | null | null | null | null | null | null | null | null |
impl api::MandateSetup for Stripebilling {} | crates/hyperswitch_connectors/src/connectors/stripebilling.rs | hyperswitch_connectors | impl_block | 11 | rust | null | Stripebilling | api::MandateSetup for | impl api::MandateSetup for for Stripebilling | null | null | null | null | null | null | null | null |
File: crates/diesel_models/src/payment_method.rs
Public functions: 10
Public structs: 15
use std::collections::HashMap;
use common_enums::MerchantStorageScheme;
use common_utils::{
encryption::Encryption,
errors::{CustomResult, ParsingError},
pii,
};
use diesel::{AsChangeset, Identifiable, Insertable, Q... | crates/diesel_models/src/payment_method.rs#chunk0 | diesel_models | chunk | 8,190 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub async fn create_payment_record_request(
&self,
state: &SessionState,
billing_merchant_connector_account_id: &id_type::MerchantConnectorAccountId,
payment_merchant_connector_account_id: Option<id_type::MerchantConnectorAccountId>,
payment_connector: Option<common_enums::connec... | crates/router/src/core/webhooks/recovery_incoming.rs | router | function_signature | 668 | rust | null | null | null | null | create_payment_record_request | null | null | null | null | null | null | null |
pub struct PazeDecryptedData {
pub client_id: Secret<String>,
pub profile_id: String,
pub token: PazeToken,
pub payment_card_network: common_enums::enums::CardNetwork,
pub dynamic_data: Vec<PazeDynamicData>,
pub billing_address: PazeAddress,
pub consumer: PazeConsumer,
pub eci: Option<St... | crates/hyperswitch_domain_models/src/router_data.rs | hyperswitch_domain_models | struct_definition | 83 | rust | PazeDecryptedData | null | null | null | null | null | null | null | null | null | null | null |
impl api::PaymentSession for Trustpay {} | crates/hyperswitch_connectors/src/connectors/trustpay.rs | hyperswitch_connectors | impl_block | 9 | rust | null | Trustpay | api::PaymentSession for | impl api::PaymentSession for for Trustpay | null | null | null | null | null | null | null | null |
impl Taxjar {
pub fn new() -> &'static Self {
&Self {
amount_converter: &FloatMajorUnitForConnector,
}
}
} | crates/hyperswitch_connectors/src/connectors/taxjar.rs | hyperswitch_connectors | impl_block | 34 | rust | null | Taxjar | null | impl Taxjar | null | null | null | null | null | null | null | null |
pub async fn exchange_token_core(
state: SessionState,
merchant_context: domain::MerchantContext,
payload: api_models::pm_auth::ExchangeTokenCreateRequest,
) -> RouterResponse<()> {
let db = &*state.store;
let config = get_selected_config_from_redis(db, &payload).await?;
let connector_name = c... | crates/router/src/core/pm_auth.rs | router | function_signature | 434 | rust | null | null | null | null | exchange_token_core | null | null | null | null | null | null | null |
pub async fn user_signin(
state: web::Data<AppState>,
http_req: HttpRequest,
json_payload: web::Json<user_api::SignInRequest>,
) -> HttpResponse {
let flow = Flow::UserSignIn;
let req_payload = json_payload.into_inner();
Box::pin(api::server_wrap(
flow.clone(),
state,
&ht... | crates/router/src/routes/user.rs | router | function_signature | 141 | rust | null | null | null | null | user_signin | null | null | null | null | null | null | null |
pub trait DisputeMetric<T>
where
T: AnalyticsDataSource + DisputeMetricAnalytics,
PrimitiveDateTime: ToSql<T>,
AnalyticsCollection: ToSql<T>,
Granularity: GroupByClause<T>,
Aggregate<&'static str>: ToSql<T>,
Window<&'static str>: ToSql<T>,
{
async fn load_metrics(
&self,
dime... | crates/analytics/src/disputes/metrics.rs | analytics | trait_definition | 144 | rust | null | null | DisputeMetric | null | null | null | null | null | null | null | null | null |
pub struct StripeConnectRecipientCreateResponse {
id: String,
} | crates/hyperswitch_connectors/src/connectors/stripe/transformers/connect.rs | hyperswitch_connectors | struct_definition | 14 | rust | StripeConnectRecipientCreateResponse | null | null | null | null | null | null | null | null | null | null | null |
pub async fn list_by_profile_id_initial_attempt_id(
conn: &PgPooledConn,
profile_id: &common_utils::id_type::ProfileId,
initial_attempt_id: &str,
) -> StorageResult<Vec<Self>> {
generics::generic_filter::<<Self as HasTable>::Table, _, _, _>(
conn,
dsl::busines... | crates/diesel_models/src/query/events.rs | diesel_models | function_signature | 127 | rust | null | null | null | null | list_by_profile_id_initial_attempt_id | null | null | null | null | null | null | null |
pub async fn find_optional_by_hashed_api_key(
conn: &PgPooledConn,
hashed_api_key: HashedApiKey,
) -> StorageResult<Option<Self>> {
generics::generic_find_one_optional::<<Self as HasTable>::Table, _, _>(
conn,
dsl::hashed_api_key.eq(hashed_api_key),
)
... | crates/diesel_models/src/query/api_keys.rs | diesel_models | function_signature | 81 | rust | null | null | null | null | find_optional_by_hashed_api_key | null | null | null | null | null | null | null |
pub async fn confirm_payment_method_intent_api() {} | crates/openapi/src/routes/payment_method.rs | openapi | function_signature | 10 | rust | null | null | null | null | confirm_payment_method_intent_api | null | null | null | null | null | null | null |
pub fn add_confirm_value_in_infra_values(
&self,
is_confirm_operation: bool,
) -> Option<serde_json::Value> {
self.infra_values.clone().map(|mut infra_values| {
if is_confirm_operation {
infra_values.as_object_mut().map(|obj| {
obj.insert(
... | crates/common_utils/src/types/keymanager.rs | common_utils | function_signature | 100 | rust | null | null | null | null | add_confirm_value_in_infra_values | null | null | null | null | null | null | null |
impl super::auth_events::metrics::AuthEventMetricAnalytics for SqlxClient {} | crates/analytics/src/sqlx.rs | analytics | impl_block | 17 | rust | null | SqlxClient | super::auth_events::metrics::AuthEventMetricAnalytics for | impl super::auth_events::metrics::AuthEventMetricAnalytics for for SqlxClient | null | null | null | null | null | null | null | null |
impl ApiEventMetric for PaymentsRedirectResponseData {
fn get_api_event_type(&self) -> Option<ApiEventsType> {
Some(ApiEventsType::PaymentRedirectionResponse {
connector: self.connector.clone(),
payment_id: match &self.resource_id {
api_models::payments::PaymentIdType... | crates/router/src/events/api_logs.rs | router | impl_block | 87 | rust | null | PaymentsRedirectResponseData | ApiEventMetric for | impl ApiEventMetric for for PaymentsRedirectResponseData | null | null | null | null | null | null | null | null |
pub struct DefaultSdkType {
/// SDK Variant: SDK implementation characteristics
/// - Length: 2 characters
/// - Values accepted:
/// - 01 = Native
/// - 02–79 = Reserved for EMVCo future use (values invalid until defined by EMVCo)
/// - 80–99 = Reserved for DS use
sd... | crates/hyperswitch_connectors/src/connectors/netcetera/netcetera_types.rs | hyperswitch_connectors | struct_definition | 157 | rust | DefaultSdkType | null | null | null | null | null | null | null | null | null | null | null |
pub fn new(
connector_label: String,
merchant_connector_id: id_type::MerchantConnectorAccountId,
) -> Self {
Self {
connector_label,
merchant_connector_id,
}
} | crates/api_models/src/admin.rs | api_models | function_signature | 43 | rust | null | null | null | null | new | null | null | null | null | null | null | null |
pub struct MifinityErrorList {
#[serde(rename = "type")]
pub error_type: String,
pub error_code: String,
pub message: String,
pub field: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/mifinity/transformers.rs | hyperswitch_connectors | struct_definition | 44 | rust | MifinityErrorList | null | null | null | null | null | null | null | null | null | null | null |
pub(crate) fn get_payapl_webhooks_event(
event: PaypalWebhookEventType,
outcome: Option<OutcomeCode>,
) -> IncomingWebhookEvent {
match event {
PaypalWebhookEventType::PaymentCaptureCompleted
| PaypalWebhookEventType::CheckoutOrderCompleted => {
IncomingWebhookEvent::PaymentInten... | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | function_signature | 558 | rust | null | null | null | null | get_payapl_webhooks_event | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/billwerk.rs
Public functions: 1
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use api_models::webhooks::{IncomingWebhookEvent, ObjectReferenceId};
use base64::Engine;
use common_enums::enums;
use common_utils::{
consts::BASE64_ENGINE,
er... | crates/hyperswitch_connectors/src/connectors/billwerk.rs | hyperswitch_connectors | full_file | 6,590 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct ForteLink {
pub disputes: String,
pub settlements: String,
#[serde(rename = "self")]
pub self_url: String,
} | crates/hyperswitch_connectors/src/connectors/forte/transformers.rs | hyperswitch_connectors | struct_definition | 34 | rust | ForteLink | null | null | null | null | null | null | null | null | null | null | null |
pub struct DebitRoutingResult {
pub debit_routing_connector_call_type: ConnectorCallType,
pub debit_routing_output: open_router::DebitRoutingOutput,
} | crates/router/src/core/debit_routing.rs | router | struct_definition | 34 | rust | DebitRoutingResult | null | null | null | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.GooglePayWalletData
{
"type": "object",
"required": [
"type",
"description",
"info",
"tokenization_data"
],
"properties": {
"type": {
"type": "string",
"description": "The type of payment method"
},
"description": {
"type": "st... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 157 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"GooglePayWalletData"
] | null | null | null | null |
let merchant = state
.store()
.find_merchant_account_by_merchant_id(
key_manager_state,
&payload.merchant_id,
&key_store,
)
.await
.to_not_found_response(errors::ApiErrorResponse::InvalidJwtToken)
... | crates/router/src/services/authentication.rs#chunk3 | router | chunk | 8,191 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs
Public functions: 1
Public structs: 7
use std::collections::HashMap;
use base64::Engine;
use common_enums::enums;
use common_utils::{crypto::GenerateDigest, date_time, pii::Email, request::Method};
use error_stack::ResultExt;
use hyperswitch_dom... | crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs#chunk0 | hyperswitch_connectors | chunk | 8,192 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct WellsfargoRouterData<T> {
pub amount: StringMajorUnit,
pub router_data: T,
} | crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs | hyperswitch_connectors | struct_definition | 26 | rust | WellsfargoRouterData | null | null | null | null | null | null | null | null | null | null | null |
pub async fn cancel_payout(
state: &SessionState,
merchant_context: &domain::MerchantContext,
connector_data: &api::ConnectorData,
payout_data: &mut PayoutData,
) -> RouterResult<()> {
// 1. Form Router data
let router_data = core_utils::construct_payout_router_data(
state,
conne... | crates/router/src/core/payouts.rs | router | function_signature | 1,000 | rust | null | null | null | null | cancel_payout | null | null | null | null | null | null | null |
pub struct PaymentsCollectionItem {
amount: OrderAmount,
expiration_time: Option<String>,
id: String,
final_capture: Option<bool>,
status: PaypalPaymentStatus,
} | crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs | hyperswitch_connectors | struct_definition | 39 | rust | PaymentsCollectionItem | null | null | null | null | null | null | null | null | null | null | null |
Documentation: api-reference/v1/payments/setup--instructions.mdx
# Type: Doc File
---
tags: [Payments]
sidebarTitle: "Setup Instructions"
icon: "flag"
iconType: "solid"
---
The **Hyperswitch Payments API** enables businesses to **accept, process, and manage payments seamlessly**. It supports the entire **payment lifec... | api-reference/v1/payments/setup--instructions.mdx | null | doc_file | 893 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
- **connectors:** Fix wallet token deserialization error ([#4133](https://github.com/juspay/hyperswitch/pull/4133)) ([`929848f`](https://github.com/juspay/hyperswitch/commit/929848f8713b45daf479ba24fb0a49b8e327b6fd))
- **core:** Amount capturable remain same for `processing` status in capture ([#4229](https://github.c... | CHANGELOG.md#chunk36 | null | doc_chunk | 8,137 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Moneris {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&MONERIS_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*MONERIS_SUPPORTED_PAYMENT_METHODS)
}
fn get_supp... | crates/hyperswitch_connectors/src/connectors/moneris.rs | hyperswitch_connectors | impl_block | 109 | rust | null | Moneris | ConnectorSpecifications for | impl ConnectorSpecifications for for Moneris | null | null | null | null | null | null | null | null |
impl AuthenticationId {
/// Generate Authentication Id from prefix
pub fn generate_authentication_id(prefix: &'static str) -> Self {
Self(crate::generate_ref_id_with_default_length(prefix))
}
/// Get external authentication request poll id
pub fn get_external_authentication_request_poll_id(... | crates/common_utils/src/id_type/authentication.rs | common_utils | impl_block | 80 | rust | null | AuthenticationId | null | impl AuthenticationId | null | null | null | null | null | null | null | null |
File: crates/hyperswitch_connectors/src/connectors/authipay.rs
Public functions: 2
Public structs: 1
pub mod transformers;
use std::sync::LazyLock;
use base64::Engine;
use common_enums::enums;
use common_utils::{
errors::CustomResult,
ext_traits::BytesExt,
request::{Method, Request, RequestBuilder, Req... | crates/hyperswitch_connectors/src/connectors/authipay.rs | hyperswitch_connectors | full_file | 6,315 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct AuthorizedResponse {
pub payment_instrument: PaymentsResPaymentInstrument,
#[serde(skip_serializing_if = "Option::is_none")]
pub issuer: Option<Issuer>,
#[serde(skip_serializing_if = "Option::is_none")]
pub scheme: Option<PaymentsResponseScheme>,
#[serde(rename = "_links", skip_serial... | crates/hyperswitch_connectors/src/connectors/worldpay/response.rs | hyperswitch_connectors | struct_definition | 181 | rust | AuthorizedResponse | null | null | null | null | null | null | null | null | null | null | null |
pub struct DeletePaymentMethodFromVault {
client_mutation_id: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 18 | rust | DeletePaymentMethodFromVault | null | null | null | null | null | null | null | null | null | null | null |
impl AwsSes {
/// Constructs a new AwsSes client
pub async fn create(
conf: &EmailSettings,
ses_config: &SESConfig,
proxy_url: Option<impl AsRef<str>>,
) -> Self {
// Build the client initially which will help us know if the email configuration is correct
Self::create... | crates/external_services/src/email/ses.rs | external_services | impl_block | 811 | rust | null | AwsSes | null | impl AwsSes | null | null | null | null | null | null | null | null |
pub struct OutgoingWebhookLogsResult {
pub merchant_id: common_utils::id_type::MerchantId,
pub event_id: String,
pub event_type: String,
pub outgoing_webhook_event_type: String,
pub payment_id: common_utils::id_type::PaymentId,
pub refund_id: Option<String>,
pub attempt_id: Option<String>,
... | crates/analytics/src/outgoing_webhook_event/events.rs | analytics | struct_definition | 151 | rust | OutgoingWebhookLogsResult | null | null | null | null | null | null | null | null | null | null | null |
pub struct ChargebeeCardDetails {
funding_type: ChargebeeFundingType,
brand: common_enums::CardNetwork,
iin: String,
} | crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs | hyperswitch_connectors | struct_definition | 34 | rust | ChargebeeCardDetails | null | null | null | null | null | null | null | null | null | null | null |
pub async fn validate_data_for_blocklist<F>(
state: &SessionState,
merchant_context: &domain::MerchantContext,
payment_data: &mut PaymentData<F>,
) -> CustomResult<bool, errors::ApiErrorResponse>
where
F: Send + Clone,
{
let db = &state.store;
let merchant_id = merchant_context.get_merchant_acco... | crates/router/src/core/blocklist/utils.rs | router | function_signature | 1,141 | rust | null | null | null | null | validate_data_for_blocklist | null | null | null | null | null | null | null |
File: crates/router/src/types/storage/blocklist_fingerprint.rs
pub use diesel_models::blocklist_fingerprint::{BlocklistFingerprint, BlocklistFingerprintNew};
| crates/router/src/types/storage/blocklist_fingerprint.rs | router | full_file | 34 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct RelayUpdateInternal {
pub connector_reference_id: Option<String>,
pub status: Option<storage_enums::RelayStatus>,
pub error_code: Option<String>,
pub error_message: Option<String>,
pub modified_at: PrimitiveDateTime,
} | crates/diesel_models/src/relay.rs | diesel_models | struct_definition | 54 | rust | RelayUpdateInternal | null | null | null | null | null | null | null | null | null | null | null |
pub struct AdditionalErrorDetails {
pub legacy_code: Option<String>,
} | crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs | hyperswitch_connectors | struct_definition | 15 | rust | AdditionalErrorDetails | null | null | null | null | null | null | null | null | null | null | null |
pub struct TransactionDetailsUiConfiguration {
/// Position of the key-value pair in the UI
#[schema(value_type = Option<i8>, example = 5)]
pub position: Option<i8>,
/// Whether the key should be bold
#[schema(default = false, example = true)]
pub is_key_bold: Option<bool>,
/// Whether the v... | crates/api_models/src/admin.rs | api_models | struct_definition | 101 | rust | TransactionDetailsUiConfiguration | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorPreAuthentication for Gpayments {} | crates/hyperswitch_connectors/src/connectors/gpayments.rs | hyperswitch_connectors | impl_block | 8 | rust | null | Gpayments | ConnectorPreAuthentication for | impl ConnectorPreAuthentication for for Gpayments | null | null | null | null | null | null | null | null |
pub async fn get_action_url(
state: web::Data<AppState>,
http_req: HttpRequest,
json_payload: web::Json<api_types::ActionUrlRequest>,
) -> HttpResponse {
let flow = Flow::GetActionUrl;
let req_payload = json_payload.into_inner();
Box::pin(api::server_wrap(
flow.clone(),
state,
... | crates/router/src/routes/connector_onboarding.rs | router | function_signature | 131 | rust | null | null | null | null | get_action_url | null | null | null | null | null | null | null |
File: crates/router/src/core/authentication/utils.rs
Public functions: 5
use common_utils::ext_traits::AsyncExt;
use error_stack::ResultExt;
use hyperswitch_domain_models::router_data_v2::ExternalAuthenticationFlowData;
use masking::ExposeInterface;
use crate::{
consts,
core::{
errors::{self, Connect... | crates/router/src/core/authentication/utils.rs | router | full_file | 2,857 | null | null | null | null | null | null | null | null | null | null | null | null | null |
File: crates/storage_impl/src/address.rs
use diesel_models::address::Address;
use crate::redis::kv_store::KvStorePartition;
impl KvStorePartition for Address {}
| crates/storage_impl/src/address.rs | storage_impl | full_file | 37 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct CardsInfoUpdateForm {
#[multipart(limit = "1MB")]
pub file: Bytes,
} | crates/router/src/core/cards_info.rs | router | struct_definition | 23 | rust | CardsInfoUpdateForm | null | null | null | null | null | null | null | null | null | null | null |
impl Profile {
pub fn server(state: AppState) -> Scope {
let mut route = web::scope("/account/{account_id}/business_profile")
.app_data(web::Data::new(state))
.service(
web::resource("")
.route(web::post().to(profiles::profile_create))
... | crates/router/src/routes/app.rs | router | impl_block | 671 | rust | null | Profile | null | impl Profile | null | null | null | null | null | null | null | null |
pub async fn recovery_receive_incoming_webhook<W: types::OutgoingWebhookType>(
state: web::Data<AppState>,
req: HttpRequest,
body: web::Bytes,
path: web::Path<(
common_utils::id_type::MerchantId,
common_utils::id_type::ProfileId,
common_utils::id_type::MerchantConnectorAccountId,... | crates/router/src/routes/recovery_webhooks.rs | router | function_signature | 81 | rust | null | null | null | null | recovery_receive_incoming_webhook | null | null | null | null | null | null | null |
pub async fn deep_health_check_func(
conf: web::Data<Settings>,
store: &Arc<Store>,
) -> Result<DrainerHealthCheckResponse, error_stack::Report<HealthCheckError>> {
logger::info!("Deep health check was called");
logger::debug!("Database health check begin");
let db_status = store
.health_c... | crates/drainer/src/health_check.rs | drainer | function_signature | 238 | rust | null | null | null | null | deep_health_check_func | null | null | null | null | null | null | null |
impl webhooks::IncomingWebhook for Inespay {
fn get_webhook_source_verification_algorithm(
&self,
_request: &webhooks::IncomingWebhookRequestDetails<'_>,
) -> CustomResult<Box<dyn crypto::VerifySignature + Send>, errors::ConnectorError> {
Ok(Box::new(crypto::HmacSha256))
}
fn ge... | crates/hyperswitch_connectors/src/connectors/inespay.rs | hyperswitch_connectors | impl_block | 1,070 | rust | null | Inespay | webhooks::IncomingWebhook for | impl webhooks::IncomingWebhook for for Inespay | null | null | null | null | null | null | null | null |
pub struct FraudCheckFulfillmentData {
pub amount: i64,
pub order_details: Option<Vec<Secret<serde_json::Value>>>,
pub fulfillment_req: FrmFulfillmentRequest,
} | crates/hyperswitch_domain_models/src/router_request_types/fraud_check.rs | hyperswitch_domain_models | struct_definition | 45 | rust | FraudCheckFulfillmentData | null | null | null | null | null | null | null | null | null | null | null |
File: crates/drainer/src/query.rs
use std::sync::Arc;
use common_utils::errors::CustomResult;
use diesel_models::errors::DatabaseError;
use crate::{kv, logger, metrics, pg_connection, services::Store};
#[async_trait::async_trait]
pub trait ExecuteQuery {
async fn execute_query(
self,
store: &Arc... | crates/drainer/src/query.rs | drainer | full_file | 498 | null | null | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorSpecifications for Tokenio {
fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {
Some(&TOKENIO_CONNECTOR_INFO)
}
fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> {
Some(&*TOKENIO_SUPPORTED_PAYMENT_METHODS)
}
fn get_supp... | crates/hyperswitch_connectors/src/connectors/tokenio.rs | hyperswitch_connectors | impl_block | 105 | rust | null | Tokenio | ConnectorSpecifications for | impl ConnectorSpecifications for for Tokenio | null | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.CardToken
{
"type": "object",
"required": [
"card_holder_name"
],
"properties": {
"card_holder_name": {
"type": "string",
"description": "The card holder's name",
"example": "John Test"
},
"card_cvc": {
"type": "string",
"descr... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 110 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"CardToken"
] | null | null | null | null |
/// Get the encrypted Apple Pay payment data, returning an error if it does not exist
pub fn get_encrypted_apple_pay_payment_data_mandatory(
&self,
) -> Result<&String, errors::ValidationError> {
self.get_encrypted_apple_pay_payment_data_optional()
.get_required_value("Encrypted Appl... | crates/common_types/src/payments.rs | common_types | function_signature | 90 | rust | null | null | null | null | get_encrypted_apple_pay_payment_data_mandatory | null | null | null | null | null | null | null |
pub struct DecisionEngineConfigSetupRequest {
pub merchant_id: String,
pub config: DecisionEngineConfigVariant,
} | crates/api_models/src/open_router.rs | api_models | struct_definition | 25 | rust | DecisionEngineConfigSetupRequest | null | null | null | null | null | null | null | null | null | null | null |
pub async fn generic_list_roles_by_entity_type(
conn: &PgPooledConn,
payload: ListRolesByEntityPayload,
is_lineage_data_required: bool,
tenant_id: id_type::TenantId,
org_id: id_type::OrganizationId,
) -> StorageResult<Vec<Self>> {
let mut query = <Self as HasTable>::t... | crates/diesel_models/src/query/role.rs | diesel_models | function_signature | 476 | rust | null | null | null | null | generic_list_roles_by_entity_type | null | null | null | null | null | null | null |
pub async fn log_dispute(
&self,
dispute: &Dispute,
old_dispute: Option<Dispute>,
tenant_id: TenantID,
) -> MQResult<()> {
if let Some(negative_event) = old_dispute {
self.log_event(&KafkaEvent::old(
&KafkaDispute::from_storage(&negative_event),
... | crates/router/src/services/kafka.rs | router | function_signature | 240 | rust | null | null | null | null | log_dispute | null | null | null | null | null | null | null |
OpenAPI Block Path: components.schemas.RoutableConnectors
{
"type": "string",
"description": "RoutableConnectors are the subset of Connectors that are eligible for payments routing",
"enum": [
"authipay",
"adyenplatform",
"stripe_billing_test",
"phonypay",
"fauxpay",
"pretendpay",
"str... | ./hyperswitch/api-reference/v1/openapi_spec_v1.json | null | openapi_block | 687 | .json | null | null | null | null | null | openapi_spec | components | [
"schemas",
"RoutableConnectors"
] | null | null | null | null |
File: crates/router/src/routes/cards_info.rs
Public functions: 4
use actix_multipart::form::MultipartForm;
use actix_web::{web, HttpRequest, HttpResponse, Responder};
use api_models::cards_info as cards_info_api_types;
use router_env::{instrument, tracing, Flow};
use super::app::AppState;
use crate::{
core::{api... | crates/router/src/routes/cards_info.rs | router | full_file | 1,032 | null | null | null | null | null | null | null | null | null | null | null | null | null |
pub fn diesel_enum_derive_string(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let ast = syn::parse_macro_input!(input as syn::DeriveInput);
let tokens = macros::diesel_enum_text_derive_inner(&ast)
.unwrap_or_else(|error| error.to_compile_error());
tokens.into()
} | crates/router_derive/src/lib.rs | router_derive | function_signature | 74 | rust | null | null | null | null | diesel_enum_derive_string | null | null | null | null | null | null | null |
pub fn num_i64(input: &str) -> ParseResult<&str, i64> {
error::context(
"num_i32",
combinator::map_res(
complete::take_while1(|c: char| c.is_ascii_digit()),
|o: &str| {
o.parse::<i64>()
.map_err(|_| EuclidError::InvalidNumber(o.to_string())... | crates/euclid/src/frontend/ast/parser.rs | euclid | function_signature | 98 | rust | null | null | null | null | num_i64 | null | null | null | null | null | null | null |
pub fn get_shipping_cost(&self) -> Option<MinorUnit> {
self.shipping_cost
} | crates/hyperswitch_domain_models/src/payments/payment_attempt.rs | hyperswitch_domain_models | function_signature | 23 | rust | null | null | null | null | get_shipping_cost | null | null | null | null | null | null | null |
pub struct NetworkTransactionIdAndCardDetails {
/// The card number
#[schema(value_type = String, example = "4242424242424242")]
pub card_number: cards::CardNumber,
/// The card's expiry month
#[schema(value_type = String, example = "24")]
pub card_exp_month: Secret<String>,
/// The card's... | crates/api_models/src/mandates.rs | api_models | struct_definition | 367 | rust | NetworkTransactionIdAndCardDetails | null | null | null | null | null | null | null | null | null | null | null |
pub async fn get_gsm_rule() {} | crates/openapi/src/routes/gsm.rs | openapi | function_signature | 9 | rust | null | null | null | null | get_gsm_rule | null | null | null | null | null | null | null |
Documentation: api-reference/v2/profile/profile--retrieve.mdx
# Type: Doc File
---
openapi: get /v2/profiles/{id}
--- | api-reference/v2/profile/profile--retrieve.mdx | null | doc_file | 33 | doc | null | null | null | null | null | null | null | null | null | null | null | null |
pub struct Dsync; | crates/hyperswitch_domain_models/src/router_flow_types/dispute.rs | hyperswitch_domain_models | struct_definition | 5 | rust | Dsync | null | null | null | null | null | null | null | null | null | null | null |
impl ConnectorCommon for Bankofamerica {
fn id(&self) -> &'static str {
"bankofamerica"
}
fn get_currency_unit(&self) -> api::CurrencyUnit {
api::CurrencyUnit::Base
}
fn common_get_content_type(&self) -> &'static str {
"application/json;charset=utf-8"
}
fn base_url... | crates/hyperswitch_connectors/src/connectors/bankofamerica.rs | hyperswitch_connectors | impl_block | 721 | rust | null | Bankofamerica | ConnectorCommon for | impl ConnectorCommon for for Bankofamerica | null | null | null | null | null | null | null | null |
pub struct DisputePollingIntervalInHours(i32); | crates/common_types/src/primitive_wrappers.rs | common_types | struct_definition | 13 | rust | DisputePollingIntervalInHours | null | null | null | null | null | null | null | null | null | null | null |
File: crates/router/tests/connectors/zsl.rs
use router::types::{self, storage::enums};
use test_utils::connector_auth;
use crate::utils::{self, ConnectorActions};
struct ZslTest;
impl ConnectorActions for ZslTest {}
impl utils::Connector for ZslTest {
fn get_data(&self) -> types::api::ConnectorData {
use... | crates/router/tests/connectors/zsl.rs | router | full_file | 387 | 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.