feat(core): add payments post_session_tokens flow (#6202)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Swangi Kumari
2024-10-15 18:29:16 +05:30
committed by GitHub
parent d06d19fc96
commit 53e82c3fae
41 changed files with 1572 additions and 108 deletions

View File

@ -82,6 +82,7 @@ Never share your secret api keys. Keep them guarded and secure.
routes::payment_link::payment_link_retrieve,
routes::payments::payments_external_authentication,
routes::payments::payments_complete_authorize,
routes::payments::payments_post_session_tokens,
// Routes for refunds
routes::refunds::refunds_create,
@ -646,6 +647,8 @@ Never share your secret api keys. Keep them guarded and secure.
api_models::payments::WalletResponseData,
api_models::payments::PaymentsDynamicTaxCalculationResponse,
api_models::payments::DisplayAmountOnSdk,
api_models::payments::PaymentsPostSessionTokensRequest,
api_models::payments::PaymentsPostSessionTokensResponse,
)),
modifiers(&SecurityAddon)
)]

View File

@ -583,6 +583,24 @@ pub fn payments_complete_authorize() {}
pub fn payments_dynamic_tax_calculation() {}
/// Payments - Post Session Tokens
///
///
#[utoipa::path(
post,
path = "/payments/{payment_id}/post_session_tokens",
request_body=PaymentsPostSessionTokensRequest,
responses(
(status = 200, description = "Post Session Token is done", body = PaymentsPostSessionTokensResponse),
(status = 400, description = "Missing mandatory fields")
),
tag = "Payments",
operation_id = "Create Post Session Tokens for a Payment",
security(("publishable_key" = []))
)]
pub fn payments_post_session_tokens() {}
/// Payments - Create Intent
///
/// **Creates a payment intent object when amount_details are passed.**