mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
chore: v2 api changes for session token endpoint (#6032)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -87,6 +87,9 @@ Never share your secret api keys. Keep them guarded and secure.
|
||||
routes::merchant_account::merchant_account_update,
|
||||
routes::merchant_account::profiles_list,
|
||||
|
||||
// Routes for payments
|
||||
routes::payments::payments_connector_session,
|
||||
|
||||
// Routes for profile
|
||||
routes::profile::profile_create,
|
||||
routes::profile::profile_retrieve,
|
||||
|
||||
@ -381,12 +381,31 @@ pub fn payments_confirm() {}
|
||||
)]
|
||||
pub fn payments_capture() {}
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
/// Payments - Session token
|
||||
///
|
||||
/// Creates a session object or a session token for wallets like Apple Pay, Google Pay, etc. These tokens are used by Hyperswitch's SDK to initiate these wallets' SDK.
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/payments/session_tokens",
|
||||
request_body=PaymentsSessionRequest,
|
||||
responses(
|
||||
(status = 200, description = "Payment session object created or session token was retrieved from wallets", body = PaymentsSessionResponse),
|
||||
(status = 400, description = "Missing mandatory fields")
|
||||
),
|
||||
tag = "Payments",
|
||||
operation_id = "Create Session tokens for a Payment",
|
||||
security(("publishable_key" = []))
|
||||
)]
|
||||
pub fn payments_connector_session() {}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
/// Payments - Session token
|
||||
///
|
||||
/// Creates a session object or a session token for wallets like Apple Pay, Google Pay, etc. These tokens are used by Hyperswitch's SDK to initiate these wallets' SDK.
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/payments/session_tokens",
|
||||
path = "/v2/payments/{payment_id}/create_external_sdk_tokens",
|
||||
request_body=PaymentsSessionRequest,
|
||||
responses(
|
||||
(status = 200, description = "Payment session object created or session token was retrieved from wallets", body = PaymentsSessionResponse),
|
||||
|
||||
Reference in New Issue
Block a user