feat(router): add api models and openapi changes for payments submit eligibility api (#9568)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sai Harsha Vardhan
2025-10-01 17:51:29 +05:30
committed by GitHub
parent 46c434e946
commit dea34c45c0
7 changed files with 152 additions and 3 deletions

View File

@ -8004,6 +8004,8 @@ pub enum NextActionCall {
Sync,
/// The next action call is Complete Authorize
CompleteAuthorize,
/// The next action is to await for a merchant callback
AwaitMerchantCallback,
}
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, ToSchema)]
@ -9272,6 +9274,26 @@ pub struct ClickToPaySessionResponse {
pub dpa_client_id: Option<String>,
}
#[derive(Debug, serde::Deserialize, Clone, ToSchema)]
pub struct PaymentsEligibilityRequest {
/// Token used for client side verification
#[schema(value_type = String, example = "pay_U42c409qyHwOkWo3vK60_secret_el9ksDkiB8hi6j9N78yo")]
pub client_secret: Secret<String>,
/// The payment method to be used for the payment
#[schema(value_type = PaymentMethod, example = "wallet")]
pub payment_method_type: api_enums::PaymentMethod,
/// The payment method type to be used for the payment
#[schema(value_type = Option<PaymentMethodType>)]
pub payment_method_subtype: Option<api_enums::PaymentMethodType>,
/// The payment instrument data to be used for the payment
pub payment_method_data: PaymentMethodDataRequest,
}
#[derive(Debug, serde::Serialize, Clone, ToSchema)]
pub struct PaymentsEligibilityResponse {
pub sdk_next_action: Option<SdkNextAction>,
}
#[cfg(feature = "v1")]
#[cfg(test)]
mod payments_request_api_contract {