Merged
Conversation
Changed Files
|
2 tasks
deepanshu-iiitu
approved these changes
Nov 3, 2025
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10108 +/- ##
=======================================
Coverage ? 3.91%
=======================================
Files ? 1223
Lines ? 301639
Branches ? 0
=======================================
Hits ? 11804
Misses ? 289835
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
AkshayaFoiger
approved these changes
Nov 3, 2025
aadityaguptaa
pushed a commit
that referenced
this pull request
Nov 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
We need an arbitary field named store (
metadata.store) to be passed in adyen payment request and refund requestNOTE 1: SPLIT-payment cannot be tested we will get error as adyen needs to enable this (related pr)
NOTE 2: for split payments we are taking this field from
split_payments.adyen_split_payment.store, for normal payments we will take from metadata.storeTEST CASES
Normal Payments (`metadata.store`)
request
{ "amount": 1000, "customer_id": "hello_world", "currency": "EUR", "connector": [ "adyen" ], "confirm": true, "capture_method": "automatic", "payment_method": "card", "payment_method_type": "credit", "description": "hellow world", "billing": { "address": { "zip": "560095", "country": "US", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "line2": "Fasdf", "city": "Fasdf" } }, "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "John Doe", "card_cvc": "737" } }, "metadata": { "store":"ST3298F22322955NDWVDWCWG6" }, "browser_info": { "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "ip_address": "192.168.1.1", "java_enabled": false, "java_script_enabled": true, "language": "en-US", "color_depth": 24, "screen_height": 1080, "screen_width": 1920, "time_zone": 330, "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" } }connector request
raw_connector_request: Object {"amount": Object {"currency": String("EUR"), "value": Number(1000)}, "merchantAccount": String("*** alloc::string::String ***"), "paymentMethod": Object {"type": String("scheme"), "number": String("411111**********"), "expiryMonth": String("*** alloc::string::String ***"), "expiryYear": String("*** alloc::string::String ***"), "cvc": String("*** alloc::string::String ***"), "holderName": String("*** alloc::string::String ***"), "brand": String("visa")}, "reference": String("pay_ZfCNj8uPeJmEcoVfswf5_1"), "returnUrl": String("http://localhost:8080/payments/pay_ZfCNj8uPeJmEcoVfswf5/merchant_1762169799/redirect/response/adyen"), "browserInfo": Object {"userAgent": String("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"), "acceptHeader": String("text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"), "language": String("en-US"), "colorDepth": Number(24), "screenHeight": Number(1080), "screenWidth": Number(1920), "timeZoneOffset": Number(330), "javaEnabled": Bool(false)}, "shopperInteraction": String("Ecommerce"), "additionalData": Object {"executeThreeD": String("false")}, "shopperReference": String("merchant_1762169799_hello_world"), "shopperName": Object {"firstName": String("*** alloc::string::String ***"), "lastName": String("*** alloc::string::String ***")}, "shopperIP": String("192.**.**.**"), "shopperLocale": String("en"), "billingAddress": Object {"city": String("Fasdf"), "country": String("US"), "houseNumberOrName": String("*** alloc::string::String ***"), "postalCode": String("*** alloc::string::String ***"), "street": String("*** alloc::string::String ***")}, "countryCode": String("US"), "splits": Array [Object {"amount": Object {"currency": String("EUR"), "value": Number(500)}, "type": String("BalanceAccount"), "account": String("BA32CKZ223228H5LRZSTV7DB7"), "reference": String("0.2980249078510626_1"), "description": Null}, Object {"amount": Object {"currency": String("EUR"), "value": Number(500)}, "type": String("Commission"), "account": Null, "reference": String("0.2980249078510626_2"), "description": Null}, Object {"amount": Object {"currency": String("EUR"), "value": Number(0)}, "type": String("PaymentFee"), "account": String("BA32272223222H5HRD2MBBFSM"), "reference": String("0.2980249078510626_3"), "description": String("Payment fees")}], "store": String("ST3298F22322955NDWVDWCWG6")} // store being passedresponse
{ "payment_id": "pay_mytXqc3EST2PFIwevvPG", "merchant_id": "merchant_1762169799", "status": "succeeded", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1000, "connector": "adyen", "client_secret": "pay_mytXqc3EST2PFIwevvPG_secret_RZSsPgQoALaB8peBKRcf", "created": "2025-11-03T12:14:36.762Z", "currency": "EUR", "customer_id": "hello_world", "customer": { "id": "hello_world", "name": null, "email": null, "phone": null, "phone_country_code": null }, "description": "hellow world", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "JP Morgan", "card_issuing_country": "INDIA", "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "John Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Fasdf", "country": "US", "line1": "Fasdf", "line2": "Fasdf", "line3": null, "zip": "560095", "state": null, "first_name": "Sakil", "last_name": "Mostak", "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "hello_world", "created_at": 1762172076, "expires": 1762175676, "secret": "epk_20f76d2ca16949529f36ab961c7b9996" }, "manual_retry_allowed": null, "connector_transaction_id": "H6WPZRHWSJBH3275", "frm_message": null, "metadata": { "store": "ST3298F22322955NDWVDWCWG6" }, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "direct" }, "reference_id": "pay_mytXqc3EST2PFIwevvPG_1", "payment_link": null, "profile_id": "pro_AlrOEedUTS0P12YvfA3M", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_nLzFD4WPAIZMbssaiHQf", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-11-03T12:29:36.762Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": 330, "ip_address": "192.168.1.1", "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", "color_depth": 24, "java_enabled": false, "screen_width": 1920, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "screen_height": 1080, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "366589793729776", "payment_method_status": null, "updated": "2025-11-03T12:14:39.495Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "request_extended_authorization": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null, "is_stored_credential": null, "mit_category": null }Split payment (`split_payments.adyen_split_payment.store`)
request
{ "amount": 1000, "customer_id": "hello_world", "currency": "EUR", "connector": [ "adyen" ], "confirm": true, "capture_method": "automatic", "payment_method": "card", "payment_method_type": "credit", "description": "hellow world", "billing": { "address": { "zip": "560095", "country": "US", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "line2": "Fasdf", "city": "Fasdf" } }, "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "John Doe", "card_cvc": "737" } }, "split_payments": { "adyen_split_payment": { "store": "ST3298F22322955NDWVDWCWG6", "split_items": [ { "amount": 500, "split_type": "BalanceAccount", "account": "BA32CKZ223228H5LRZSTV7DB7", "reference": "0.2980249078510626_1" }, { "amount": 500, "split_type": "Commission", "reference": "0.2980249078510626_2" }, { "amount": 0, "split_type": "PaymentFee", "account": "BA32272223222H5HRD2MBBFSM", "reference": "0.2980249078510626_3", "description": "Payment fees" } ] } }, // "metadata": { // "store":"4935y84385736" // }, "browser_info": { "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "ip_address": "192.168.1.1", "java_enabled": false, "java_script_enabled": true, "language": "en-US", "color_depth": 24, "screen_height": 1080, "screen_width": 1920, "time_zone": 330, "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" } }connector request
INFO hyperswitch_interfaces::api_client: raw_connector_request: Object {"amount": Object {"currency": String("EUR"), "value": Number(1000)}, "merchantAccount": String("*** alloc::string::String ***"), "paymentMethod": Object {"type": String("scheme"), "number": String("411111**********"), "expiryMonth": String("*** alloc::string::String ***"), "expiryYear": String("*** alloc::string::String ***"), "cvc": String("*** alloc::string::String ***"), "holderName": String("*** alloc::string::String ***"), "brand": String("visa")}, "reference": String("pay_k7CUtTkbOFDpxPC2bs2m_1"), "returnUrl": String("http://localhost:8080/payments/pay_k7CUtTkbOFDpxPC2bs2m/merchant_1762169799/redirect/response/adyen"), "browserInfo": Object {"userAgent": String("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"), "acceptHeader": String("text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"), "language": String("en-US"), "colorDepth": Number(24), "screenHeight": Number(1080), "screenWidth": Number(1920), "timeZoneOffset": Number(330), "javaEnabled": Bool(false)}, "shopperInteraction": String("Ecommerce"), "additionalData": Object {"executeThreeD": String("false")}, "shopperReference": String("merchant_1762169799_hello_world"), "shopperName": Object {"firstName": String("*** alloc::string::String ***"), "lastName": String("*** alloc::string::String ***")}, "shopperIP": String("192.**.**.**"), "shopperLocale": String("en"), "billingAddress": Object {"city": String("Fasdf"), "country": String("US"), "houseNumberOrName": String("*** alloc::string::String ***"), "postalCode": String("*** alloc::string::String ***"), "street": String("*** alloc::string::String ***")}, "countryCode": String("US"), "splits": Array [Object {"amount": Object {"currency": String("EUR"), "value": Number(500)}, "type": String("BalanceAccount"), "account": String("BA32CKZ223228H5LRZSTV7DB7"), "reference": String("0.2980249078510626_1"), "description": Null}, Object {"amount": Object {"currency": String("EUR"), "value": Number(500)}, "type": String("Commission"), "account": Null, "reference": String("0.2980249078510626_2"), "description": Null}, Object {"amount": Object {"currency": String("EUR"), "value": Number(0)}, "type": String("PaymentFee"), "account": String("BA32272223222H5HRD2MBBFSM"), "reference": String("0.2980249078510626_3"), "description": String("Payment fees")}], "store": String("xxxxxxddddddddd")}REFUND (metadata.store)
request
{ "payment_id": "{{payment_id}}", "amount":200, "metadata":{"store":"ST3298F22322955NDWVDWCWG6"} }connector request
Object {"merchantAccount": String("*** alloc::string::String ***"), "amount": Object {"currency": String("EUR"), "value": Number(200)}, "reference": String("ref_3uMyyahlpMDkl1gkEqOV"), "store": String("ST3298F22322955NDWVDWCWG6")}response
{ "refund_id": "ref_3uMyyahlpMDkl1gkEqOV", "payment_id": "pay_IveyzhbBIzF58qDDlbmK", "amount": 200, "currency": "EUR", "status": "succeeded", "reason": null, "metadata": { "store": "ST3298F22322955NDWVDWCWG6" }, "error_message": null, "error_code": null, "unified_code": null, "unified_message": null, "created_at": "2025-11-03T12:26:44.581Z", "updated_at": "2025-11-03T12:26:45.157Z", "connector": "adyen", "profile_id": "pro_AlrOEedUTS0P12YvfA3M", "merchant_connector_id": "mca_nLzFD4WPAIZMbssaiHQf", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null }a
Additional Changes
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --allcargo clippy