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

@ -86,6 +86,7 @@ Never share your secret api keys. Keep them guarded and secure.
routes::payments::payments_complete_authorize,
routes::payments::payments_post_session_tokens,
routes::payments::payments_update_metadata,
routes::payments::payments_submit_eligibility,
// Routes for relay
routes::relay::relay,
@ -490,6 +491,9 @@ Never share your secret api keys. Keep them guarded and secure.
api_models::payments::PaymentsConfirmRequest,
api_models::payments::PaymentsResponse,
api_models::payments::PaymentsCreateResponseOpenApi,
api_models::payments::PaymentsEligibilityRequest,
api_models::payments::PaymentsEligibilityResponse,
api_models::payments::PaymentsCreateResponseOpenApi,
api_models::errors::types::GenericErrorResponseOpenApi,
api_models::payments::PaymentRetrieveBody,
api_models::payments::PaymentsRetrieveRequest,

View File

@ -1012,6 +1012,24 @@ pub fn payments_post_session_tokens() {}
)]
pub fn payments_update_metadata() {}
/// Payments - Submit Eligibility Data
#[utoipa::path(
post,
path = "/payments/{payment_id}/eligibility",
params(
("payment_id" = String, Path, description = "The identifier for payment")
),
request_body=PaymentsEligibilityRequest,
responses(
(status = 200, description = "Eligbility submit is successful", body = PaymentsEligibilityResponse),
(status = 400, description = "Bad Request", body = GenericErrorResponseOpenApi)
),
tag = "Payments",
operation_id = "Submit Eligibility data for a Payment",
security(("publishable_key" = []))
)]
pub fn payments_submit_eligibility() {}
/// Payments - Create Intent
///
/// **Creates a payment intent object when amount_details are passed.**