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
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
feat(payouts): persist purpose and enable Checkout Google Pay via UCS (#15275)
nithin-juspay82fe5dfd3ac5
diff --git a/Cargo.lock b/Cargo.lockindex 4ab6756996..c2f3d13c30 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -1675,7 +1675,7 @@ dependencies = ["arrayvec","cc","cfg-if",- "constant_time_eq",+ "constant_time_eq 0.3.1","serde",]@@ -2290,7 +2290,7 @@ dependencies = [[[package]]name = "config_patch_derive"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.11.12.2#d8de4440b4ea108ab9b1f192699f84d3ace9bc92"+source = "git+https://github.com/juspay/connector-service?tag=2026.11.17.1#484b523b78f7349adfcbd751e2854ae29f111e0f"dependencies = ["proc-macro2","quote",@@ -2368,6 +2368,12 @@ version = "0.3.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6"+[[package]]+name = "constant_time_eq"+version = "0.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b"+[[package]]name = "convert_case"version = "0.4.0"@@ -4199,7 +4205,7 @@ dependencies = [[[package]]name = "grpc-api-types"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.11.12.2#d8de4440b4ea108ab9b1f192699f84d3ace9bc92"+source = "git+https://github.com/juspay/connector-service?tag=2026.11.17.1#484b523b78f7349adfcbd751e2854ae29f111e0f"dependencies = ["axum 0.8.4","bytes",@@ -8206,7 +8212,7 @@ dependencies = [[[package]]name = "rust-grpc-client"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.11.12.2#d8de4440b4ea108ab9b1f192699f84d3ace9bc92"+source = "git+https://github.com/juspay/connector-service?tag=2026.11.17.1#484b523b78f7349adfcbd751e2854ae29f111e0f"dependencies = ["grpc-api-types",]@@ -10548,7 +10554,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f124352108f58ef88299e909f6e9470f1cdc8d2a1397963901b4a6366206bf72"dependencies = ["base32",- "constant_time_eq",+ "constant_time_eq 0.3.1","hmac 0.12.1","rand 0.9.2","sha1 0.10.6",@@ -10840,7 +10846,7 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"[[package]]name = "ucs_cards"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.11.12.2#d8de4440b4ea108ab9b1f192699f84d3ace9bc92"+source = "git+https://github.com/juspay/connector-service?tag=2026.11.17.1#484b523b78f7349adfcbd751e2854ae29f111e0f"dependencies = ["bytes","error-stack 0.4.1",@@ -10856,7 +10862,7 @@ dependencies = [[[package]]name = "ucs_common_enums"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.11.12.2#d8de4440b4ea108ab9b1f192699f84d3ace9bc92"+source = "git+https://github.com/juspay/connector-service?tag=2026.11.17.1#484b523b78f7349adfcbd751e2854ae29f111e0f"dependencies = ["serde","strum 0.26.3",@@ -10867,7 +10873,7 @@ dependencies = [[[package]]name = "ucs_common_utils"version = "0.1.0"-source = "git+https://github.com/juspay/connector-service?tag=2026.11.12.2#d8de4440b4ea108ab9b1f192699f84d3ace9bc92"+source = "git+https://github.com/juspay/connector-service?tag=2026.11.17.1#484b523b78f7349adfcbd751e2854ae29f111e0f"dependencies = ["anyhow","base64 0.21.7",@@ -10875,6 +10881,7 @@ dependencies = ["bytes","chrono","config_patch_derive",+ "constant_time_eq 0.4.2","error-stack 0.4.1","hex","http 1.3.1",diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.jsonindex 4ac58f325f..7be5b074b2 100644--- a/api-reference/v1/openapi_spec_v1.json+++ b/api-reference/v1/openapi_spec_v1.json@@ -40498,6 +40498,14 @@],"nullable": true},+ "purpose": {+ "allOf": [+ {+ "$ref": "#/components/schemas/PayoutPurpose"+ }+ ],+ "nullable": true+ },"sender_details": {"allOf": [{@@ -40831,6 +40839,14 @@],"nullable": true},+ "purpose": {+ "allOf": [+ {+ "$ref": "#/components/schemas/PayoutPurpose"+ }+ ],+ "nullable": true+ },"sender_details": {"allOf": [{@@ -41384,6 +41400,31 @@],"description": "The payout method information for response"},+ "PayoutPurpose": {+ "type": "string",+ "description": "The purpose for which a payout is being carried out.",+ "enum": [+ "donations",+ "education",+ "emergency_need",+ "expatriation",+ "family_support",+ "financial_services",+ "gifts",+ "income",+ "insurance",+ "investment",+ "it_services",+ "leisure",+ "loan_payment",+ "medical_treatment",+ "pension",+ "royalties",+ "savings",+ "travel_and_tourism",+ "other"+ ]+ },"PayoutRetrieveBody": {"type": "object","properties": {@@ -41646,6 +41687,14 @@],"nullable": true},+ "purpose": {+ "allOf": [+ {+ "$ref": "#/components/schemas/PayoutPurpose"+ }+ ],+ "nullable": true+ },"sender_details": {"allOf": [{@@ -41926,6 +41975,14 @@],"nullable": true},+ "purpose": {+ "allOf": [+ {+ "$ref": "#/components/schemas/PayoutPurpose"+ }+ ],+ "nullable": true+ },"sender_details": {"allOf": [{diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.jsonindex b048960b6f..a68bd38cd0 100644--- a/api-reference/v2/openapi_spec_v2.json+++ b/api-reference/v2/openapi_spec_v2.json@@ -28617,6 +28617,14 @@],"nullable": true},+ "purpose": {+ "allOf": [+ {+ "$ref": "#/components/schemas/PayoutPurpose"+ }+ ],+ "nullable": true+ },"sender_details": {"allOf": [{@@ -28876,6 +28884,14 @@],"nullable": true},+ "purpose": {+ "allOf": [+ {+ "$ref": "#/components/schemas/PayoutPurpose"+ }+ ],+ "nullable": true+ },"sender_details": {"allOf": [{@@ -29375,6 +29391,31 @@],"description": "The payout method information for response"},+ "PayoutPurpose": {+ "type": "string",+ "description": "The purpose for which a payout is being carried out.",+ "enum": [+ "donations",+ "education",+ "emergency_need",+ "expatriation",+ "family_support",+ "financial_services",+ "gifts",+ "income",+ "insurance",+ "investment",+ "it_services",+ "leisure",+ "loan_payment",+ "medical_treatment",+ "pension",+ "royalties",+ "savings",+ "travel_and_tourism",+ "other"+ ]+ },"PayoutRequest": {"oneOf": [{diff --git a/config/config.example.toml b/config/config.example.tomlindex 0f989798cf..6db13d22e2 100644--- a/config/config.example.toml+++ b/config/config.example.toml@@ -1365,6 +1365,7 @@ apple_pay = { country = "AF,DZ,AW,AU,AZ,BS,BH,BD,BB,BZ,BM,BT,BO,BA,BW,BR,BN,BG,B[payout_method_filters.checkout]apple_pay = { country = "AM, AT, AZ, BY, BE, BG, HR, CY, DK, EE, FO, FI, FR, GE, DE, GR, GL, GG, HU, IS, IE, IM, IT, KZ, JE, LV, LI, LT, LU, MT, MD, MC, ME, NL, NO, PL, PT, RO, SM, RS, SK, SI, ES, SE, CH, UA, GB, VA, AU , HK, JP , MY , MN, NZ, SG, TW, VN, EG , MA, ZA, AR, BR, CL, CO, CR, DO, EC, SV, GT, HN, MX, PA, PY, PE, UY, BH, IL, JO, KW, OM,QA, SA, AE, CA", currency = "EGP, MAD, ZAR, AUD, CNY, HKD, JPY, MOP, MYR, MNT, NZD, SGD, KRW, TWD, VND, AMD, EUR, BGN, CZK, DKK, GEL, GBP, HUF, ISK, KZT, CHF, MDL, NOK, PLN, RON, RSD, SEK, UAH, BRL, COP, CRC, DOP, GTQ, HNL, MXN, PAB, PYG, PEN, BSD, UYU, BHD, ILS, JOD, KWD, OMR, QAR, SAR, AED, CAD, USD" }+google_pay = { country = "AL, DZ, AS, AO, AG, AR, AU, AT, AZ, BH, BY, BE, BR, CA, BG, CL, CO, HR, DK, DO, EE, EG, FI, FR, DE, GR, HK, HU, IN, ID, IE, IL, IT, JP, JO, KZ, KE, KW, LV, LB, LT, LU, MY, MX, NL, NZ, NO, OM, PK, PA, PE, PH, PL, PT, QA, RO, SA, SG, SK, ZA, ES, LK, SE, CH, TH, TW, TR, UA, AE, US, UY, VN", currency = "AED, ALL, AOA, AUD, AZN, BGN, BHD, BRL, CAD, CHF, CLP, COP, CZK, DKK, DOP, DZD, EGP, EUR, GBP, HKD, HUF, IDR, ILS, INR, JPY, KES, KWD, KZT, LKR, MXN, MYR, NOK, NZD, OMR, PAB, PEN, PHP, PKR, PLN, QAR, RON, SAR, SEK, SGD, THB, TRY, TWD, UAH, USD, UYU, VND, XCD, ZAR" }[payment_link]sdk_url = "http://localhost:9090/0.16.7/v0/HyperLoader.js"diff --git a/config/deployments/integration_test.toml b/config/deployments/integration_test.tomlindex b3b1d90e52..17aea7e2b1 100644--- a/config/deployments/integration_test.toml+++ b/config/deployments/integration_test.toml@@ -921,6 +921,7 @@ google_pay = { country = "AF,DZ,AW,AU,AZ,BS,BH,BD,BB,BZ,BM,BT,BO,BA,BW,BR,BN,BG,[payout_method_filters.checkout]apple_pay = { country = "AM, AT,US, AZ, BY, BE, BG, HR, CY, DK, EE, FO, FI, FR, GE, DE, GR, GL, GG, HU, IS, IE, IM, IT, KZ, JE, LV, LI, LT, LU, MT, MD, MC, ME, NL, NO, PL, PT, RO, SM, RS, SK, SI, ES, SE, CH, UA, GB, VA, AU , HK, JP , MY , MN, NZ, SG, TW, VN, EG , MA, ZA, AR, BR, CL, CO, CR, DO, EC, SV, GT, HN, MX, PA, PY, PE, UY, BH, IL, JO, KW, OM,QA, SA, AE, CA", currency = "EGP, MAD, ZAR, AUD, CNY, HKD, JPY, MOP, MYR, MNT, NZD, SGD, KRW, TWD, VND, AMD, EUR, BGN, CZK, DKK, GEL, GBP, HUF, ISK, KZT, CHF, MDL, NOK, PLN, RON, RSD, SEK, UAH, BRL, COP, CRC, DOP, GTQ, HNL, MXN, PAB, PYG, PEN, BSD, UYU, BHD, ILS, JOD, KWD, OMR, QAR, SAR, AED, CAD, USD" }+google_pay = { country = "AL, DZ, AS, AO, AG, AR, AU, AT, AZ, BH, BY, BE, BR, CA, BG, CL, CO, HR, DK, DO, EE, EG, FI, FR, DE, GR, HK, HU, IN, ID, IE, IL, IT, JP, JO, KZ, KE, KW, LV, LB, LT, LU, MY, MX, NL, NZ, NO, OM, PK, PA, PE, PH, PL, PT, QA, RO, SA, SG, SK, ZA, ES, LK, SE, CH, TH, TW, TR, UA, AE, US, UY, VN", currency = "AED, ALL, AOA, AUD, AZN, BGN, BHD, BRL, CAD, CHF, CLP, COP, CZK, DKK, DOP, DZD, EGP, EUR, GBP, HKD, HUF, IDR, ILS, INR, JPY, KES, KWD, KZT, LKR, MXN, MYR, NOK, NZD, OMR, PAB, PEN, PHP, PKR, PLN, QAR, RON, SAR, SEK, SGD, THB, TRY, TWD, UAH, USD, UYU, VND, XCD, ZAR" }[pm_filters.inespay]sepa = { country = "ES", currency = "EUR"}diff --git a/config/deployments/production.toml b/config/deployments/production.tomlindex 924c218354..b6197a8817 100644--- a/config/deployments/production.toml+++ b/config/deployments/production.toml@@ -1023,6 +1023,7 @@ google_pay = { country = "AF,DZ,AW,AU,AZ,BS,BH,BD,BB,BZ,BM,BT,BO,BA,BW,BR,BN,BG,[payout_method_filters.checkout]apple_pay = { country = "AM, AT,US, AZ, BY, BE, BG, HR, CY, DK, EE, FO, FI, FR, GE, DE, GR, GL, GG, HU, IS, IE, IM, IT, KZ, JE, LV, LI, LT, LU, MT, MD, MC, ME, NL, NO, PL, PT, RO, SM, RS, SK, SI, ES, SE, CH, UA, GB, VA, AU , HK, JP , MY , MN, NZ, SG, TW, VN, EG , MA, ZA, AR, BR, CL, CO, CR, DO, EC, SV, GT, HN, MX, PA, PY, PE, UY, BH, IL, JO, KW, OM,QA, SA, AE, CA", currency = "EGP, MAD, ZAR, AUD, CNY, HKD, JPY, MOP, MYR, MNT, NZD, SGD, KRW, TWD, VND, AMD, EUR, BGN, CZK, DKK, GEL, GBP, HUF, ISK, KZT, CHF, MDL, NOK, PLN, RON, RSD, SEK, UAH, BRL, COP, CRC, DOP, GTQ, HNL, MXN, PAB, PYG, PEN, BSD, UYU, BHD, ILS, JOD, KWD, OMR, QAR, SAR, AED, CAD, USD" }+google_pay = { country = "AL, DZ, AS, AO, AG, AR, AU, AT, AZ, BH, BY, BE, BR, CA, BG, CL, CO, HR, DK, DO, EE, EG, FI, FR, DE, GR, HK, HU, IN, ID, IE, IL, IT, JP, JO, KZ, KE, KW, LV, LB, LT, LU, MY, MX, NL, NZ, NO, OM, PK, PA, PE, PH, PL, PT, QA, RO, SA, SG, SK, ZA, ES, LK, SE, CH, TH, TW, TR, UA, AE, US, UY, VN", currency = "AED, ALL, AOA, AUD, AZN, BGN, BHD, BRL, CAD, CHF, CLP, COP, CZK, DKK, DOP, DZD, EGP, EUR, GBP, HKD, HUF, IDR, ILS, INR, JPY, KES, KWD, KZT, LKR, MXN, MYR, NOK, NZD, OMR, PAB, PEN, PHP, PKR, PLN, QAR, RON, SAR, SEK, SGD, THB, TRY, TWD, UAH, USD, UYU, VND, XCD, ZAR" }[temp_locker_enable_config]ilixium.payment_method = "card"diff --git a/config/deployments/sandbox.toml b/config/deployments/sandbox.tomlindex bf737aaf61..c1cb0248b6 100644--- a/config/deployments/sandbox.toml+++ b/config/deployments/sandbox.toml@@ -1027,6 +1027,7 @@ google_pay = { country = "AF,DZ,AW,AU,AZ,BS,BH,BD,BB,BZ,BM,BT,BO,BA,BW,BR,BN,BG,[payout_method_filters.checkout]apple_pay = { country = "AM, AT,US, AZ, BY, BE, BG, HR, CY, DK, EE, FO, FI, FR, GE, DE, GR, GL, GG, HU, IS, IE, IM, IT, KZ, JE, LV, LI, LT, LU, MT, MD, MC, ME, NL, NO, PL, PT, RO, SM, RS, SK, SI, ES, SE, CH, UA, GB, VA, AU , HK, JP , MY , MN, NZ, SG, TW, VN, EG , MA, ZA, AR, BR, CL, CO, CR, DO, EC, SV, GT, HN, MX, PA, PY, PE, UY, BH, IL, JO, KW, OM,QA, SA, AE, CA", currency = "EGP, MAD, ZAR, AUD, CNY, HKD, JPY, MOP, MYR, MNT, NZD, SGD, KRW, TWD, VND, AMD, EUR, BGN, CZK, DKK, GEL, GBP, HUF, ISK, KZT, CHF, MDL, NOK, PLN, RON, RSD, SEK, UAH, BRL, COP, CRC, DOP, GTQ, HNL, MXN, PAB, PYG, PEN, BSD, UYU, BHD, ILS, JOD, KWD, OMR, QAR, SAR, AED, CAD, USD" }+google_pay = { country = "AL, DZ, AS, AO, AG, AR, AU, AT, AZ, BH, BY, BE, BR, CA, BG, CL, CO, HR, DK, DO, EE, EG, FI, FR, DE, GR, HK, HU, IN, ID, IE, IL, IT, JP, JO, KZ, KE, KW, LV, LB, LT, LU, MY, MX, NL, NZ, NO, OM, PK, PA, PE, PH, PL, PT, QA, RO, SA, SG, SK, ZA, ES, LK, SE, CH, TH, TW, TR, UA, AE, US, UY, VN", currency = "AED, ALL, AOA, AUD, AZN, BGN, BHD, BRL, CAD, CHF, CLP, COP, CZK, DKK, DOP, DZD, EGP, EUR, GBP, HKD, HUF, IDR, ILS, INR, JPY, KES, KWD, KZT, LKR, MXN, MYR, NOK, NZD, OMR, PAB, PEN, PHP, PKR, PLN, QAR, RON, SAR, SEK, SGD, THB, TRY, TWD, UAH, USD, UYU, VND, XCD, ZAR" }[temp_locker_enable_config]ilixium.payment_method = "card"diff --git a/config/development.toml b/config/development.tomlindex 99c6117eee..36affdbb23 100644--- a/config/development.toml+++ b/config/development.toml@@ -1513,6 +1513,7 @@ google_pay = { country = "AF,DZ,AW,AU,AZ,BS,BH,BD,BB,BZ,BM,BT,BO,BA,BW,BR,BN,BG,[payout_method_filters.checkout]apple_pay = { country = "AM,US, AT, AZ, BY, BE, BG, HR, CY, DK, EE, FO, FI, FR, GE, DE, GR, GL, GG, HU, IS, IE, IM, IT, KZ, JE, LV, LI, LT, LU, MT, MD, MC, ME, NL, NO, PL, PT, RO, SM, RS, SK, SI, ES, SE, CH, UA, GB, VA, AU , HK, JP , MY , MN, NZ, SG, TW, VN, EG , MA, ZA, AR, BR, CL, CO, CR, DO, EC, SV, GT, HN, MX, PA, PY, PE, UY, BH, IL, JO, KW, OM,QA, SA, AE, CA", currency = "EGP, MAD, ZAR, AUD, CNY, HKD, JPY, MOP, MYR, MNT, NZD, SGD, KRW, TWD, VND, AMD, EUR, BGN, CZK, DKK, GEL, GBP, HUF, ISK, KZT, CHF, MDL, NOK, PLN, RON, RSD, SEK, UAH, BRL, COP, CRC, DOP, GTQ, HNL, MXN, PAB, PYG, PEN, BSD, UYU, BHD, ILS, JOD, KWD, OMR, QAR, SAR, AED, CAD, USD" }+google_pay = { country = "AL,DZ, AS, AO, AG, AR, AU, AT, AZ, BH, BY, BE, BR, CA, BG, CL, CO, HR, DK, DO, EE, EG, FI, FR, DE, GR, HK, HU, IN, ID, IE, IL, IT, JP, JO, KZ, KE, KW, LV, LB, LT, LU, MY, MX, NL, NZ, NO, OM, PK, PA, PE, PH, PL, PT, QA, RO, SA, SG, SK, ZA, ES, LK, SE, CH, TH, TW, TR, UA, AE, US, UY, VN", currency = "AED, ALL, AOA, AUD, AZN, BGN, BHD, BRL, CAD, CHF, CLP, COP, CZK, DKK, DOP, DZD, EGP, EUR, GBP, HKD, HUF, IDR, ILS, INR, JPY, KES, KWD, KZT, LKR, MXN, MYR, NOK, NZD, OMR, PAB, PEN, PHP, PKR, PLN, QAR, RON, SAR, SEK, SGD, THB, TRY, TWD, UAH, USD, UYU, VND, XCD, ZAR" }[payment_link]sdk_url = "http://localhost:9050/HyperLoader.js"diff --git a/config/docker_compose.toml b/config/docker_compose.tomlindex a89ba9f94e..626e399d27 100644--- a/config/docker_compose.toml+++ b/config/docker_compose.toml@@ -1502,6 +1502,7 @@ apple_pay = { country = "AF,DZ,AW,AU,AZ,BS,BH,BD,BB,BZ,BM,BT,BO,BA,BW,BR,BN,BG,B[payout_method_filters.checkout]apple_pay = { country = "AM, AT, AZ, BY, BE, BG, HR, CY, DK, EE, FO, FI, FR, GE, DE, GR, GL, GG, HU, IS, IE, IM, IT, KZ, JE, LV, LI, LT, LU, MT, MD, MC, ME, NL, NO, PL, PT, RO, SM, RS, SK, SI, ES, SE, CH, UA, GB, VA, AU , HK, JP , MY , MN, NZ, SG, TW, VN, EG , MA, ZA, AR, BR, CL, CO, CR, DO, EC, SV, GT, HN, MX, PA, PY, PE, UY, BH, IL, JO, KW, OM,QA, SA, AE, CA", currency = "EGP, MAD, ZAR, AUD, CNY, HKD, JPY, MOP, MYR, MNT, NZD, SGD, KRW, TWD, VND, AMD, EUR, BGN, CZK, DKK, GEL, GBP, HUF, ISK, KZT, CHF, MDL, NOK, PLN, RON, RSD, SEK, UAH, BRL, COP, CRC, DOP, GTQ, HNL, MXN, PAB, PYG, PEN, BSD, UYU, BHD, ILS, JOD, KWD, OMR, QAR, SAR, AED, CAD, USD" }+google_pay = { country = "AL, DZ, AS, AO, AG, AR, AU, AT, AZ, BH, BY, BE, BR, CA, BG, CL, CO, HR, DK, DO, EE, EG, FI, FR, DE, GR, HK, HU, IN, ID, IE, IL, IT, JP, JO, KZ, KE, KW, LV, LB, LT, LU, MY, MX, NL, NZ, NO, OM, PK, PA, PE, PH, PL, PT, QA, RO, SA, SG, SK, ZA, ES, LK, SE, CH, TH, TW, TR, UA, AE, US, UY, VN", currency = "AED, ALL, AOA, AUD, AZN, BGN, BHD, BRL, CAD, CHF, CLP, COP, CZK, DKK, DOP, DZD, EGP, EUR, GBP, HKD, HUF, IDR, ILS, INR, JPY, KES, KWD, KZT, LKR, MXN, MYR, NOK, NZD, OMR, PAB, PEN, PHP, PKR, PLN, QAR, RON, SAR, SEK, SGD, THB, TRY, TWD, UAH, USD, UYU, VND, XCD, ZAR" }[locker_based_open_banking_connectors]connector_list = "tokenio"diff --git a/crates/api_models/src/payouts.rs b/crates/api_models/src/payouts.rsindex 86f58f4ec8..e43abb856d 100644--- a/crates/api_models/src/payouts.rs+++ b/crates/api_models/src/payouts.rs@@ -1,7 +1,7 @@use std::collections::HashMap;use cards::CardNumber;-use common_enums::{BankNames, CardNetwork, PayoutFundsTransferType};+use common_enums::{BankNames, CardNetwork, PayoutFundsTransferType, PayoutPurpose};use common_types::payouts::PayoutsBillingDescriptor;#[cfg(feature = "v2")]use common_utils::types::BrowserInformation;@@ -171,6 +171,10 @@ pub struct PayoutCreateRequest {#[schema(value_type = Option<PayoutFundsTransferType>, example = "account_to_account")]pub funds_transfer_type: Option<PayoutFundsTransferType>,+ /// The purpose for which the payout is being carried out.+ #[schema(value_type = Option<PayoutPurpose>, example = "family_support")]+ pub purpose: Option<PayoutPurpose>,+/// Identity of the party providing the funds. Persisted on the payout and echoed#[schema(value_type = Option<SenderDetails>)]pub sender_details: Option<SenderDetails>,@@ -988,6 +992,10 @@ pub struct PayoutCreateResponse {#[schema(value_type = Option<PayoutFundsTransferType>, example = "account_to_account")]pub funds_transfer_type: Option<PayoutFundsTransferType>,+ /// The purpose for which the payout is being carried out.+ #[schema(value_type = Option<PayoutPurpose>, example = "family_support")]+ pub purpose: Option<PayoutPurpose>,+/// Identity of the party providing the funds, as supplied in the payout request#[schema(value_type = Option<SenderDetails>)]pub sender_details: Option<SenderDetails>,diff --git a/crates/common_enums/src/enums.rs b/crates/common_enums/src/enums.rsindex af6a80e873..d667d2379e 100644--- a/crates/common_enums/src/enums.rs+++ b/crates/common_enums/src/enums.rs@@ -9526,6 +9526,45 @@ pub enum PayoutFundsTransferType {MastercardGamingRepay,}+/// The purpose for which a payout is being carried out.+#[derive(+ Clone,+ Copy,+ Debug,+ Eq,+ PartialEq,+ serde::Deserialize,+ serde::Serialize,+ strum::Display,+ strum::EnumString,+ ToSchema,+ Hash,+)]+#[cfg_attr(feature = "diesel", router_derive::diesel_enum(storage_type = "text"))]+#[serde(rename_all = "snake_case")]+#[strum(serialize_all = "snake_case")]+pub enum PayoutPurpose {+ Donations,+ Education,+ EmergencyNeed,+ Expatriation,+ FamilySupport,+ FinancialServices,+ Gifts,+ Income,+ Insurance,+ Investment,+ ItServices,+ Leisure,+ LoanPayment,+ MedicalTreatment,+ Pension,+ Royalties,+ Savings,+ TravelAndTourism,+ Other,+}+#[derive(Clone,Copy,diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.tomlindex 7c13b40b4b..3ea99134b1 100644--- a/crates/connector_configs/toml/development.toml+++ b/crates/connector_configs/toml/development.toml@@ -2046,6 +2046,8 @@ type="Text"[checkout_payout][[checkout_payout.wallet]]payment_method_type = "apple_pay"+[[checkout_payout.wallet]]+payment_method_type = "google_pay"[checkout_payout.connector_auth.SignatureKey]api_key = "Checkout Public Key"key1 = "Processing Channel ID"diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.tomlindex 8ded41132e..85f2db276e 100644--- a/crates/connector_configs/toml/production.toml+++ b/crates/connector_configs/toml/production.toml@@ -1791,6 +1791,8 @@ type = "Text"[checkout_payout][[checkout_payout.wallet]]payment_method_type = "apple_pay"+[[checkout_payout.wallet]]+payment_method_type = "google_pay"[checkout_payout.connector_auth.SignatureKey]api_key = "Checkout Public Key"key1 = "Processing Channel ID"diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.tomlindex 6ec18c2159..b73c9bace4 100644--- a/crates/connector_configs/toml/sandbox.toml+++ b/crates/connector_configs/toml/sandbox.toml@@ -2043,6 +2043,8 @@ type = "Text"[checkout_payout][[checkout_payout.wallet]]payment_method_type = "apple_pay"+[[checkout_payout.wallet]]+payment_method_type = "google_pay"[checkout_payout.connector_auth.SignatureKey]api_key = "Checkout Public Key"key1 = "Processing Channel ID"diff --git a/crates/diesel_models/src/payouts.rs b/crates/diesel_models/src/payouts.rsindex 4f9417df61..de8e687792 100644--- a/crates/diesel_models/src/payouts.rs+++ b/crates/diesel_models/src/payouts.rs@@ -43,6 +43,7 @@ pub struct Payouts {pub billing_descriptor: Option<common_types::payouts::PayoutsBillingDescriptor>,pub funds_transfer_type: Option<storage_enums::PayoutFundsTransferType>,pub sender_details: Option<Encryption>,+ pub purpose: Option<storage_enums::PayoutPurpose>,}#[derive(@@ -90,6 +91,7 @@ pub struct PayoutsNew {pub billing_descriptor: Option<common_types::payouts::PayoutsBillingDescriptor>,pub funds_transfer_type: Option<storage_enums::PayoutFundsTransferType>,pub sender_details: Option<Encryption>,+ pub purpose: Option<storage_enums::PayoutPurpose>,}#[derive(Debug, Clone, Serialize, Deserialize)]@@ -105,6 +107,7 @@ pub enum PayoutsUpdate {entity_type: storage_enums::PayoutEntityType,metadata: Option<pii::SecretSerdeValue>,funds_transfer_type: Option<storage_enums::PayoutFundsTransferType>,+ purpose: Option<storage_enums::PayoutPurpose>,sender_details: Option<Encryption>,profile_id: Option<common_utils::id_type::ProfileId>,status: Option<storage_enums::PayoutStatus>,@@ -149,6 +152,7 @@ pub struct PayoutsUpdateInternal {pub entity_type: Option<storage_enums::PayoutEntityType>,pub metadata: Option<pii::SecretSerdeValue>,pub funds_transfer_type: Option<storage_enums::PayoutFundsTransferType>,+ pub purpose: Option<storage_enums::PayoutPurpose>,/// Sender identity supplied with the payout request; normalized at the domain boundary./// Encrypted at rest with the merchant key.pub sender_details: Option<Encryption>,@@ -177,6 +181,7 @@ impl Default for PayoutsUpdateInternal {entity_type: None,metadata: None,funds_transfer_type: None,+ purpose: None,sender_details: None,payout_method_id: None,profile_id: None,@@ -206,6 +211,7 @@ impl From<PayoutsUpdate> for PayoutsUpdateInternal {entity_type,metadata,funds_transfer_type,+ purpose,sender_details,profile_id,status,@@ -225,6 +231,7 @@ impl From<PayoutsUpdate> for PayoutsUpdateInternal {entity_type: Some(entity_type),metadata,funds_transfer_type,+ purpose,sender_details,profile_id,status,diff --git a/crates/diesel_models/src/schema.rs b/crates/diesel_models/src/schema.rsindex 6f2f0b6ed0..da22c1de5b 100644--- a/crates/diesel_models/src/schema.rs+++ b/crates/diesel_models/src/schema.rs@@ -1613,6 +1613,8 @@ diesel::table! {#[max_length = 64]funds_transfer_type -> Nullable<Varchar>,sender_details -> Nullable<Bytea>,+ #[max_length = 64]+ purpose -> Nullable<Varchar>,}}diff --git a/crates/diesel_models/src/schema_v2.rs b/crates/diesel_models/src/schema_v2.rsindex c1555366ea..e6fe793734 100644--- a/crates/diesel_models/src/schema_v2.rs+++ b/crates/diesel_models/src/schema_v2.rs@@ -1535,6 +1535,8 @@ diesel::table! {#[max_length = 64]funds_transfer_type -> Nullable<Varchar>,sender_details -> Nullable<Bytea>,+ #[max_length = 64]+ purpose -> Nullable<Varchar>,}}diff --git a/crates/external_services/Cargo.toml b/crates/external_services/Cargo.tomlindex 459d771901..15c9911102 100644--- a/crates/external_services/Cargo.toml+++ b/crates/external_services/Cargo.toml@@ -83,12 +83,17 @@ typed-builder = "0.21.2"hyper-util = { version = "0.1.12", optional = true }http-body-util = { version = "0.1.3", optional = true }http-body = { version = "1.0.1", optional = true }-reqwest = { version = "0.13.5", features = ["rustls", "native-tls-no-alpn", "form", "query"] }+reqwest = { version = "0.13.5", features = [+ "rustls",+ "native-tls-no-alpn",+ "form",+ "query",+] }http = "1.3.1"url = { version = "2.5.4", features = ["serde"] }quick-xml = { version = "0.31.0", features = ["serialize"] }-unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.11.12.2", package = "rust-grpc-client" }+unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.11.17.1", package = "rust-grpc-client" }open-feature = { version = "0.2.5", optional = true }bytes = { version = "1.10.1", optional = true }futures = { version = "0.3.31", optional = true }@@ -98,7 +103,9 @@ superposition_sdk = { version = "0.119.0", optional = true }# First party crates-common_utils = { version = "0.1.0", path = "../common_utils", features = ["async_ext"] }+common_utils = { version = "0.1.0", path = "../common_utils", features = [+ "async_ext",+] }common_enums = { version = "0.1.0", path = "../common_enums" }hyperswitch_interfaces = { version = "0.1.0", path = "../hyperswitch_interfaces", default-features = false }cloud_services = { version = "0.1.0", path = "../cloud_services", optional = true }diff --git a/crates/hyperswitch_connectors/src/connectors/checkout.rs b/crates/hyperswitch_connectors/src/connectors/checkout.rsindex 06aaa7d387..02968b2bd3 100644--- a/crates/hyperswitch_connectors/src/connectors/checkout.rs+++ b/crates/hyperswitch_connectors/src/connectors/checkout.rs@@ -1757,7 +1757,7 @@ static CHECKOUT_SUPPORTED_PAYMENT_METHODS: LazyLock<SupportedPaymentMethods> =enums::PaymentMethod::Wallet,enums::PaymentMethodType::GooglePay,PaymentMethodDetails {- mandates: enums::FeatureStatus::NotSupported,+ mandates: enums::FeatureStatus::Supported,refunds: enums::FeatureStatus::Supported,supported_capture_methods: supported_capture_methods.clone(),specific_features: None,diff --git a/crates/hyperswitch_domain_models/src/payouts/payouts.rs b/crates/hyperswitch_domain_models/src/payouts/payouts.rsindex bd5d6bcb15..30493c98df 100644--- a/crates/hyperswitch_domain_models/src/payouts/payouts.rs+++ b/crates/hyperswitch_domain_models/src/payouts/payouts.rs@@ -129,6 +129,7 @@ pub struct Payouts {pub metadata: Option<pii::SecretSerdeValue>,/// The category of funds transfer to use when processing the payout.pub funds_transfer_type: Option<storage_enums::PayoutFundsTransferType>,+ pub purpose: Option<storage_enums::PayoutPurpose>,/// Sender identity supplied with the payout request; normalized at the domain boundary./// Encrypted at rest with the merchant key.pub sender_details: OptionalEncryptableJsonType<api_models::sender::SenderDetails>,@@ -166,6 +167,7 @@ pub struct PayoutsNew {pub metadata: Option<pii::SecretSerdeValue>,/// The category of funds transfer to use when processing the payout.pub funds_transfer_type: Option<storage_enums::PayoutFundsTransferType>,+ pub purpose: Option<storage_enums::PayoutPurpose>,/// Sender identity supplied with the payout request; normalized at the domain boundary./// Encrypted at rest with the merchant key.pub sender_details: OptionalEncryptableJsonType<api_models::sender::SenderDetails>,@@ -206,6 +208,7 @@ pub enum PayoutsUpdate {entity_type: storage_enums::PayoutEntityType,metadata: Option<pii::SecretSerdeValue>,funds_transfer_type: Option<storage_enums::PayoutFundsTransferType>,+ purpose: Option<storage_enums::PayoutPurpose>,sender_details: Option<Encryption>,profile_id: Option<id_type::ProfileId>,status: Option<storage_enums::PayoutStatus>,@@ -248,6 +251,7 @@ pub struct PayoutsUpdateInternal {pub entity_type: Option<storage_enums::PayoutEntityType>,pub metadata: Option<pii::SecretSerdeValue>,pub funds_transfer_type: Option<storage_enums::PayoutFundsTransferType>,+ pub purpose: Option<storage_enums::PayoutPurpose>,/// Sender identity supplied with the payout request; normalized at the domain boundary./// Encrypted at rest with the merchant key.pub sender_details: Option<Encryption>,@@ -276,6 +280,7 @@ impl From<PayoutsUpdate> for PayoutsUpdateInternal {entity_type,metadata,funds_transfer_type,+ purpose,sender_details,profile_id,status,@@ -295,6 +300,7 @@ impl From<PayoutsUpdate> for PayoutsUpdateInternal {entity_type: Some(entity_type),metadata,funds_transfer_type,+ purpose,sender_details,profile_id,status,diff --git a/crates/hyperswitch_domain_models/src/router_request_types.rs b/crates/hyperswitch_domain_models/src/router_request_types.rsindex 063c16fbbe..954889569d 100644--- a/crates/hyperswitch_domain_models/src/router_request_types.rs+++ b/crates/hyperswitch_domain_models/src/router_request_types.rs@@ -1773,6 +1773,8 @@ pub struct PayoutsData {pub browser_info: Option<BrowserInformation>,/// The category of funds transfer to use when processing the payout.pub funds_transfer_type: Option<storage_enums::PayoutFundsTransferType>,+ /// The purpose for which the payout is being carried out.+ pub purpose: Option<storage_enums::PayoutPurpose>,/// Connector-generated state persisted on the payout attempt for later payout steps.pub payout_connector_metadata: Option<pii::SecretSerdeValue>,pub additional_payout_method_data: Option<payout_method_utils::AdditionalPayoutMethodData>,diff --git a/crates/hyperswitch_interfaces/Cargo.toml b/crates/hyperswitch_interfaces/Cargo.tomlindex c6fceb01c4..1620680f57 100644--- a/crates/hyperswitch_interfaces/Cargo.toml+++ b/crates/hyperswitch_interfaces/Cargo.toml@@ -37,7 +37,7 @@ time = "0.3.41"tonic = "0.14"url = { version = "2.5.4", features = ["serde"] }-unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.11.12.2", package = "rust-grpc-client" }+unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.11.17.1", package = "rust-grpc-client" }tokio = { version = "1.45.1", features = ["macros", "rt-multi-thread"] }# First party cratesdiff --git a/crates/openapi/src/openapi.rs b/crates/openapi/src/openapi.rsindex b77f891c74..62a985c353 100644--- a/crates/openapi/src/openapi.rs+++ b/crates/openapi/src/openapi.rs@@ -932,6 +932,7 @@ Never share your secret api keys. Keep them guarded and secure.api_models::payments::BankCodeResponse,common_types::payouts::PayoutsBillingDescriptor,api_models::enums::PayoutFundsTransferType,+ api_models::enums::PayoutPurpose,api_models::sender::SenderDetails,api_models::sender::IndividualSenderDetails,api_models::sender::CorporateSenderDetails,diff --git a/crates/openapi/src/openapi_v2.rs b/crates/openapi/src/openapi_v2.rsindex 1d8a51dea0..1f271409f0 100644--- a/crates/openapi/src/openapi_v2.rs+++ b/crates/openapi/src/openapi_v2.rs@@ -819,6 +819,7 @@ Never share your secret api keys. Keep them guarded and secure.api_models::payments::PeachpaymentsCardOnFileTransactionType,common_types::payouts::PayoutsBillingDescriptor,api_models::enums::PayoutFundsTransferType,+ api_models::enums::PayoutPurpose,api_models::sender::SenderDetails,api_models::sender::IndividualSenderDetails,api_models::sender::CorporateSenderDetails,diff --git a/crates/router/Cargo.toml b/crates/router/Cargo.tomlindex 3eb4723052..df8b325f50 100644--- a/crates/router/Cargo.toml+++ b/crates/router/Cargo.toml@@ -259,8 +259,8 @@ rust_decimal = { version = "1.37.1", features = [] }rust-i18n = "3.1.5"-unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.11.12.2", package = "rust-grpc-client" }-unified-connector-service-cards = { git = "https://github.com/juspay/connector-service", tag = "2026.11.12.2", package = "ucs_cards" }+unified-connector-service-client = { git = "https://github.com/juspay/connector-service", tag = "2026.11.17.1", package = "rust-grpc-client" }+unified-connector-service-cards = { git = "https://github.com/juspay/connector-service", tag = "2026.11.17.1", package = "ucs_cards" }rustc-hash = "1.1.0"rustls = { version = "0.23", default-features = false, features = ["aws-lc-rs",@@ -307,7 +307,9 @@ api_models = { version = "0.1.0", path = "../api_models", features = ["control_center_theme",] }cards = { version = "0.1.0", path = "../cards" }-common_enums = { version = "0.1.0", path = "../common_enums", features = ["diesel"] }+common_enums = { version = "0.1.0", path = "../common_enums", features = [+ "diesel",+] }common_utils = { version = "0.1.0", path = "../common_utils", features = ["signals","async_ext",@@ -316,7 +318,9 @@ common_utils = { version = "0.1.0", path = "../common_utils", features = ["keymanager","diesel",] }-common_types = { version = "0.1.0", path = "../common_types", features = ["diesel"] }+common_types = { version = "0.1.0", path = "../common_types", features = [+ "diesel",+] }deja = { git = "https://github.com/juspay/deja", rev = "3fe15f88537c4bf4375504de4582217ba4e2d8e0", optional = true, default-features = false }deja-core = { git = "https://github.com/juspay/deja", rev = "3fe15f88537c4bf4375504de4582217ba4e2d8e0", optional = true }connector_configs = { version = "0.1.0", path = "../connector_configs" }diff --git a/crates/router/src/core/payouts.rs b/crates/router/src/core/payouts.rsindex 6f61c535b0..3ac79886c2 100644--- a/crates/router/src/core/payouts.rs+++ b/crates/router/src/core/payouts.rs@@ -3497,6 +3497,7 @@ pub async fn response_handler(recurring: payouts.recurring,metadata: payouts.metadata.clone(),funds_transfer_type: payouts.funds_transfer_type,+ purpose: payouts.purpose,sender_details: payouts.get_optional_sender_details().cloned(),merchant_connector_id: payout_attempt.merchant_connector_id.to_owned(),status: payout_attempt.status.to_owned(),@@ -3697,6 +3698,7 @@ pub async fn payout_create_db_entries(attempt_count: 1,metadata: req.metadata.clone(),funds_transfer_type: req.funds_transfer_type,+ purpose: req.purpose,sender_details,confirm: req.confirm,payout_link_id: payout_linkdiff --git a/crates/router/src/core/payouts/helpers.rs b/crates/router/src/core/payouts/helpers.rsindex 90d6ff74c7..5f4d437b7f 100644--- a/crates/router/src/core/payouts/helpers.rs+++ b/crates/router/src/core/payouts/helpers.rs@@ -1520,6 +1520,7 @@ pub async fn update_payouts_and_payout_attempt(// Update DB with new datalet amount = MinorUnit::from(req.amount.unwrap_or(payouts.amount.into()));let funds_transfer_type = req.funds_transfer_type.or(payouts.funds_transfer_type);+ let purpose = req.purpose.or(payouts.purpose);let sender_details = req.sender_details.clone()@@ -1565,6 +1566,7 @@ pub async fn update_payouts_and_payout_attempt(entity_type: req.entity_type.to_owned().unwrap_or(payouts.entity_type),metadata: req.metadata.clone().or(payouts.metadata.clone()),funds_transfer_type,+ purpose,sender_details,status: Some(status),profile_id: Some(payout_attempt.profile_id.clone()),diff --git a/crates/router/src/core/payouts/transformers.rs b/crates/router/src/core/payouts/transformers.rsindex 398d626878..f74e84d5e2 100644--- a/crates/router/src/core/payouts/transformers.rs+++ b/crates/router/src/core/payouts/transformers.rs@@ -91,6 +91,7 @@ implrecurring: payout.recurring,metadata: payout.metadata,funds_transfer_type: payout.funds_transfer_type,+ purpose: payout.purpose,sender_details,status: payout_attempt.status,error_message: payout_attempt.error_message,diff --git a/crates/router/src/core/unified_connector_service/transformers.rs b/crates/router/src/core/unified_connector_service/transformers.rsindex 984a18e93d..5895903837 100644--- a/crates/router/src/core/unified_connector_service/transformers.rs+++ b/crates/router/src/core/unified_connector_service/transformers.rs@@ -275,6 +275,40 @@ impl ForeignFrom<common_enums::PayoutFundsTransferType> for payments_grpc::Payou}}+impl ForeignFrom<common_enums::PayoutPurpose> for payments_grpc::payout_enums::PayoutPurpose {+ fn foreign_from(purpose: common_enums::PayoutPurpose) -> Self {+ use common_enums::PayoutPurpose;+ match purpose {+ PayoutPurpose::Donations => Self::Donations,+ PayoutPurpose::Education => Self::Education,+ PayoutPurpose::EmergencyNeed => Self::EmergencyNeed,+ PayoutPurpose::Expatriation => Self::Expatriation,+ PayoutPurpose::FamilySupport => Self::FamilySupport,+ PayoutPurpose::FinancialServices => Self::FinancialServices,+ PayoutPurpose::Gifts => Self::Gifts,+ PayoutPurpose::Income => Self::Income,+ PayoutPurpose::Insurance => Self::Insurance,+ PayoutPurpose::Investment => Self::Investment,+ PayoutPurpose::ItServices => Self::ItServices,+ PayoutPurpose::Leisure => Self::Leisure,+ PayoutPurpose::LoanPayment => Self::LoanPayment,+ PayoutPurpose::MedicalTreatment => Self::MedicalTreatment,+ PayoutPurpose::Pension => Self::Pension,+ PayoutPurpose::Royalties => Self::Royalties,+ PayoutPurpose::Savings => Self::Savings,+ PayoutPurpose::TravelAndTourism => Self::TravelAndTourism,+ PayoutPurpose::Other => Self::Other,+ }+ }+}++#[cfg(feature = "payouts")]+fn payout_purpose_to_ucs(purpose: Option<common_enums::PayoutPurpose>) -> Option<i32> {+ purpose+ .map(payments_grpc::payout_enums::PayoutPurpose::foreign_from)+ .map(i32::from)+}+impl ForeignFrom<&api_models::payments::ConnectorMetadata>for payments_grpc::AdditionalConnectorDetails{@@ -10197,6 +10231,7 @@ impl.funds_transfer_type.map(payments_grpc::PayoutFundsTransferType::foreign_from).map(i32::from),+ purpose: payout_purpose_to_ucs(router_data.request.purpose),vendor_account_details: router_data.request.vendor_details@@ -11027,13 +11062,10 @@ impl transformers::ForeignTryFrom<&api_models::payouts::PayoutMethodData>payments_grpc::ApplePayDecrypt::foreign_try_from(apple_pay)?,)}- api_models::payouts::Wallet::GooglePayDecrypt(_google_pay) => {- Err(error_stack::Report::new(- UnifiedConnectorServiceError::RequestEncodingFailedWithReason(- "Googlepay wallet not supported for Unified Connector Service"- .to_string(),- ),- ))?+ api_models::payouts::Wallet::GooglePayDecrypt(google_pay) => {+ payments_grpc::payout_method::PayoutMethodData::GooglePayDecrypt(+ payments_grpc::GooglePayDecrypt::foreign_try_from(google_pay)?,+ )}api_models::payouts::Wallet::Paypal(paypal) => {payments_grpc::payout_method::PayoutMethodData::Paypal(@@ -11341,6 +11373,34 @@ impl transformers::ForeignTryFrom<&api_models::payouts::ApplePayDecrypt>}}+#[cfg(feature = "payouts")]+impl transformers::ForeignTryFrom<&api_models::payouts::GooglePayDecrypt>+ for payments_grpc::GooglePayDecrypt+{+ type Error = error_stack::Report<UnifiedConnectorServiceError>;++ fn foreign_try_from(item: &api_models::payouts::GooglePayDecrypt) -> Result<Self, Self::Error> {+ Ok(Self {+ application_primary_account_number: Some(+ CardNumber::from_str(&item.application_primary_account_number.get_card_no())+ .change_context(+ UnifiedConnectorServiceError::RequestEncodingFailedWithReason(+ "Failed to parse card number".to_string(),+ ),+ )?,+ ),+ expiry_month: Some(item.expiry_month.clone()),+ expiry_year: Some(item.expiry_year.clone()),+ card_holder_name: item.card_holder_name.clone(),+ card_network: item+ .card_network+ .clone()+ .map(payments_grpc::CardNetwork::foreign_from)+ .map(i32::from),+ })+ }+}+#[cfg(feature = "payouts")]impl transformers::ForeignTryFrom<&api_models::payouts::Paypal> for payments_grpc::Paypal {type Error = error_stack::Report<UnifiedConnectorServiceError>;diff --git a/crates/router/src/core/unified_connector_service/transformers/tests.rs b/crates/router/src/core/unified_connector_service/transformers/tests.rsindex f9936bbc85..c55518dd0c 100644--- a/crates/router/src/core/unified_connector_service/transformers/tests.rs+++ b/crates/router/src/core/unified_connector_service/transformers/tests.rs@@ -67,6 +67,55 @@ fn payout_http_success_preserves_business_failure_status() {assert_eq!(response.error_code.as_deref(), Some("connector_error"));}+#[cfg(feature = "payouts")]+#[test]+fn payout_purpose_maps_all_router_values_and_preserves_absence() {+ use common_enums::PayoutPurpose as RouterPurpose;+ use payments_grpc::payout_enums::PayoutPurpose as UcsPurpose;++ let mappings = [+ (RouterPurpose::FamilySupport, UcsPurpose::FamilySupport, 1),+ (RouterPurpose::Expatriation, UcsPurpose::Expatriation, 2),+ (+ RouterPurpose::TravelAndTourism,+ UcsPurpose::TravelAndTourism,+ 3,+ ),+ (RouterPurpose::Education, UcsPurpose::Education, 4),+ (+ RouterPurpose::MedicalTreatment,+ UcsPurpose::MedicalTreatment,+ 5,+ ),+ (RouterPurpose::EmergencyNeed, UcsPurpose::EmergencyNeed, 6),+ (RouterPurpose::Leisure, UcsPurpose::Leisure, 7),+ (RouterPurpose::Savings, UcsPurpose::Savings, 8),+ (RouterPurpose::Gifts, UcsPurpose::Gifts, 9),+ (RouterPurpose::Donations, UcsPurpose::Donations, 10),+ (+ RouterPurpose::FinancialServices,+ UcsPurpose::FinancialServices,+ 11,+ ),+ (RouterPurpose::ItServices, UcsPurpose::ItServices, 12),+ (RouterPurpose::Investment, UcsPurpose::Investment, 13),+ (RouterPurpose::Insurance, UcsPurpose::Insurance, 14),+ (RouterPurpose::LoanPayment, UcsPurpose::LoanPayment, 15),+ (RouterPurpose::Pension, UcsPurpose::Pension, 16),+ (RouterPurpose::Royalties, UcsPurpose::Royalties, 17),+ (RouterPurpose::Other, UcsPurpose::Other, 18),+ (RouterPurpose::Income, UcsPurpose::Income, 19),+ ];++ for (router_purpose, ucs_purpose, wire_value) in mappings {+ let mapped = super::payout_purpose_to_ucs(Some(router_purpose));+ assert_eq!(mapped, Some(i32::from(ucs_purpose)));+ assert_eq!(mapped, Some(wire_value));+ }+ assert_eq!(i32::from(UcsPurpose::Unspecified), 0);+ assert_eq!(super::payout_purpose_to_ucs(None), None);+}+#[test]fn surcharge_connector_error_is_not_defaulted_to_zero() {let response = payments_grpc::SurchargeServiceCalculateResponse {diff --git a/crates/router/src/core/utils.rs b/crates/router/src/core/utils.rsindex 81add56dc4..6fa0f9b378 100644--- a/crates/router/src/core/utils.rs+++ b/crates/router/src/core/utils.rs@@ -410,6 +410,7 @@ pub(super) async fn construct_payout_router_data_common<F>(webhook_url: Some(webhook_url),browser_info,funds_transfer_type: payouts.funds_transfer_type,+ purpose: payouts.purpose,payout_connector_metadata: payout_attempt.payout_connector_metadata.to_owned(),additional_payout_method_data: payout_attempt.additional_payout_method_data.to_owned(),source_bank_data: payout_data.source_bank_data.clone(),diff --git a/crates/router/src/core/webhooks/gateway.rs b/crates/router/src/core/webhooks/gateway.rsindex c79c1040be..d7535cb6ce 100644--- a/crates/router/src/core/webhooks/gateway.rs+++ b/crates/router/src/core/webhooks/gateway.rs@@ -1041,7 +1041,10 @@ async fn build_event_context(Some(payments_grpc::EventContext {event_context: Some(payments_grpc::event_context::EventContext::Payment(- payments_grpc::PaymentEventContext { capture_method },+ payments_grpc::PaymentEventContext {+ capture_method,+ previous_status: None,+ },)),})}diff --git a/crates/router/src/services/kafka/payout.rs b/crates/router/src/services/kafka/payout.rsindex af4099f335..00f84fa40c 100644--- a/crates/router/src/services/kafka/payout.rs+++ b/crates/router/src/services/kafka/payout.rs@@ -22,6 +22,7 @@ pub struct KafkaPayout<'a> {pub return_url: Option<&'a String>,pub entity_type: storage_enums::PayoutEntityType,pub metadata: Option<pii::SecretSerdeValue>,+ pub purpose: Option<storage_enums::PayoutPurpose>,#[serde(with = "time::serde::timestamp")]pub created_at: OffsetDateTime,#[serde(with = "time::serde::timestamp")]@@ -63,6 +64,7 @@ impl<'a> KafkaPayout<'a> {return_url: payouts.return_url.as_ref(),entity_type: payouts.entity_type,metadata: payouts.metadata.clone(),+ purpose: payouts.purpose,created_at: payouts.created_at.assume_utc(),last_modified_at: payouts.last_modified_at.assume_utc(),attempt_count: payouts.attempt_count,diff --git a/crates/router/tests/connectors/utils.rs b/crates/router/tests/connectors/utils.rsindex 0d87ee4d1f..e6745728cf 100644--- a/crates/router/tests/connectors/utils.rs+++ b/crates/router/tests/connectors/utils.rs@@ -488,6 +488,7 @@ pub trait ConnectorActions: Connector {webhook_url: None,browser_info: None,funds_transfer_type: None,+ purpose: None,payout_connector_metadata: None,additional_payout_method_data: None,source_bank_data: None,diff --git a/crates/storage_impl/src/payouts/payouts.rs b/crates/storage_impl/src/payouts/payouts.rsindex 50a6477a6c..0188c23a3c 100644--- a/crates/storage_impl/src/payouts/payouts.rs+++ b/crates/storage_impl/src/payouts/payouts.rs@@ -107,6 +107,7 @@ impl<T: DatabaseStore> PayoutsInterface for KVRouterStore<T> {entity_type: new.entity_type,metadata: new.metadata.clone(),funds_transfer_type: new.funds_transfer_type,+ purpose: new.purpose,sender_details: new.sender_details.clone(),created_at: new.created_at,last_modified_at: new.last_modified_at,@@ -1112,6 +1113,7 @@ impl Conversion for Payouts {entity_type: self.entity_type,metadata: self.metadata,funds_transfer_type: self.funds_transfer_type,+ purpose: self.purpose,sender_details: self.sender_details.map(Encryption::from),created_at: self.created_at,last_modified_at: self.last_modified_at,@@ -1151,6 +1153,7 @@ impl DataModelExt for Payouts {entity_type: self.entity_type,metadata: self.metadata,funds_transfer_type: self.funds_transfer_type,+ purpose: self.purpose,sender_details: self.sender_details.map(Encryption::from),created_at: self.created_at,last_modified_at: self.last_modified_at,@@ -1186,6 +1189,7 @@ impl DataModelExt for Payouts {entity_type: storage_model.entity_type,metadata: storage_model.metadata,funds_transfer_type: storage_model.funds_transfer_type,+ purpose: storage_model.purpose,// `sender_details` holds ciphertext in storage; it is populated by the// async decryption step in the `PayoutsInterface` implementations.sender_details: None,@@ -1228,6 +1232,7 @@ impl DataModelExt for PayoutsNew {entity_type: self.entity_type,metadata: self.metadata,funds_transfer_type: self.funds_transfer_type,+ purpose: self.purpose,sender_details: self.sender_details.map(Encryption::from),created_at: self.created_at,last_modified_at: self.last_modified_at,@@ -1263,6 +1268,7 @@ impl DataModelExt for PayoutsNew {entity_type: storage_model.entity_type,metadata: storage_model.metadata,funds_transfer_type: storage_model.funds_transfer_type,+ purpose: storage_model.purpose,// `sender_details` holds ciphertext in storage; it is populated by the// async decryption step in the `PayoutsInterface` implementations.sender_details: None,@@ -1299,6 +1305,7 @@ impl DataModelExt for PayoutsUpdate {entity_type,metadata,funds_transfer_type,+ purpose,sender_details,profile_id,status,@@ -1318,6 +1325,7 @@ impl DataModelExt for PayoutsUpdate {entity_type,metadata,funds_transfer_type,+ purpose,sender_details,profile_id,status,diff --git a/migrations/2026-11-16-000000_add_purpose_to_payouts/down.sql b/migrations/2026-11-16-000000_add_purpose_to_payouts/down.sqlnew file mode 100644index 0000000000..89c67bb17c--- /dev/null+++ b/migrations/2026-11-16-000000_add_purpose_to_payouts/down.sql@@ -0,0 +1,2 @@+ALTER TABLE payouts+DROP COLUMN IF EXISTS purpose;diff --git a/migrations/2026-11-16-000000_add_purpose_to_payouts/up.sql b/migrations/2026-11-16-000000_add_purpose_to_payouts/up.sqlnew file mode 100644index 0000000000..dd4dadb913--- /dev/null+++ b/migrations/2026-11-16-000000_add_purpose_to_payouts/up.sql@@ -0,0 +1,2 @@+ALTER TABLE payouts+ADD COLUMN IF NOT EXISTS purpose VARCHAR(64);