Skip to content

refactor(router): remove mandate validation function#11664

Open
AkshayaFoiger wants to merge 23 commits into
mainfrom
remove-mandate-validate
Open

refactor(router): remove mandate validation function#11664
AkshayaFoiger wants to merge 23 commits into
mainfrom
remove-mandate-validate

Conversation

@AkshayaFoiger
Copy link
Copy Markdown
Contributor

@AkshayaFoiger AkshayaFoiger commented Mar 31, 2026

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Remove mandate_validation() from ConnectorValidations. As this check is already done from data fetched from .toml files and core has step-down logics accordingly

Screenshot 2026-04-08 at 4 14 34 PM

Affects mandate cit via authorize flow

How did you test it?

Create a payment with setupfuture_usage = off_session - for a payment method that don't support mandate

If the payment_method is implemented but mandate is not implemented for the payment_method - It will not throw a not supported error

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_65nMCzWtMPhsirZGbAk4PrzwAV6cUknKBoqnN9iqgV16ClCKCE5IOVJeTaquBRfp' \
--data '{
    "amount": 1000,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 1000,
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://duck.com",
    "payment_method": "card_redirect",
    "payment_method_type": "benefit",
    "payment_experience": "redirect_to_url",
    "payment_method_data": {
        "card_redirect": {
            "benefit": {}
        }
    },
    "billing": {"phone": {"number":"972332646742"}},
    "customer_id": "akshaya",
    "setup_future_usage": "off_session",
    "customer_acceptance": {
        "acceptance_type": "online",
        "accepted_at": "1963-05-03T04:07:52.723Z",
        "online": {
            "ip_address": "in sit",
            "user_agent": "amet irure esse"
        }
    }
}'

Response

