Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

docs(api-reference): mark additional payments and payout fields as deprecated (#12682)

Ayush Ananda4617d83935e
diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.json
index 98b57a1fbb..a3cd4df6da 100644
--- a/api-reference/v1/openapi_spec_v1.json
+++ b/api-reference/v1/openapi_spec_v1.json
@@ -23600,7 +23600,8 @@
"nullable": true
}
},
- "additionalProperties": false
+ "additionalProperties": false,
+ "deprecated": true
},
"MandateResponse": {
"type": "object",
@@ -27613,6 +27614,7 @@
"mandate_id": {
"type": "string",
"description": "If this payment attempt is associated with a mandate (e.g., for a recurring or subsequent payment), this field will contain the ID of that mandate.",
+ "deprecated": true,
"nullable": true
},
"error_code": {
@@ -30441,7 +30443,8 @@
},
"statement_descriptor_suffix": {
"type": "string",
- "description": "A dynamic suffix that appears on your customer's credit card statement. This is concatenated with the (shortened) descriptor prefix set on your account to form the complete statement descriptor. The combined length should not exceed connector-specific limits (typically 22 characters).",
+ "description": "A dynamic suffix that appears on your customer's credit card statement. This is concatenated with the (shortened) descriptor prefix set on your account to form the complete statement descriptor. The combined length should not exceed connector-specific limits (typically 22 characters). To be deprecated soon, use billing_descriptor instead.",
+ "deprecated": true,
"nullable": true
},
"statement_descriptor_prefix": {
@@ -30601,6 +30604,7 @@
"customer_id": {
"type": "string",
"description": "The identifier for the customer",
+ "deprecated": true,
"example": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"nullable": true,
"maxLength": 64,
@@ -31140,6 +31144,7 @@
"customer_id": {
"type": "string",
"description": "The identifier for the customer",
+ "deprecated": true,
"example": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"nullable": true,
"maxLength": 64,
@@ -31891,14 +31896,16 @@
},
"statement_descriptor_name": {
"type": "string",
- "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.",
+ "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. To be deprecated soon, use billing_descriptor instead.",
+ "deprecated": true,
"example": "Hyperswitch Router",
"nullable": true,
"maxLength": 255
},
"statement_descriptor_suffix": {
"type": "string",
- "description": "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 255 characters for the concatenated descriptor.",
+ "description": "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 255 characters for the concatenated descriptor. To be deprecated soon, use billing_descriptor instead.",
+ "deprecated": true,
"example": "Payment for shoes purchase",
"nullable": true,
"maxLength": 255
@@ -31968,12 +31975,14 @@
},
"business_label": {
"type": "string",
- "description": "The label identifying the specific business unit or profile under which this payment was processed by the merchant.",
+ "description": "The label identifying the specific business unit or profile under which this payment was processed by the merchant. To be deprecated soon. Pass the profile_id instead",
+ "deprecated": true,
"nullable": true
},
"business_sub_label": {
"type": "string",
- "description": "An optional sub-label for further categorization of the business unit or profile used for this payment.",
+ "description": "An optional sub-label for further categorization of the business unit or profile used for this payment. To be deprecated soon. Pass the profile_id instead",
+ "deprecated": true,
"nullable": true
},
"allowed_payment_method_types": {
@@ -32832,6 +32841,7 @@
"customer_id": {
"type": "string",
"description": "The identifier for the customer",
+ "deprecated": true,
"example": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"nullable": true,
"maxLength": 64,
@@ -33044,7 +33054,8 @@
},
"business_sub_label": {
"type": "string",
- "description": "Business sub label for the payment",
+ "description": "Business sub label for the payment. To be deprecated soon. Pass the profile_id instead",
+ "deprecated": true,
"nullable": true
},
"retry_action": {
@@ -33664,14 +33675,16 @@
},
"statement_descriptor_name": {
"type": "string",
- "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.",
+ "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. To be deprecated soon, use billing_descriptor instead.",
+ "deprecated": true,
"example": "Hyperswitch Router",
"nullable": true,
"maxLength": 255
},
"statement_descriptor_suffix": {
"type": "string",
- "description": "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 255 characters for the concatenated descriptor.",
+ "description": "Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 255 characters for the concatenated descriptor. To be deprecated soon, use billing_descriptor instead.",
+ "deprecated": true,
"example": "Payment for shoes purchase",
"nullable": true,
"maxLength": 255
@@ -33751,12 +33764,14 @@
},
"business_label": {
"type": "string",
- "description": "The label identifying the specific business unit or profile under which this payment was processed by the merchant.",
+ "description": "The label identifying the specific business unit or profile under which this payment was processed by the merchant. To be deprecated soon. Pass the profile_id instead",
+ "deprecated": true,
"nullable": true
},
"business_sub_label": {
"type": "string",
- "description": "An optional sub-label for further categorization of the business unit or profile used for this payment.",
+ "description": "An optional sub-label for further categorization of the business unit or profile used for this payment. To be deprecated soon. Pass the profile_id instead",
+ "deprecated": true,
"nullable": true
},
"allowed_payment_method_types": {
@@ -34428,6 +34443,7 @@
"customer_id": {
"type": "string",
"description": "The identifier for the customer",
+ "deprecated": true,
"example": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"nullable": true,
"maxLength": 64,
@@ -35366,7 +35382,8 @@
},
"customer_id": {
"type": "string",
- "description": "The identifier for the customer object. If not provided the customer ID will be autogenerated.",
+ "description": "The identifier for the customer object. If not provided the customer ID will be autogenerated. _Deprecated: Use the customer object instead._",
+ "deprecated": true,
"example": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"maxLength": 255
},
@@ -35393,7 +35410,8 @@
},
"business_label": {
"type": "string",
- "description": "Business label of the merchant for this payout",
+ "description": "Business label of the merchant for this payout. _Deprecated: Use profile_id instead._",
+ "deprecated": true,
"example": "food",
"nullable": true
},
diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.json
index 9dfbd85bd4..710cc3c344 100644
--- a/api-reference/v2/openapi_spec_v2.json
+++ b/api-reference/v2/openapi_spec_v2.json
@@ -16970,7 +16970,8 @@
"nullable": true
}
},
- "additionalProperties": false
+ "additionalProperties": false,
+ "deprecated": true
},
"MandateResponse": {
"type": "object",
@@ -25610,7 +25611,8 @@
},
"customer_id": {
"type": "string",
- "description": "The identifier for the customer object. If not provided the customer ID will be autogenerated.",
+ "description": "The identifier for the customer object. If not provided the customer ID will be autogenerated. _Deprecated: Use the customer object instead._",
+ "deprecated": true,
"example": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"maxLength": 255
},
@@ -25637,7 +25639,8 @@
},
"business_label": {
"type": "string",
- "description": "Business label of the merchant for this payout",
+ "description": "Business label of the merchant for this payout. _Deprecated: Use profile_id instead._",
+ "deprecated": true,
"example": "food",
"nullable": true
},
diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs
index 39d7886afe..ff1fe2b340 100644
--- a/crates/api_models/src/payments.rs
+++ b/crates/api_models/src/payments.rs
@@ -1230,7 +1230,7 @@ pub struct PaymentsRequest {
pub customer: Option<CustomerDetails>,
/// The identifier for the customer
- #[schema(value_type = Option<String>, max_length = 64, min_length = 1, example = "cus_y3oqhf46pyzuxjbcn2giaqnb44")]
+ #[schema(value_type = Option<String>, max_length = 64, min_length = 1, example = "cus_y3oqhf46pyzuxjbcn2giaqnb44", deprecated)]
#[smithy(value_type = "Option<String>")]
pub customer_id: Option<id_type::CustomerId>,
@@ -1390,7 +1390,8 @@ pub struct PaymentsRequest {
#[smithy(value_type = "Option<Vec<PaymentMethodType>>")]
pub allowed_payment_method_types: Option<Vec<api_enums::PaymentMethodType>>,
- /// Business sub label for the payment
+ /// Business sub label for the payment. To be deprecated soon. Pass the profile_id instead
+ #[schema(deprecated)]
#[remove_in(PaymentsUpdateRequest, PaymentsConfirmRequest, PaymentsCreateRequest)]
pub business_sub_label: Option<String>,
@@ -2069,6 +2070,7 @@ pub struct PaymentAttemptResponse {
#[smithy(value_type = "Option<String>")]
pub cancellation_reason: Option<String>,
/// If this payment attempt is associated with a mandate (e.g., for a recurring or subsequent payment), this field will contain the ID of that mandate.
+ #[schema(deprecated)]
#[smithy(value_type = "Option<String>")]
pub mandate_id: Option<String>,
/// The error code returned by the connector if this payment attempt failed. This code is specific to the connector.
@@ -2382,6 +2384,7 @@ pub struct VerifyRequest {
SmithyModel,
)]
#[serde(deny_unknown_fields)]
+#[schema(deprecated)]
#[smithy(namespace = "com.hyperswitch.smithy.types")]
pub struct MandateData {
/// A way to update the mandate's payment method details
@@ -6400,7 +6403,8 @@ pub struct PaymentsCaptureRequest {
/// Decider to refund the uncaptured amount. (Currently not fully supported or behavior may vary by connector).
#[smithy(value_type = "Option<bool>")]
pub refund_uncaptured_amount: Option<bool>,
- /// A dynamic suffix that appears on your customer's credit card statement. This is concatenated with the (shortened) descriptor prefix set on your account to form the complete statement descriptor. The combined length should not exceed connector-specific limits (typically 22 characters).
+ /// A dynamic suffix that appears on your customer's credit card statement. This is concatenated with the (shortened) descriptor prefix set on your account to form the complete statement descriptor. The combined length should not exceed connector-specific limits (typically 22 characters). To be deprecated soon, use billing_descriptor instead.
+ #[schema(deprecated)]
#[smithy(value_type = "Option<String>")]
pub statement_descriptor_suffix: Option<String>,
/// An optional prefix for the statement descriptor that appears on your customer's credit card statement. This can override the default prefix set on your merchant account. The combined length of prefix and suffix should not exceed connector-specific limits (typically 22 characters).
@@ -7332,13 +7336,13 @@ pub struct PaymentsResponse {
#[smithy(value_type = "Option<AuthenticationType>")]
pub authentication_type: Option<api_enums::AuthenticationType>,
- /// For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.
- #[schema(max_length = 255, example = "Hyperswitch Router")]
+ /// For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. To be deprecated soon, use billing_descriptor instead.
+ #[schema(max_length = 255, example = "Hyperswitch Router", deprecated)]
#[smithy(value_type = "Option<String>")]
pub statement_descriptor_name: Option<String>,
- /// Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 255 characters for the concatenated descriptor.
- #[schema(max_length = 255, example = "Payment for shoes purchase")]
+ /// Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 255 characters for the concatenated descriptor. To be deprecated soon, use billing_descriptor instead.
+ #[schema(max_length = 255, example = "Payment for shoes purchase", deprecated)]
#[smithy(value_type = "Option<String>")]
pub statement_descriptor_suffix: Option<String>,
@@ -7390,16 +7394,18 @@ pub struct PaymentsResponse {
#[smithy(value_type = "Option<String>")]
pub connector_label: Option<String>,
- /// The two-letter ISO country code (e.g., US, GB) of the business unit or profile under which this payment was processed.
- #[schema(value_type = Option<CountryAlpha2>, example = "US")]
+ /// The two-letter ISO country code (e.g., US, GB) of the business unit or profile under which this payment was processed. To be deprecated soon. Pass the profile_id instead
+ #[schema(value_type = Option<CountryAlpha2>, example = "US", deprecated)]
#[smithy(value_type = "Option<CountryAlpha2>")]
pub business_country: Option<api_enums::CountryAlpha2>,
- /// The label identifying the specific business unit or profile under which this payment was processed by the merchant.
+ /// The label identifying the specific business unit or profile under which this payment was processed by the merchant. To be deprecated soon. Pass the profile_id instead
+ #[schema(deprecated)]
#[smithy(value_type = "Option<String>")]
pub business_label: Option<String>,
- /// An optional sub-label for further categorization of the business unit or profile used for this payment.
+ /// An optional sub-label for further categorization of the business unit or profile used for this payment. To be deprecated soon. Pass the profile_id instead
+ #[schema(deprecated)]
#[smithy(value_type = "Option<String>")]
pub business_sub_label: Option<String>,
diff --git a/crates/api_models/src/payouts.rs b/crates/api_models/src/payouts.rs
index 06cdacd92b..90e5120838 100644
--- a/crates/api_models/src/payouts.rs
+++ b/crates/api_models/src/payouts.rs
@@ -779,8 +779,8 @@ pub struct PayoutCreateResponse {
#[schema(value_type = bool, example = true, default = false)]
pub auto_fulfill: bool,
- /// The identifier for the customer object. If not provided the customer ID will be autogenerated.
- #[schema(value_type = String, max_length = 255, example = "cus_y3oqhf46pyzuxjbcn2giaqnb44")]
+ /// The identifier for the customer object. If not provided the customer ID will be autogenerated. _Deprecated: Use the customer object instead._
+ #[schema(deprecated, value_type = String, max_length = 255, example = "cus_y3oqhf46pyzuxjbcn2giaqnb44")]
pub customer_id: Option<id_type::CustomerId>,
/// Passing this object creates a new customer or attaches an existing customer to the payout
@@ -795,12 +795,12 @@ pub struct PayoutCreateResponse {
#[schema(value_type = String, example = "https://hyperswitch.io")]
pub return_url: Option<String>,
- /// Business country of the merchant for this payout
- #[schema(example = "US", value_type = CountryAlpha2)]
+ /// Business country of the merchant for this payout. _Deprecated: Use profile_id instead._
+ #[schema(deprecated, example = "US", value_type = CountryAlpha2)]
pub business_country: Option<api_enums::CountryAlpha2>,
- /// Business label of the merchant for this payout
- #[schema(example = "food", value_type = Option<String>)]
+ /// Business label of the merchant for this payout. _Deprecated: Use profile_id instead._
+ #[schema(deprecated, example = "food", value_type = Option<String>)]
pub business_label: Option<String>,
/// A description of the payout