| "description": "## Type of Change\r\n<!-- Put an `x` in the boxes that apply -->\r\n\r\n- [ ] Bugfix\r\n- [x] New feature\r\n- [ ] Enhancement\r\n- [ ] Refactoring\r\n- [ ] Dependency updates\r\n- [ ] Documentation\r\n- [ ] CI/CD\r\n\r\n## Description\r\n<!-- Describe your changes in detail -->\r\nAdd billing_descriptor in the payment_intent table.\r\n\r\n### Additional Changes\r\n\r\n- [x] This PR modifies the API contract\r\n- [x] This PR modifies the database schema\r\n- [ ] This PR modifies application configuration/environment variables\r\n\r\n<!--\r\nProvide links to the files with corresponding changes.\r\n\r\nFollowing are the paths where you can find config files:\r\n1. `config`\r\n2. `crates/router/src/configs`\r\n3. `loadtest/config`\r\n-->\r\n\r\n\r\n## Motivation and Context\r\n<!--\r\nWhy is this change required? What problem does it solve?\r\nIf it fixes an open issue, please link to the issue here.\r\n\r\nIf you don't have an issue, we'd recommend starting with one first so the PR\r\ncan focus on the implementation (unless it is an obvious bug or documentation fix\r\nthat will have little conversation).\r\n-->\r\nSome connectors require specific fields to be included in the billing descriptor \u2014 for example, Checkout expects fields such as name, city, and a reference value. Previously, we only supported a single statement_descriptor field of type String, which was insufficient to meet these connector-specific requirements.\r\nTo address this, we introduced a new struct , billing_descriptor, which encapsulates multiple fields \u2014 name, city, phone, statement_descriptor and statement_descriptor_suffix.\r\n\r\n## How did you test it?\r\n<!--\r\nDid you write an integration/unit/API test to verify the code changes?\r\nOr did you test this change manually (provide relevant screenshots)?\r\n-->\r\nCheckout: \r\n\r\nRequest: \r\n```\r\n\r\n{\r\n \"amount\": 1000,\r\n \"currency\": \"USD\",\r\n \"confirm\": true,\r\n \"return_url\": \"https://www.google.com\",\r\n \"capture_method\": \"automatic\",\r\n \"payment_method\": \"card\",\r\n \"payment_method_type\": \"credit\",\r\n \"all_keys_required\": true,\r\n \"enable_partial_authorization\": true,\r\n \"setup_future_usage\": \"off_session\",\r\n \"authentication_type\": \"no_three_ds\",\r\n \"description\": \"hellow world\",\r\n \"billing_descriptor\" : {\r\n \"name\" : \"abc\",\r\n \"email\" : \"abc@gmail.com\",\r\n \"city\" : \"kolkata\",\r\n \"statement_descriptor\" : \"order123\"\r\n },\r\n \"billing\": {\r\n \"address\": {\r\n \"zip\": \"560095\",\r\n \"country\": \"US\",\r\n \"first_name\": \"Sakil\",\r\n \"last_name\": \"Mostak\",\r\n \"line1\": \"Fasdf\",\r\n \"line2\": \"Fasdf\",\r\n \"city\": \"Fasdf\"\r\n }\r\n },\r\n \"shipping\": {\r\n \"address\": {\r\n \"zip\": \"560095\",\r\n \"country\": \"US\",\r\n \"first_name\": \"Sakil\",\r\n \"last_name\": \"Mostak\",\r\n \"line1\": \"Fasdf\",\r\n \"line2\": \"Fasdf\",\r\n \"city\": \"Fasdf\"\r\n }\r\n },\r\n \"customer\": {\r\n \"phone\": \"12345678911\",\r\n \"phone_country_code\": \"+91\",\r\n \"name\": \"test add\",\r\n \"id\": \"cus_123\"\r\n },\r\n \"browser_info\": {\r\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\",\r\n \"ip_address\": \"192.168.1.1\",\r\n \"java_enabled\": false,\r\n \"java_script_enabled\": true,\r\n \"language\": \"en-US\",\r\n \"color_depth\": 24,\r\n \"screen_height\": 1080,\r\n \"screen_width\": 1920,\r\n \"time_zone\": 330,\r\n \"user_agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36\"\r\n },\r\n \"email\": \"hello@gmail.com\",\r\n \"payment_method_data\": {\r\n \"card\": {\r\n \"card_number\": \"5385308360135181\",\r\n \"card_exp_month\": \"12\",\r\n \"card_exp_year\": \"2027\",\r\n \"card_holder_name\": \"CL-BRW2\",\r\n \"card_cvc\": \"152\"\r\n }\r\n },\r\n \"customer_acceptance\": {\r\n \"acceptance_type\": \"online\",\r\n \"accepted_at\": \"1963-05-03T04:07:52.723Z\",\r\n \"online\": {\r\n \"ip_address\": \"in sit\",\r\n \"user_agent\": \"amet irure esse\"\r\n }\r\n },\r\n \"business_country\": \"US\",\r\n \"business_label\": \"default\"\r\n}\r\n\r\n```\r\n\r\nraw_connector_request:\r\n<img width=\"1020\" height=\"177\" alt=\"Screenshot 2025-10-31 at 2 57 57\u202fPM\" src=\"https://github.com/user-attachments/assets/287c776f-da16-46d3-b03c-9e0bb6e772f2\" />\r\n\r\nResponse:\r\n\r\n```\r\n\r\n{\r\n \"payment_id\": \"pay_NieupPpxu5TW1HTQyddM\",\r\n \"merchant_id\": \"merchant_1761903934\",\r\n \"status\": \"succeeded\",\r\n \"amount\": 1000,\r\n \"net_amount\": 1000,\r\n \"shipping_cost\": null,\r\n \"amount_capturable\": 0,\r\n \"amount_received\": 1000,\r\n \"connector\": \"checkout\",\r\n \"client_secret\": \"pay_NieupPpxu5TW1HTQyddM_secret_Q5ZiD6nxNyHk8NdlN3FC\",\r\n \"created\": \"2025-10-31T09:48:55.212Z\",\r\n \"currency\": \"USD\",\r\n \"customer_id\": \"cus_123\",\r\n \"customer\": {\r\n \"id\": \"cus_123\",\r\n \"name\": \"test add\",\r\n \"email\": \"hello@gmail.com\",\r\n \"phone\": \"12345678911\",\r\n \"phone_country_code\": \"+91\"\r\n },\r\n \"description\": \"hellow world\",\r\n \"refunds\": null,\r\n \"disputes\": null,\r\n \"mandate_id\": null,\r\n \"mandate_data\": null,\r\n \"setup_future_usage\": \"off_session\",\r\n \"off_session\": null,\r\n \"capture_on\": null,\r\n \"capture_method\": \"automatic\",\r\n \"payment_method\": \"card\",\r\n \"payment_method_data\": {\r\n \"card\": {\r\n \"last4\": \"5181\",\r\n \"card_type\": null,\r\n \"card_network\": null,\r\n \"card_issuer\": null,\r\n \"card_issuing_country\": null,\r\n \"card_isin\": \"538530\",\r\n \"card_extended_bin\": null,\r\n \"card_exp_month\": \"12\",\r\n \"card_exp_year\": \"2027\",\r\n \"card_holder_name\": \"CL-BRW2\",\r\n \"payment_checks\": {\r\n \"avs_result\": \"U\",\r\n \"card_validation_result\": \"U\"\r\n },\r\n \"authentication_data\": null\r\n },\r\n \"billing\": null\r\n },\r\n \"payment_token\": null,\r\n \"shipping\": {\r\n \"address\": {\r\n \"city\": \"Fasdf\",\r\n \"country\": \"US\",\r\n \"line1\": \"Fasdf\",\r\n \"line2\": \"Fasdf\",\r\n \"line3\": null,\r\n \"zip\": \"560095\",\r\n \"state\": null,\r\n \"first_name\": \"Sakil\",\r\n \"last_name\": \"Mostak\",\r\n \"origin_zip\": null\r\n },\r\n \"phone\": null,\r\n \"email\": null\r\n },\r\n \"billing\": {\r\n \"address\": {\r\n \"city\": \"Fasdf\",\r\n \"country\": \"US\",\r\n \"line1\": \"Fasdf\",\r\n \"line2\": \"Fasdf\",\r\n \"line3\": null,\r\n \"zip\": \"560095\",\r\n \"state\": null,\r\n \"first_name\": \"Sakil\",\r\n \"last_name\": \"Mostak\",\r\n \"origin_zip\": null\r\n },\r\n \"phone\": null,\r\n \"email\": null\r\n },\r\n \"order_details\": null,\r\n \"email\": \"hello@gmail.com\",\r\n \"name\": \"test add\",\r\n \"phone\": \"12345678911\",\r\n \"return_url\": \"https://www.google.com/\",\r\n \"authentication_type\": \"no_three_ds\",\r\n \"statement_descriptor_name\": null,\r\n \"statement_descriptor_suffix\": null,\r\n \"next_action\": null,\r\n \"cancellation_reason\": null,\r\n \"error_code\": null,\r\n \"error_message\": null,\r\n \"unified_code\": null,\r\n \"unified_message\": null,\r\n \"payment_experience\": null,\r\n \"payment_method_type\": \"credit\",\r\n \"connector_label\": \"checkout_US_default\",\r\n \"business_country\": \"US\",\r\n \"business_label\": \"default\",\r\n \"business_sub_label\": null,\r\n \"allowed_payment_method_types\": null,\r\n \"ephemeral_key\": {\r\n \"customer_id\": \"cus_123\",\r\n \"created_at\": 1761904135,\r\n \"expires\": 1761907735,\r\n \"secret\": \"epk_fb10898b4a4e4125ada124ede3ab13fe\"\r\n },\r\n \"manual_retry_allowed\": null,\r\n \"connector_transaction_id\": \"pay_gvo4d57sgdoubbyjzgczlt3mtu\",\r\n \"frm_message\": null,\r\n \"metadata\": null,\r\n \"connector_metadata\": null,\r\n \"feature_metadata\": {\r\n \"redirect_response\": null,\r\n \"search_tags\": null,\r\n \"apple_pay_recurring_details\": null,\r\n \"gateway_system\": \"direct\"\r\n },\r\n \"reference_id\": \"pay_NieupPpxu5TW1HTQyddM_1\",\r\n \"payment_link\": null,\r\n \"profile_id\": \"pro_KC8aAaXnEzbaPUnNg2ZG\",\r\n \"surcharge_details\": null,\r\n \"attempt_count\": 1,\r\n \"merchant_decision\": null,\r\n \"merchant_connector_id\": \"mca_dmxpVM7XIPn9CWlZW3mo\",\r\n \"incremental_authorization_allowed\": false,\r\n \"authorization_count\": null,\r\n \"incremental_authorizations\": null,\r\n \"external_authentication_details\": null,\r\n \"external_3ds_authentication_attempted\": false,\r\n \"expires_on\": \"2025-10-31T10:03:55.212Z\",\r\n \"fingerprint\": null,\r\n \"browser_info\": {\r\n \"language\": \"en-US\",\r\n \"time_zone\": 330,\r\n \"ip_address\": \"192.168.1.1\",\r\n \"user_agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36\",\r\n \"color_depth\": 24,\r\n \"java_enabled\": false,\r\n \"screen_width\": 1920,\r\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\",\r\n \"screen_height\": 1080,\r\n \"java_script_enabled\": true\r\n },\r\n \"payment_channel\": null,\r\n \"payment_method_id\": \"pm_3zFZu9MHKJTDT9XntnGX\",\r\n \"network_transaction_id\": \"MCC0943681101\",\r\n \"payment_method_status\": \"active\",\r\n \"updated\": \"2025-10-31T09:48:57.242Z\",\r\n \"split_payments\": null,\r\n \"frm_metadata\": null,\r\n \"extended_authorization_applied\": null,\r\n \"request_extended_authorization\": null,\r\n \"capture_before\": null,\r\n \"merchant_order_reference_id\": null,\r\n \"order_tax_amount\": null,\r\n \"connector_mandate_id\": \"src_bdjchiv6p3de3o3qepvxnhfkym\",\r\n \"card_discovery\": \"manual\",\r\n \"force_3ds_challenge\": false,\r\n \"force_3ds_challenge_trigger\": false,\r\n \"issuer_error_code\": null,\r\n \"issuer_error_message\": null,\r\n \"is_iframe_redirection_enabled\": null,\r\n \"enable_partial_authorization\": true,\r\n \"enable_overcapture\": null,\r\n \"is_overcapture_enabled\": null,\r\n \"network_details\": null,\r\n \"is_stored_credential\": null,\r\n \"mit_category\": null,\r\n \"billing_descriptor\": {\r\n \"name\": \"abc\",\r\n \"city\": \"kolkata\",\r\n \"phone\": null,\r\n \"statement_descriptor\": \"order123\"\r\n }\r\n}\r\n\r\n```\r\n\r\nNuvei \r\n\r\nRequest:\r\n\r\n```\r\n\r\n{\r\n \"amount\": 100,\r\n \"currency\": \"EUR\",\r\n \"confirm\": true,\r\n \"customer_id\": \"abc\",\r\n \"return_url\": \"https://www.google.com\",\r\n \"capture_method\": \"automatic\",\r\n \"payment_method\": \"card\",\r\n \"payment_method_type\": \"credit\",\r\n \"authentication_type\": \"no_three_ds\",\r\n \"description\": \"hellow world\",\r\n \"all_keys_required\": true,\r\n \"billing\": {\r\n \"address\": {\r\n \"zip\": \"560095\",\r\n \"country\" : \"NZ\",\r\n \"first_name\": \"Sakil\",\r\n \"last_name\": \"Mostak\",\r\n \"line1\": \"Fasdf\",\r\n \"line2\": \"Fasdf\",\r\n \"city\": \"Fasdf\",\r\n \"state\" : \"auckland\"\r\n }\r\n },\r\n \"shipping\": {\r\n \"address\": {\r\n \"first_name\": \"joseph\",\r\n \"last_name\": \"Doe\"\r\n }\r\n },\r\n \"browser_info\": {\r\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\",\r\n \"ip_address\": \"192.168.1.1\",\r\n \"java_enabled\": false,\r\n \"java_script_enabled\": true,\r\n \"language\": \"en-US\",\r\n \"color_depth\": 24,\r\n \"screen_height\": 1080,\r\n \"screen_width\": 1920,\r\n \"time_zone\": 330,\r\n \"user_agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36\"\r\n },\r\n \"email\": \"hello@gmail.com\",\r\n \"payment_method_data\": {\r\n \"card\": {\r\n \"card_number\": \"5101081046006034\",\r\n \"card_exp_month\": \"01\",\r\n \"card_exp_year\": \"2026\",\r\n \"card_holder_name\": \"John Smith\",\r\n \"card_cvc\": \"100\"\r\n }\r\n },\r\n \"billing_descriptor\" : {\r\n \"name\" : \"the online store\",\r\n \"phone\" : \"9876543210\",\r\n \"statement_descriptor\": \"order123\"\r\n }\r\n}\r\n\r\n```\r\n\r\nraw_connector_request:\r\n<img width=\"1090\" height=\"187\" alt=\"Screenshot 2025-10-31 at 3 30 52\u202fPM\" src=\"https://github.com/user-attachments/assets/4c69cdc8-bf95-4f09-bcb9-c08e35d04768\" />\r\n\r\nResponse:\r\n\r\n```\r\n\r\n{\r\n \"payment_id\": \"pay_AbPCCdSnuhVw9ldwpP54\",\r\n \"merchant_id\": \"merchant_1761904142\",\r\n \"status\": \"succeeded\",\r\n \"amount\": 100,\r\n \"net_amount\": 100,\r\n \"shipping_cost\": null,\r\n \"amount_capturable\": 0,\r\n \"amount_received\": 100,\r\n \"connector\": \"nuvei\",\r\n \"client_secret\": \"pay_AbPCCdSnuhVw9ldwpP54_secret_DZ3WKmk9tKPgcgEZ9Oj7\",\r\n \"created\": \"2025-10-31T10:00:12.478Z\",\r\n \"currency\": \"EUR\",\r\n \"customer_id\": \"nithxxinn\",\r\n \"customer\": {\r\n \"id\": \"nithxxinn\",\r\n \"name\": null,\r\n \"email\": \"hello@gmail.com\",\r\n \"phone\": null,\r\n \"phone_country_code\": null\r\n },\r\n \"description\": \"hellow world\",\r\n \"refunds\": null,\r\n \"disputes\": null,\r\n \"mandate_id\": null,\r\n \"mandate_data\": null,\r\n \"setup_future_usage\": null,\r\n \"off_session\": null,\r\n \"capture_on\": null,\r\n \"capture_method\": \"automatic\",\r\n \"payment_method\": \"card\",\r\n \"payment_method_data\": {\r\n \"card\": {\r\n \"last4\": \"6034\",\r\n \"card_type\": null,\r\n \"card_network\": null,\r\n \"card_issuer\": null,\r\n \"card_issuing_country\": null,\r\n \"card_isin\": \"510108\",\r\n \"card_extended_bin\": null,\r\n \"card_exp_month\": \"01\",\r\n \"card_exp_year\": \"2026\",\r\n \"card_holder_name\": \"John Smith\",\r\n \"payment_checks\": {\r\n \"avs_result\": \"\",\r\n \"avs_description\": null,\r\n \"card_validation_result\": \"\",\r\n \"card_validation_description\": null\r\n },\r\n \"authentication_data\": {\r\n \"challengePreferenceReason\": \"12\"\r\n }\r\n },\r\n \"billing\": null\r\n },\r\n \"payment_token\": \"token_JOsSkbDJXuOkNkmx4Ku0\",\r\n \"shipping\": {\r\n \"address\": {\r\n \"city\": null,\r\n \"country\": null,\r\n \"line1\": null,\r\n \"line2\": null,\r\n \"line3\": null,\r\n \"zip\": null,\r\n \"state\": null,\r\n \"first_name\": \"joseph\",\r\n \"last_name\": \"Doe\",\r\n \"origin_zip\": null\r\n },\r\n \"phone\": null,\r\n \"email\": null\r\n },\r\n \"billing\": {\r\n \"address\": {\r\n \"city\": \"Fasdf\",\r\n \"country\": \"NZ\",\r\n \"line1\": \"Fasdf\",\r\n \"line2\": \"Fasdf\",\r\n \"line3\": null,\r\n \"zip\": \"560095\",\r\n \"state\": \"auckland\",\r\n \"first_name\": \"Sakil\",\r\n \"last_name\": \"Mostak\",\r\n \"origin_zip\": null\r\n },\r\n \"phone\": null,\r\n \"email\": null\r\n },\r\n \"order_details\": null,\r\n \"email\": \"hello@gmail.com\",\r\n \"name\": null,\r\n \"phone\": null,\r\n \"return_url\": \"https://www.google.com/\",\r\n \"authentication_type\": \"no_three_ds\",\r\n \"statement_descriptor_name\": null,\r\n \"statement_descriptor_suffix\": null,\r\n \"next_action\": null,\r\n \"cancellation_reason\": null,\r\n \"error_code\": null,\r\n \"error_message\": null,\r\n \"unified_code\": null,\r\n \"unified_message\": null,\r\n \"payment_experience\": null,\r\n \"payment_method_type\": \"credit\",\r\n \"connector_label\": null,\r\n \"business_country\": null,\r\n \"business_label\": \"default\",\r\n \"business_sub_label\": null,\r\n \"allowed_payment_method_types\": null,\r\n \"ephemeral_key\": {\r\n \"customer_id\": \"nithxxinn\",\r\n \"created_at\": 1761904812,\r\n \"expires\": 1761908412,\r\n \"secret\": \"epk_f5bfb664770d4548ac408006204b3c24\"\r\n },\r\n \"manual_retry_allowed\": null,\r\n \"connector_transaction_id\": \"8110000000016971826\",\r\n \"frm_message\": null,\r\n \"metadata\": null,\r\n \"connector_metadata\": null,\r\n \"feature_metadata\": {\r\n \"redirect_response\": null,\r\n \"search_tags\": null,\r\n \"apple_pay_recurring_details\": null,\r\n \"gateway_system\": \"direct\"\r\n },\r\n \"reference_id\": \"10175527111\",\r\n \"payment_link\": null,\r\n \"profile_id\": \"pro_eMmUSelsvx1c3QRH8L0s\",\r\n \"surcharge_details\": null,\r\n \"attempt_count\": 1,\r\n \"merchant_decision\": null,\r\n \"merchant_connector_id\": \"mca_3kRx6ysU4O1l79wGEx2p\",\r\n \"incremental_authorization_allowed\": false,\r\n \"authorization_count\": null,\r\n \"incremental_authorizations\": null,\r\n \"external_authentication_details\": null,\r\n \"external_3ds_authentication_attempted\": false,\r\n \"expires_on\": \"2025-10-31T10:15:12.478Z\",\r\n \"fingerprint\": null,\r\n \"browser_info\": {\r\n \"language\": \"en-US\",\r\n \"time_zone\": 330,\r\n \"ip_address\": \"192.168.1.1\",\r\n \"user_agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36\",\r\n \"color_depth\": 24,\r\n \"java_enabled\": false,\r\n \"screen_width\": 1920,\r\n \"accept_header\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\",\r\n \"screen_height\": 1080,\r\n \"java_script_enabled\": true\r\n },\r\n \"payment_channel\": null,\r\n \"payment_method_id\": null,\r\n \"network_transaction_id\": \"480213756188426\",\r\n \"payment_method_status\": null,\r\n \"updated\": \"2025-10-31T10:00:25.679Z\",\r\n \"split_payments\": null,\r\n \"frm_metadata\": null,\r\n \"extended_authorization_applied\": null,\r\n \"request_extended_authorization\": null,\r\n \"capture_before\": null,\r\n \"merchant_order_reference_id\": null,\r\n \"order_tax_amount\": null,\r\n \"connector_mandate_id\": null,\r\n \"card_discovery\": \"manual\",\r\n \"force_3ds_challenge\": false,\r\n \"force_3ds_challenge_trigger\": false,\r\n \"issuer_error_code\": null,\r\n \"issuer_error_message\": null,\r\n \"is_iframe_redirection_enabled\": null,\r\n \"enable_partial_authorization\": null,\r\n \"enable_overcapture\": null,\r\n \"is_overcapture_enabled\": null,\r\n \"network_details\": null,\r\n \"is_stored_credential\": null,\r\n \"mit_category\": null,\r\n \"billing_descriptor\": {\r\n \"name\": \"the online store\",\r\n \"city\": null,\r\n \"phone\": \"9876543210\",\r\n \"statement_descriptor\": \"order123\"\r\n }\r\n}\r\n\r\n```\r\n\r\n## Checklist\r\n<!-- Put an `x` in the boxes that apply -->\r\n\r\n- [x] I formatted the code `cargo +nightly fmt --all`\r\n- [x] I addressed lints thrown by `cargo clippy`\r\n- [x] I reviewed the submitted code\r\n- [ ] I added unit tests for my changes where possible\r\n", |