{
    "payment_id": "pay_YXVava0hQrZkCr9PMzUJ",
    "merchant_id": "postman_merchant_GHAction_48d9024e-1a88-45a4-995e-2401d82bcf2c",
    "status": "processing",
    "amount": 1000,
    "net_amount": 1000,
    "shipping_cost": null,
    "amount_capturable": 1000,
    "amount_received": null,
    "processor_merchant_id": "postman_merchant_GHAction_48d9024e-1a88-45a4-995e-2401d82bcf2c",
    "initiator": null,
    "sdk_authorization": "cHJvZmlsZV9pZD1wcm9fUnNmU0pwYWZ1NmF3Sk9XdmJsWksscHVibGlzaGFibGVfa2V5PXBrX2Rldl80MTZlNGMyZGRlOTE0NTlkYjhhMGMyMmY4N2ZkNzZmOCxjbGllbnRfc2VjcmV0PXBheV9ZWFZhdmEwaFFyWmtDcjlQTXpVSl9zZWNyZXRfYTl6TXQxdm5RSDBKNnQzb1dtSnIsY3VzdG9tZXJfaWQ9YWtzaGF5YQ==",
    "connector": "adyen",
    "state_metadata": null,
    "client_secret": "pay_YXVava0hQrZkCr9PMzUJ_secret_a9zMt1vnQH0J6t3oWmJr",
    "created": "2026-04-01T10:09:02.137Z",
    "modified_at": "2026-04-01T10:09:02.727Z",
    "currency": "USD",
    "customer_id": "akshaya",
    "customer": {
        "id": "akshaya",
        "name": null,
        "email": null,
        "phone": null,
        "phone_country_code": "+1",
        "customer_document_details": null
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card_redirect",
    "payment_method_data": {
        "card_redirect": {
            "benefit": {}
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": null,
        "phone": {
            "number": "972332646742",
            "country_code": null
        },
        "email": null
    },
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": "000",
    "error_message": "Invalid type",
    "unified_code": "UE_9000",
    "unified_message": "Something went wrong",
    "error_details": {
        "unified_details": {
            "category": "UE_9000",
            "message": "Something went wrong",
            "standardised_code": null,
            "description": null,
            "user_guidance_message": null,
            "recommended_action": null
        },
        "issuer_details": {
            "code": null,
            "message": null,
            "network_details": {
                "name": null,
                "advice_code": null,
                "advice_message": null
            }
        },
        "connector_details": {
            "code": "000",
            "message": "Invalid type",
            "reason": "Invalid type"
        }
    },
    "payment_experience": "redirect_to_url",
    "payment_method_type": "benefit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "SC5T3LJ7PB9V3575",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "connector_response_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "pix_additional_details": null,
        "boleto_additional_details": null
    },
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_RsfSJpafu6awJOWvblZK",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_4N7VCaKTtfg8kcwGbxfK",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-04-01T10:24:02.137Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_method_status": null,
    "updated": "2026-04-01T10:09:02.727Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": null,
    "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": {
        "network_advice_code": null
    },
    "is_stored_credential": null,
    "mit_category": null,
    "billing_descriptor": null,
    "tokenization": null,
    "partner_merchant_identifier_details": null,
    "payment_method_tokenization_details": null,
    "installment_options": null,
    "installment_data": null
}
Mandate Payments via any connector
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_8LGKmBtKzEi2HsqKBblzpvpR9lDaLVKaxZ6ABRurA3xI1pzTrbPiwxGbDcyIM8NG' \
--data-raw '{
    "amount": 100,
    
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "customer_id": "cu_1721649988",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://google.com",
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "3700 0000 0000 002",
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "name name",
            "card_cvc": "7373"
        }
    },
    "setup_future_usage": "off_session",
    "customer_acceptance": {
        "acceptance_type": "offline",
        "accepted_at": "1963-05-03T04:07:52.723Z",
        "online": {
            "ip_address": "in sit",
            "user_agent": "amet irure esse"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "PiX",
            "last_name": "ss"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "browser_info": {
        "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
        "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "125.0.0.1"
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {},
    "order_details": [
        {
            "product_name": "Apple iphone 15",
            "quantity": 1,
            "amount": 0,
            "account_name": "transaction_processing"
        }
    ]
}'

Response

{
    "payment_id": "pay_wudNFrPMKvwIMChuL4aH",
    "merchant_id": "postman_merchant_GHAction_61ec7119-acb7-46b8-8c45-770375fe9558",
    "status": "succeeded",
    "amount": 100,
    "net_amount": 100,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 100,
    "processor_merchant_id": "postman_merchant_GHAction_61ec7119-acb7-46b8-8c45-770375fe9558",
    "initiator": null,
    "sdk_authorization": "cHJvZmlsZV9pZD1wcm9fdjVsYWRFamw5NU4zdHk2S2RGaDMscHVibGlzaGFibGVfa2V5PXBrX2Rldl8yZjA5NzY3NGEzNmM0YmUwOWE5ZTk4ZWZmN2M0MmUwNSxjbGllbnRfc2VjcmV0PXBheV93dWRORnJQTUt2d0lNQ2h1TDRhSF9zZWNyZXRfSnR6elBmUWJGb29Ib2prcHJkUjcsY3VzdG9tZXJfaWQ9Y3VfMTcyMTY0OTk4OA==",
    "connector": "adyen",
    "state_metadata": null,
    "client_secret": "pay_wudNFrPMKvwIMChuL4aH_secret_JtzzPfQbFooHojkprdR7",
    "created": "2026-04-01T10:20:15.532Z",
    "modified_at": "2026-04-01T10:20:17.430Z",
    "currency": "USD",
    "customer_id": "cu_1721649988",
    "customer": {
        "id": "cu_1721649988",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+65",
        "customer_document_details": null
    },
    "description": "Its my first payment request",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "0002",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "370000",
            "card_extended_bin": null,
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "name name",
            "payment_checks": null,
            "authentication_data": null,
            "auth_code": "010078"
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "John",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "PiX",
            "last_name": "ss",
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": [
        {
            "sku": null,
            "upc": null,
            "brand": null,
            "amount": 0,
            "category": null,
            "quantity": 1,
            "tax_rate": null,
            "product_id": null,
            "description": null,
            "product_name": "Apple iphone 15",
            "product_type": null,
            "sub_category": null,
            "total_amount": null,
            "commodity_code": null,
            "unit_of_measure": null,
            "product_img_link": null,
            "product_tax_code": null,
            "total_tax_amount": null,
            "requires_shipping": null,
            "unit_discount_amount": null
        }
    ],
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "error_details": 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,
    "manual_retry_allowed": null,
    "connector_transaction_id": "C5C3QGVBQK5BMH75",
    "frm_message": null,
    "metadata": {},
    "connector_metadata": null,
    "connector_response_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "pix_additional_details": null,
        "boleto_additional_details": null
    },
    "reference_id": "pay_wudNFrPMKvwIMChuL4aH_1",
    "payment_link": null,
    "profile_id": "pro_v5ladEjl95N3ty6KdFh3",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_NljmP7foTqU1psXEUf8x",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-04-01T10:35:15.532Z",
    "fingerprint": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "125.0.0.1",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "color_depth": 24,
        "java_enabled": true,
        "screen_width": 1536,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "screen_height": 723,
        "java_script_enabled": true
    },
    "payment_channel": null,
    "payment_method_id": "pm_6Qs1SDfugP9A9Bf812cF",
    "network_transaction_id": "068544209912842",
    "payment_method_status": "active",
    "updated": "2026-04-01T10:20:17.430Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "QZT6XW6LXRDZBX75",
    "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,
    "billing_descriptor": null,
    "tokenization": null,
    "partner_merchant_identifier_details": null,
    "payment_method_tokenization_details": {
        "payment_method_id": "pm_6Qs1SDfugP9A9Bf812cF",
        "payment_method_status": "active",
        "psp_tokenization": false,
        "network_tokenization": false,
        "network_transaction_id": "068544209912842",
        "is_eligible_for_mit_payment": true
    },
    "installment_options": null,
    "installment_data": null
}

