diff --git a/crates/api_models/src/enums.rs b/crates/api_models/src/enums.rs index 4fdc5dc488..ec38f147dd 100644 --- a/crates/api_models/src/enums.rs +++ b/crates/api_models/src/enums.rs @@ -559,7 +559,8 @@ pub enum RoutableConnectors { Worldpay, } -#[derive(Debug, serde::Deserialize, serde::Serialize, Clone)] +/// Wallets which support obtaining session object +#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)] #[serde(rename_all = "snake_case")] pub enum SupportedWallets { Paypal, diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs index 1d50c88a08..ddbf7325fd 100644 --- a/crates/api_models/src/payments.rs +++ b/crates/api_models/src/payments.rs @@ -399,10 +399,13 @@ pub enum PaymentMethodDataResponse { Paypal, } -#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)] +#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize, ToSchema)] pub enum PaymentIdType { + /// The identifier for payment intent PaymentIntentId(String), + /// The identifier for connector transaction ConnectorTransactionId(String), + /// The identifier for payment attempt PaymentAttemptId(String), } @@ -515,13 +518,19 @@ pub struct PhoneDetails { pub country_code: Option, } -#[derive(Debug, Clone, Default, Eq, PartialEq, serde::Deserialize)] +#[derive(Debug, Clone, Default, Eq, PartialEq, serde::Deserialize, ToSchema)] pub struct PaymentsCaptureRequest { + /// The unique identifier for the payment pub payment_id: Option, + /// The unique identifier for the merchant pub merchant_id: Option, + /// The Amount to be captured/ debited from the user's payment method. pub amount_to_capture: Option, + /// Decider to refund the uncaptured amount pub refund_uncaptured_amount: Option, + /// Provides information about a card payment that customers see on their statements. pub statement_descriptor_suffix: Option, + /// Concatenated with the statement descriptor suffix that’s set on the account to form the complete statement descriptor. pub statement_descriptor_prefix: Option, } @@ -670,33 +679,44 @@ pub struct PaymentsResponse { pub error_message: Option, } -#[derive(Clone, Debug, serde::Deserialize)] +#[derive(Clone, Debug, serde::Deserialize, ToSchema)] #[serde(deny_unknown_fields)] pub struct PaymentListConstraints { + /// The identifier for customer pub customer_id: Option, + /// A cursor for use in pagination, fetch the next list after some object pub starting_after: Option, + /// A cursor for use in pagination, fetch the previous list before some object pub ending_before: Option, + /// limit on the number of objects to return #[serde(default = "default_limit")] pub limit: i64, + /// The time at which payment is created #[serde(default, with = "common_utils::custom_serde::iso8601::option")] pub created: Option, + /// Time less than the payment created time #[serde(default, with = "common_utils::custom_serde::iso8601::option")] #[serde(rename = "created.lt")] pub created_lt: Option, + /// Time greater than the payment created time #[serde(default, with = "common_utils::custom_serde::iso8601::option")] #[serde(rename = "created.gt")] pub created_gt: Option, + /// Time less than or equals to the payment created time #[serde(default, with = "common_utils::custom_serde::iso8601::option")] #[serde(rename = "created.lte")] pub created_lte: Option, + /// Time greater than or equals to the payment created time #[serde(default, with = "common_utils::custom_serde::iso8601::option")] #[serde(rename = "created.gte")] pub created_gte: Option, } -#[derive(Clone, Debug, serde::Serialize)] +#[derive(Clone, Debug, serde::Serialize, ToSchema)] pub struct PaymentListResponse { + /// The number of payments included in the list pub size: usize, + // The list of payments response objects pub data: Vec, } @@ -949,12 +969,17 @@ pub struct PaymentsResponseForm { pub order_id: String, } -#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone)] +#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)] pub struct PaymentsRetrieveRequest { + /// The type of ID (ex: payment intent id, payment attempt id or connector txn id) pub resource_id: PaymentIdType, + /// The identifier for the Merchant Account. pub merchant_id: Option, + /// Decider to enable or disable the connector call for retrieve request pub force_sync: bool, + /// The parameters passed to a retrieve request pub param: Option, + /// The name of the connector pub connector: Option, } @@ -978,119 +1003,171 @@ pub struct Metadata { pub data: serde_json::Value, } -#[derive(Debug, serde::Deserialize, serde::Serialize, Clone)] +#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)] pub struct PaymentsSessionRequest { + /// The identifier for the payment pub payment_id: String, + /// This is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK pub client_secret: String, + /// The list of the supported wallets + #[schema(value_type = Vec)] pub wallets: Vec, } -#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)] pub struct GpayAllowedMethodsParameters { + /// The list of allowed auth methods (ex: 3DS, No3DS, PAN_ONLY etc) pub allowed_auth_methods: Vec, + /// The list of allowed card networks (ex: AMEX,JCB etc) pub allowed_card_networks: Vec, } -#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)] pub struct GpayTokenParameters { + /// The name of the connector pub gateway: String, + /// The merchant ID registered in the connector associated pub gateway_merchant_id: String, } -#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)] pub struct GpayTokenizationSpecification { + /// The token specification type(ex: PAYMENT_GATEWAY) #[serde(rename = "type")] pub token_specification_type: String, + /// The parameters for the token specification Google Pay pub parameters: GpayTokenParameters, } -#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)] pub struct GpayAllowedPaymentMethods { + /// The type of payment method #[serde(rename = "type")] pub payment_method_type: String, + /// The parameters Google Pay requires pub parameters: GpayAllowedMethodsParameters, + /// The tokenization specification for Google Pay pub tokenization_specification: GpayTokenizationSpecification, } -#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)] pub struct GpayTransactionInfo { + /// The country code pub country_code: String, + /// The currency code pub currency_code: String, + /// The total price status (ex: 'FINAL') pub total_price_status: String, + /// The total price pub total_price: i64, } -#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)] pub struct GpayMerchantInfo { + /// The name of the merchant pub merchant_name: String, } #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] -pub struct GpayMetadata { +pub struct GpayMetaData { pub merchant_info: GpayMerchantInfo, pub allowed_payment_methods: Vec, } #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct GpaySessionTokenData { - pub data: GpayMetadata, + #[serde(rename = "gpay")] + pub data: GpayMetaData, } -#[derive(Debug, Clone, serde::Serialize)] +#[derive(Debug, Clone, serde::Serialize, ToSchema)] #[serde(tag = "wallet_name")] #[serde(rename_all = "lowercase")] pub enum SessionToken { + /// The session response structure for Google Pay Gpay { - #[serde(flatten)] - data: GpayMetadata, + /// The merchant info + merchant_info: GpayMerchantInfo, + /// List of the allowed payment meythods + allowed_payment_methods: Vec, + /// The transaction info Google Pay requires transaction_info: GpayTransactionInfo, }, + /// The session response structure for Klarna Klarna { + /// The session token for Klarna session_token: String, + /// The identifier for the session session_id: String, }, + /// The session response structure for PayPal Paypal { + /// The session token for PayPal session_token: String, }, + /// The session response structure for Apple Pay Applepay { + /// Timestamp at which session is requested epoch_timestamp: u64, + /// Timestamp at which session expires expires_at: u64, + /// The identifier for the merchant session merchant_session_identifier: String, + /// Applepay generates unique ID (UUID) value nonce: String, + /// The identifier for the merchant merchant_identifier: String, + /// The domain name of the merchant which is registered in Apple Pay domain_name: String, + /// The name to be displayed on Apple Pay button display_name: String, + /// A string which represents the properties of a payment signature: String, + /// The identifier for the operational analytics operational_analytics_identifier: String, + /// The number of retries to get the session response retries: u8, + /// The identifier for the connector transaction psp_id: String, }, } -#[derive(Default, Debug, serde::Serialize, Clone)] +#[derive(Default, Debug, serde::Serialize, Clone, ToSchema)] pub struct PaymentsSessionResponse { + /// The identifier for the payment pub payment_id: String, + /// This is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK + #[schema(value_type = String)] pub client_secret: Secret, + /// The list of session token object pub session_token: Vec, } -#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone)] +#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)] pub struct PaymentRetrieveBody { + /// The identifier for the Merchant Account. pub merchant_id: Option, + /// Decider to enable or disable the connector call for retrieve request pub force_sync: Option, } -#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone)] +#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)] pub struct PaymentsCancelRequest { + /// The identifier for the payment #[serde(skip)] pub payment_id: String, + /// The reason for the payment cancel pub cancellation_reason: Option, } -#[derive(Default, Debug, serde::Deserialize, serde::Serialize)] +#[derive(Default, Debug, serde::Deserialize, serde::Serialize, ToSchema)] pub struct PaymentsStartRequest { + /// Unique identifier for the payment. This ensures impotency for multiple payments + /// that have been done by a single merchant. This field is auto generated and is returned in the API response. pub payment_id: String, + /// The identifier for the Merchant Account. pub merchant_id: String, - pub txn_id: String, + /// The identifier for the payment transaction + pub attempt_id: String, } mod payment_id_type { diff --git a/crates/router/src/core/payments/flows/session_flow.rs b/crates/router/src/core/payments/flows/session_flow.rs index 5c60719c98..c105e62e85 100644 --- a/crates/router/src/core/payments/flows/session_flow.rs +++ b/crates/router/src/core/payments/flows/session_flow.rs @@ -84,8 +84,9 @@ fn create_gpay_session_token( let response_router_data = types::PaymentsSessionRouterData { response: Ok(types::PaymentsResponseData::SessionResponse { session_token: payment_types::SessionToken::Gpay { - data: gpay_data.data, transaction_info, + merchant_info: gpay_data.data.merchant_info, + allowed_payment_methods: gpay_data.data.allowed_payment_methods, }, }), ..router_data.clone() diff --git a/crates/router/src/openapi.rs b/crates/router/src/openapi.rs index 8ef5f40948..ae6543fec6 100644 --- a/crates/router/src/openapi.rs +++ b/crates/router/src/openapi.rs @@ -70,6 +70,7 @@ Never share your secret api keys. Keep them guarded and secure. api_models::enums::WalletIssuer, api_models::enums::Connector, api_models::enums::PaymentMethodType, + api_models::enums::SupportedWallets, api_models::admin::PaymentConnectorCreate, api_models::admin::PaymentMethods, api_models::payments::AddressDetails, @@ -94,6 +95,23 @@ Never share your secret api keys. Keep them guarded and secure. api_models::payments::PaymentsRequest, api_models::payments::PaymentsResponse, api_models::payment_methods::PaymentExperience, + api_models::payments::PaymentsStartRequest, + api_models::payments::PaymentRetrieveBody, + api_models::payments::PaymentsRetrieveRequest, + api_models::payments::PaymentIdType, + api_models::payments::PaymentsCaptureRequest, + api_models::payments::PaymentsSessionRequest, + api_models::payments::PaymentsSessionResponse, + api_models::payments::SessionToken, + api_models::payments::GpayMerchantInfo, + api_models::payments::GpayAllowedPaymentMethods, + api_models::payments::GpayAllowedMethodsParameters, + api_models::payments::GpayTokenizationSpecification, + api_models::payments::GpayTokenParameters, + api_models::payments::GpayTransactionInfo, + api_models::payments::PaymentsCancelRequest, + api_models::payments::PaymentListConstraints, + api_models::payments::PaymentListResponse, crate::types::api::admin::MerchantAccountResponse, crate::types::api::admin::MerchantConnectorId, crate::types::api::admin::MerchantDetails, diff --git a/crates/router/src/routes/payments.rs b/crates/router/src/routes/payments.rs index 6bfe771f98..f427044cb8 100644 --- a/crates/router/src/routes/payments.rs +++ b/crates/router/src/routes/payments.rs @@ -62,7 +62,7 @@ pub async fn payments_start( let payload = payment_types::PaymentsStartRequest { payment_id: payment_id.clone(), merchant_id: merchant_id.clone(), - txn_id: attempt_id.clone(), + attempt_id: attempt_id.clone(), }; api::server_wrap( &state, diff --git a/openapi/generated.json b/openapi/generated.json index 56b77eea88..a96a2dc9e8 100644 --- a/openapi/generated.json +++ b/openapi/generated.json @@ -698,6 +698,122 @@ "on_session" ] }, + "GpayAllowedMethodsParameters": { + "type": "object", + "required": [ + "allowed_auth_methods", + "allowed_card_networks" + ], + "properties": { + "allowed_auth_methods": { + "type": "array", + "items": { + "type": "string", + "description": "The list of allowed auth methods (ex: 3DS, No3DS, PAN_ONLY etc)" + } + }, + "allowed_card_networks": { + "type": "array", + "items": { + "type": "string", + "description": "The list of allowed card networks (ex: AMEX,JCB etc)" + } + } + } + }, + "GpayAllowedPaymentMethods": { + "type": "object", + "required": [ + "type", + "parameters", + "tokenization_specification" + ], + "properties": { + "type": { + "type": "string", + "description": "The type of payment method" + }, + "parameters": { + "$ref": "#/components/schemas/GpayAllowedMethodsParameters" + }, + "tokenization_specification": { + "$ref": "#/components/schemas/GpayTokenizationSpecification" + } + } + }, + "GpayMerchantInfo": { + "type": "object", + "required": [ + "merchant_name" + ], + "properties": { + "merchant_name": { + "type": "string", + "description": "The name of the merchant" + } + } + }, + "GpayTokenParameters": { + "type": "object", + "required": [ + "gateway", + "gateway_merchant_id" + ], + "properties": { + "gateway": { + "type": "string", + "description": "The name of the connector" + }, + "gateway_merchant_id": { + "type": "string", + "description": "The merchant ID registered in the connector associated" + } + } + }, + "GpayTokenizationSpecification": { + "type": "object", + "required": [ + "type", + "parameters" + ], + "properties": { + "type": { + "type": "string", + "description": "The token specification type(ex: PAYMENT_GATEWAY)" + }, + "parameters": { + "$ref": "#/components/schemas/GpayTokenParameters" + } + } + }, + "GpayTransactionInfo": { + "type": "object", + "required": [ + "country_code", + "currency_code", + "total_price_status", + "total_price" + ], + "properties": { + "country_code": { + "type": "string", + "description": "The country code" + }, + "currency_code": { + "type": "string", + "description": "The currency code" + }, + "total_price_status": { + "type": "string", + "description": "The total price status (ex: 'FINAL')" + }, + "total_price": { + "type": "integer", + "format": "int64", + "description": "The total price" + } + } + }, "IntentStatus": { "type": "string", "enum": [ @@ -1184,6 +1300,112 @@ "invoke_payment_app" ] }, + "PaymentIdType": { + "oneOf": [ + { + "type": "object", + "required": [ + "PaymentIntentId" + ], + "properties": { + "PaymentIntentId": { + "type": "string", + "description": "The identifier for payment intent" + } + } + }, + { + "type": "object", + "required": [ + "ConnectorTransactionId" + ], + "properties": { + "ConnectorTransactionId": { + "type": "string", + "description": "The identifier for connector transaction" + } + } + }, + { + "type": "object", + "required": [ + "PaymentAttemptId" + ], + "properties": { + "PaymentAttemptId": { + "type": "string", + "description": "The identifier for payment attempt" + } + } + } + ] + }, + "PaymentListConstraints": { + "type": "object", + "properties": { + "customer_id": { + "type": "string", + "description": "The identifier for customer" + }, + "starting_after": { + "type": "string", + "description": "A cursor for use in pagination, fetch the next list after some object" + }, + "ending_before": { + "type": "string", + "description": "A cursor for use in pagination, fetch the previous list before some object" + }, + "limit": { + "type": "integer", + "format": "int64", + "description": "limit on the number of objects to return" + }, + "created": { + "type": "string", + "format": "date-time", + "description": "The time at which payment is created" + }, + "created.lt": { + "type": "string", + "format": "date-time", + "description": "Time less than the payment created time" + }, + "created.gt": { + "type": "string", + "format": "date-time", + "description": "Time greater than the payment created time" + }, + "created.lte": { + "type": "string", + "format": "date-time", + "description": "Time less than or equals to the payment created time" + }, + "created.gte": { + "type": "string", + "format": "date-time", + "description": "Time greater than or equals to the payment created time" + } + } + }, + "PaymentListResponse": { + "type": "object", + "required": [ + "size", + "data" + ], + "properties": { + "size": { + "type": "integer", + "description": "The number of payments included in the list" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentsResponse" + } + } + } + }, "PaymentMethod": { "oneOf": [ { @@ -1361,6 +1583,58 @@ } } }, + "PaymentRetrieveBody": { + "type": "object", + "properties": { + "merchant_id": { + "type": "string", + "description": "The identifier for the Merchant Account." + }, + "force_sync": { + "type": "boolean", + "description": "Decider to enable or disable the connector call for retrieve request" + } + } + }, + "PaymentsCancelRequest": { + "type": "object", + "properties": { + "cancellation_reason": { + "type": "string", + "description": "The reason for the payment cancel" + } + } + }, + "PaymentsCaptureRequest": { + "type": "object", + "properties": { + "payment_id": { + "type": "string", + "description": "The unique identifier for the payment" + }, + "merchant_id": { + "type": "string", + "description": "The unique identifier for the merchant" + }, + "amount_to_capture": { + "type": "integer", + "format": "int64", + "description": "The Amount to be captured/ debited from the user's payment method." + }, + "refund_uncaptured_amount": { + "type": "boolean", + "description": "Decider to refund the uncaptured amount" + }, + "statement_descriptor_suffix": { + "type": "string", + "description": "Provides information about a card payment that customers see on their statements." + }, + "statement_descriptor_prefix": { + "type": "string", + "description": "Concatenated with the statement descriptor suffix that’s set on the account to form the complete statement descriptor." + } + } + }, "PaymentsRequest": { "type": "object", "properties": { @@ -1699,6 +1973,104 @@ } } }, + "PaymentsRetrieveRequest": { + "type": "object", + "required": [ + "resource_id", + "force_sync" + ], + "properties": { + "resource_id": { + "$ref": "#/components/schemas/PaymentIdType" + }, + "merchant_id": { + "type": "string", + "description": "The identifier for the Merchant Account." + }, + "force_sync": { + "type": "boolean", + "description": "Decider to enable or disable the connector call for retrieve request" + }, + "param": { + "type": "string", + "description": "The parameters passed to a retrieve request" + }, + "connector": { + "type": "string", + "description": "The name of the connector" + } + } + }, + "PaymentsSessionRequest": { + "type": "object", + "required": [ + "payment_id", + "client_secret", + "wallets" + ], + "properties": { + "payment_id": { + "type": "string", + "description": "The identifier for the payment" + }, + "client_secret": { + "type": "string", + "description": "This is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK" + }, + "wallets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SupportedWallets" + } + } + } + }, + "PaymentsSessionResponse": { + "type": "object", + "required": [ + "payment_id", + "client_secret", + "session_token" + ], + "properties": { + "payment_id": { + "type": "string", + "description": "The identifier for the payment" + }, + "client_secret": { + "type": "string", + "description": "This is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK" + }, + "session_token": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionToken" + } + } + } + }, + "PaymentsStartRequest": { + "type": "object", + "required": [ + "payment_id", + "merchant_id", + "attempt_id" + ], + "properties": { + "payment_id": { + "type": "string", + "description": "Unique identifier for the payment. This ensures impotency for multiple payments\nthat have been done by a single merchant. This field is auto generated and is returned in the API response." + }, + "merchant_id": { + "type": "string", + "description": "The identifier for the Merchant Account." + }, + "attempt_id": { + "type": "string", + "description": "The identifier for the payment transaction" + } + } + }, "PhoneDetails": { "type": "object", "properties": { @@ -1833,6 +2205,171 @@ ], "example": "custom" }, + "SessionToken": { + "oneOf": [ + { + "type": "object", + "description": "The session response structure for Google Pay", + "required": [ + "merchant_info", + "allowed_payment_methods", + "transaction_info", + "wallet_name" + ], + "properties": { + "merchant_info": { + "$ref": "#/components/schemas/GpayMerchantInfo" + }, + "allowed_payment_methods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GpayAllowedPaymentMethods" + } + }, + "transaction_info": { + "$ref": "#/components/schemas/GpayTransactionInfo" + }, + "wallet_name": { + "type": "string", + "enum": [ + "gpay" + ] + } + } + }, + { + "type": "object", + "description": "The session response structure for Klarna", + "required": [ + "session_token", + "session_id", + "wallet_name" + ], + "properties": { + "session_token": { + "type": "string", + "description": "The session token for Klarna" + }, + "session_id": { + "type": "string", + "description": "The identifier for the session" + }, + "wallet_name": { + "type": "string", + "enum": [ + "klarna" + ] + } + } + }, + { + "type": "object", + "description": "The session response structure for PayPal", + "required": [ + "session_token", + "wallet_name" + ], + "properties": { + "session_token": { + "type": "string", + "description": "The session token for PayPal" + }, + "wallet_name": { + "type": "string", + "enum": [ + "paypal" + ] + } + } + }, + { + "type": "object", + "description": "The session response structure for Apple Pay", + "required": [ + "epoch_timestamp", + "expires_at", + "merchant_session_identifier", + "nonce", + "merchant_identifier", + "domain_name", + "display_name", + "signature", + "operational_analytics_identifier", + "retries", + "psp_id", + "wallet_name" + ], + "properties": { + "epoch_timestamp": { + "type": "integer", + "format": "int64", + "description": "Timestamp at which session is requested" + }, + "expires_at": { + "type": "integer", + "format": "int64", + "description": "Timestamp at which session expires" + }, + "merchant_session_identifier": { + "type": "string", + "description": "The identifier for the merchant session" + }, + "nonce": { + "type": "string", + "description": "Applepay generates unique ID (UUID) value" + }, + "merchant_identifier": { + "type": "string", + "description": "The identifier for the merchant" + }, + "domain_name": { + "type": "string", + "description": "The domain name of the merchant which is registered in Apple Pay" + }, + "display_name": { + "type": "string", + "description": "The name to be displayed on Apple Pay button" + }, + "signature": { + "type": "string", + "description": "A string which represents the properties of a payment" + }, + "operational_analytics_identifier": { + "type": "string", + "description": "The identifier for the operational analytics" + }, + "retries": { + "type": "integer", + "format": "int32", + "description": "The number of retries to get the session response" + }, + "psp_id": { + "type": "string", + "description": "The identifier for the connector transaction" + }, + "wallet_name": { + "type": "string", + "enum": [ + "applepay" + ] + } + } + } + ], + "discriminator": { + "propertyName": "wallet_name" + } + }, + "SupportedWallets": { + "type": "string", + "description": "Wallets which support obtaining session object", + "enum": [ + "paypal", + "apple_pay", + "klarna", + "gpay" + ] + }, "WalletData": { "type": "object", "required": [