feat(router): add payments authentication api flow (#3996)

Co-authored-by: hrithikesh026 <hrithikesh.vm@juspay.in>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Hrithikesh <61539176+hrithikesh026@users.noreply.github.com>
This commit is contained in:
Sai Harsha Vardhan
2024-03-09 12:46:09 +05:30
committed by GitHub
parent c27a235edc
commit 41556baed9
7 changed files with 475 additions and 1 deletions

View File

@ -78,6 +78,7 @@ Never share your secret api keys. Keep them guarded and secure.
routes::payments::payments_list,
routes::payments::payments_incremental_authorization,
routes::payment_link::payment_link_retrieve,
routes::payments::payments_external_authentication,
// Routes for refunds
routes::refunds::refunds_create,

View File

@ -450,3 +450,23 @@ pub fn payments_list() {}
security(("api_key" = []))
)]
pub fn payments_incremental_authorization() {}
/// Payments - External 3DS Authentication
///
/// External 3DS Authentication is performed and returns the AuthenticationResponse
#[utoipa::path(
post,
path = "/payments/{payment_id}/3ds/authentication",
request_body=PaymentsExternalAuthenticationRequest,
params(
("payment_id" = String, Path, description = "The identifier for payment")
),
responses(
(status = 200, description = "Authentication created", body = PaymentsExternalAuthenticationResponse),
(status = 400, description = "Missing mandatory fields")
),
tag = "Payments",
operation_id = "Initiate external authentication for a Payment",
security(("publishable_key" = []))
)]
pub fn payments_external_authentication() {}