MIT

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_8LGKmBtKzEi2HsqKBblzpvpR9lDaLVKaxZ6ABRurA3xI1pzTrbPiwxGbDcyIM8NG' \
--data '

{
    "amount": 1000,
    "currency": "USD",
    "off_session": true,
    "confirm": true,
    "capture_method": "automatic",
    "recurring_details": {
        "type": "payment_method_id",
        "data": "pm_6Qs1SDfugP9A9Bf812cF"
    },
    "customer_id": "cu_1721649988"
}
'

Response

{
    "payment_id": "pay_xmQd5suE8smGqRryoeju",
    "merchant_id": "postman_merchant_GHAction_61ec7119-acb7-46b8-8c45-770375fe9558",
    "status": "succeeded",
    "amount": 1000,
    "net_amount": 1000,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 1000,
    "processor_merchant_id": "postman_merchant_GHAction_61ec7119-acb7-46b8-8c45-770375fe9558",
    "initiator": null,
    "sdk_authorization": "cHJvZmlsZV9pZD1wcm9fdjVsYWRFamw5NU4zdHk2S2RGaDMscHVibGlzaGFibGVfa2V5PXBrX2Rldl8yZjA5NzY3NGEzNmM0YmUwOWE5ZTk4ZWZmN2M0MmUwNSxjbGllbnRfc2VjcmV0PXBheV94bVFkNXN1RThzbUdxUnJ5b2VqdV9zZWNyZXRfYzZFWExJWElFclpnSUhtRDcwV1QsY3VzdG9tZXJfaWQ9Y3VfMTcyMTY0OTk4OA==",
    "connector": "adyen",
    "state_metadata": null,
    "client_secret": "pay_xmQd5suE8smGqRryoeju_secret_c6EXLIXIErZgIHmD70WT",
    "created": "2026-04-01T11:03:52.553Z",
    "modified_at": "2026-04-01T11:03:54.465Z",
    "currency": "USD",
    "customer_id": "cu_1721649988",
    "customer": {
        "id": "cu_1721649988",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+65",
        "customer_document_details": null
    },
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": true,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "0002",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "370000",
            "card_extended_bin": null,
            "card_exp_month": "03",
            "card_exp_year": "2030",
            "card_holder_name": "name name",
            "payment_checks": null,
            "authentication_data": null,
            "auth_code": "011069"
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "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,
    "error_details": 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,
    "manual_retry_allowed": null,
    "connector_transaction_id": "ZD7928WBQK5BMH75",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "connector_response_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "pix_additional_details": null,
        "boleto_additional_details": null
    },
    "reference_id": "pay_xmQd5suE8smGqRryoeju_1",
    "payment_link": null,
    "profile_id": "pro_v5ladEjl95N3ty6KdFh3",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_NljmP7foTqU1psXEUf8x",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-04-01T11:18:52.553Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": "pm_6Qs1SDfugP9A9Bf812cF",
    "network_transaction_id": "998742239346453",
    "payment_method_status": "active",
    "updated": "2026-04-01T11:03:54.465Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "QZT6XW6LXRDZBX75",
    "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": true,
    "mit_category": null,
    "billing_descriptor": null,
    "tokenization": null,
    "partner_merchant_identifier_details": null,
    "payment_method_tokenization_details": {
        "payment_method_id": "pm_6Qs1SDfugP9A9Bf812cF",
        "payment_method_status": "active",
        "psp_tokenization": true,
        "network_tokenization": false,
        "network_transaction_id": "068544209912842",
        "is_eligible_for_mit_payment": true
    },
    "installment_options": null,
    "installment_data": null
}
Test Worldpayvantiv NTID + Wallet flow
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_GFsbCLudJxx1aQuvNc7Yw1EX90g0q7vHOSupyLUOOJYHnr5tjUvfpjKwL2fWlld7' \
--data '{
    "amount": 499,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    
    "payment_method": "wallet",
    "payment_method_type": "google_pay",
    "connector": ["worldpayvantiv"],
    
    "off_session": true,
    "recurring_details": {
        "type": "network_transaction_id_and_decrypted_wallet_token_details",
        "data": {
            "decrypted_token": "4830269090274605",
            "token_exp_month": "01",
            "token_exp_year": "30",
            "card_holder_name": "name name",
            "token_source" : "google_pay",
            "network_transaction_id": "560881868901730"
        }
    }

    
}'

Response

{
    "payment_id": "pay_bPbykfU06dZH35hfgWu9",
    "merchant_id": "postman_merchant_GHAction_4ff2a78b-24ea-4390-8a59-bc1292deccb7",
    "status": "succeeded",
    "amount": 499,
    "net_amount": 499,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 499,
    "processor_merchant_id": "postman_merchant_GHAction_4ff2a78b-24ea-4390-8a59-bc1292deccb7",
    "initiator": null,
    "sdk_authorization": "cHJvZmlsZV9pZD1wcm9fQWVSWFF3aWp5UGwxRThWenhvVDAscHVibGlzaGFibGVfa2V5PXBrX2Rldl9lOTczZmFhNGZmMDU0ZjE0YmI4NzIzYzAxYzNhZWVhZSxjbGllbnRfc2VjcmV0PXBheV9iUGJ5a2ZVMDZkWkgzNWhmZ1d1OV9zZWNyZXRfSUhNbGVXMm1rZlB0NWRVUk0xc0osY2xpZW50X3Nlc3Npb25faWQ9Y2xpZW50X3Nlc3NfOFZvaXNaek5wM0NVRWF6RUNPRlgscGF5bWVudF9pZD1wYXlfYlBieWtmVTA2ZFpIMzVoZmdXdTk=",
    "connector": "worldpayvantiv",
    "state_metadata": null,
    "client_secret": "pay_bPbykfU06dZH35hfgWu9_secret_IHMleW2mkfPt5dURM1sJ",
    "created": "2026-04-07T12:21:57.408Z",
    "modified_at": "2026-04-07T12:21:58.576Z",
    "currency": "USD",
    "customer_id": null,
    "customer": null,
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": true,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "wallet",
    "payment_method_data": {
        "network_token": {
            "last4": "4605",
            "card_type": null,
            "card_network": null,
            "token_isin": "483026",
            "card_issuer": null,
            "card_issuing_country": null,
            "token_exp_month": "01",
            "token_exp_year": "30",
            "card_holder_name": "name name",
            "par": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": 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,
    "error_details": null,
    "payment_experience": null,
    "payment_method_type": "google_pay",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "83999081492692271",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "connector_response_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "pix_additional_details": null,
        "boleto_additional_details": null,
        "pix_automatico_additional_details": null
    },
    "reference_id": "Xn6Q8J7qxxIeSLun0baj0Blc5Ipu",
    "payment_link": null,
    "profile_id": "pro_AeRXQwijyPl1E8VzxoT0",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_Fn1gD6NbkhEIkocuSddU",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-04-07T12:36:57.408Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": "384702244284800",
    "payment_method_status": null,
    "updated": "2026-04-07T12:21:58.576Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": null,
    "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": true,
    "mit_category": null,
    "billing_descriptor": null,
    "tokenization": null,
    "partner_merchant_identifier_details": null,
    "payment_method_tokenization_details": null,
    "installment_options": null,
    "installment_data": null
}

Stripe cypress test ran along with the PR - confirms the changes for mandates

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@AkshayaFoiger AkshayaFoiger self-assigned this Mar 31, 2026
@AkshayaFoiger AkshayaFoiger requested review from a team as code owners March 31, 2026 13:53
@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com Bot commented Mar 31, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs  50% smaller
  crates/hyperswitch_connectors/src/connectors/elavon.rs  48% smaller
  crates/hyperswitch_connectors/src/connectors/fiuu.rs  48% smaller
  crates/hyperswitch_connectors/src/connectors/archipel.rs  47% smaller
  crates/hyperswitch_connectors/src/connectors/mollie.rs  47% smaller
  crates/hyperswitch_connectors/src/connectors/aci.rs  41% smaller
  crates/hyperswitch_connectors/src/connectors/multisafepay.rs  40% smaller
  crates/hyperswitch_connectors/src/connectors/braintree.rs  31% smaller
  crates/hyperswitch_connectors/src/connectors/globalpay.rs  30% smaller
  crates/hyperswitch_connectors/src/connectors/noon.rs  29% smaller
  crates/hyperswitch_connectors/src/connectors/tesouro.rs  29% smaller
  crates/hyperswitch_connectors/src/connectors/peachpayments.rs  29% smaller
  crates/hyperswitch_connectors/src/connectors/nexinets.rs  29% smaller
  crates/hyperswitch_connectors/src/connectors/finix.rs  28% smaller
  crates/hyperswitch_connectors/src/connectors/paypal.rs  28% smaller
  crates/hyperswitch_connectors/src/connectors/xendit.rs  27% smaller
  crates/hyperswitch_connectors/src/connectors/moneris.rs  27% smaller
  crates/hyperswitch_connectors/src/connectors/deutschebank.rs  25% smaller
  crates/hyperswitch_connectors/src/connectors/airwallex.rs  25% smaller
  crates/hyperswitch_connectors/src/connectors/paybox.rs  25% smaller
  crates/hyperswitch_connectors/src/connectors/nuvei.rs  24% smaller
  crates/hyperswitch_connectors/src/connectors/cybersource.rs  24% smaller
  crates/hyperswitch_connectors/src/utils.rs  23% smaller
  crates/hyperswitch_connectors/src/connectors/payload.rs  22% smaller
  crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs  22% smaller
  crates/hyperswitch_connectors/src/connectors/nexixpay.rs  22% smaller
  crates/hyperswitch_connectors/src/connectors/bankofamerica.rs  21% smaller
  crates/hyperswitch_connectors/src/connectors/worldpayxml.rs  20% smaller
  crates/hyperswitch_connectors/src/connectors/worldpaymodular.rs  20% smaller
  crates/hyperswitch_connectors/src/connectors/checkout.rs  20% smaller
  crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs  19% smaller
  crates/hyperswitch_connectors/src/connectors/wellsfargo.rs  19% smaller
  crates/hyperswitch_connectors/src/connectors/gocardless.rs  17% smaller
  crates/hyperswitch_connectors/src/connectors/datatrans.rs  17% smaller
  crates/hyperswitch_connectors/src/connectors/bamboraapac.rs  16% smaller
  crates/hyperswitch_connectors/src/connectors/adyen.rs  8% smaller
  crates/hyperswitch_connectors/src/connectors/paysafe.rs  7% smaller
  crates/hyperswitch_connectors/src/connectors/worldpay.rs  5% smaller
  crates/router/src/connector/utils.rs  3% smaller
  crates/hyperswitch_connectors/src/connectors/novalnet.rs  1% smaller
  crates/hyperswitch_connectors/src/connectors/nmi.rs  1% smaller
  crates/hyperswitch_connectors/src/connectors/stripe.rs  1% smaller
  config/config.example.toml Unsupported file format
  config/deployments/integration_test.toml Unsupported file format
  config/deployments/production.toml Unsupported file format
  config/deployments/sandbox.toml Unsupported file format
  config/development.toml Unsupported file format
  config/docker_compose.toml Unsupported file format
  connector-template/mod.rs Unsupported file format
  crates/hyperswitch_connectors/src/connectors/affirm.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/blackhawknetwork.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/calida.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/envoy.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/fiservcommercehub.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/flexiti.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/gigadat.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/hyperpg.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/hyperwallet.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/imerchantsolutions.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/katapult.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/loonio.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/mpgs.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/payjustnow.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/payme.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/paytm.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/phonepe.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/sanlam.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/sift.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/truelayer.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/trustly.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/trustpayments.rs  0% smaller
  crates/hyperswitch_connectors/src/connectors/zift.rs  0% smaller
  crates/hyperswitch_interfaces/src/api.rs  0% smaller
  crates/hyperswitch_interfaces/src/connector_integration_interface.rs Unsupported file format
  crates/router/src/core/payments/flows/authorize_flow.rs  0% smaller

deepanshu-iiitu
deepanshu-iiitu previously approved these changes Apr 7, 2026
Copy link
Copy Markdown
Contributor

@sai-harsha-vardhan sai-harsha-vardhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How have we verified if the behaviour is same, and all the env values are accurate based on trait definitions? @AkshayaFoiger

Comment thread crates/router/src/core/payments/flows/authorize_flow.rs
@AkshayaFoiger
Copy link
Copy Markdown
Contributor Author

AkshayaFoiger commented Apr 8, 2026

How have we verified if the behaviour is same, and all the env values are accurate based on trait definitions? @AkshayaFoiger

Added test case analysis to the PR description. This verifies, the behavior doesn't change

@AkshayaFoiger
Copy link
Copy Markdown
Contributor Author

Even if the .toml file is not up-to-date removal of this function wouldn't change the current payment behavior

Screenshot 2026-04-08 at 4 27 29 PM

Until, mandates are marked as supported in .toml and not implemented in the code

deepanshu-iiitu
deepanshu-iiitu previously approved these changes Apr 8, 2026
@AkshayaFoiger AkshayaFoiger added the S-test-ready Status: This PR is ready for cypress-tests label Apr 8, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Apr 8, 2026
@AkshayaFoiger AkshayaFoiger added the S-test-ready Status: This PR is ready for cypress-tests label Apr 8, 2026
@AkshayaFoiger
Copy link
Copy Markdown
Contributor Author

@copilot Give a summary of this change

@AkshayaFoiger AkshayaFoiger added the S-test-ready Status: This PR is ready for cypress-tests label Apr 29, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label May 6, 2026
@AkshayaFoiger AkshayaFoiger added the S-test-ready Status: This PR is ready for cypress-tests label May 11, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label May 11, 2026
@AkshayaFoiger AkshayaFoiger added the S-test-ready Status: This PR is ready for cypress-tests label May 11, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label May 11, 2026
@AkshayaFoiger AkshayaFoiger added the S-test-ready Status: This PR is ready for cypress-tests label May 12, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-connector-integration Area: Connector integration A-core Area: Core flows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants