Skip to content

feat(connectors): [Worldpayvantiv] add card support#8219

Merged
Gnanasundari24 merged 26 commits intomainfrom
worldpay_vantiv
Jun 4, 2025
Merged

feat(connectors): [Worldpayvantiv] add card support#8219
Gnanasundari24 merged 26 commits intomainfrom
worldpay_vantiv

Conversation

@AkshayaFoiger
Copy link
Contributor

@AkshayaFoiger AkshayaFoiger commented Jun 3, 2025

Type of Change

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

Description

Add worldpay vantiv as a payment connector. Integrated non 3ds cards flow.

Note: Report Group for each transaction is collected from the payment's metadata. If not provided - then the default report group provided in the MCA is used

Note: Currency for the transaction is not passed in the payment request to the connector. As the connector process payments based on the creds. The currency for a transaction is not included in the payment request sent to the connector. Instead, the connector determines the currency based on the credentials (merchant account) used for processing. Pass the merchant_config_currency field in the MCA metadata

Note: Performing a psync after a void, capture, or refund may return an incorrect status. This is because Worldpay Vantiv does not support retrieving the status of void or capture operations, and the response will reflect the status of the original authorization instead.

MCA Metadata - required

    "metadata": {
        "report_group" : "Hello",
        "merchant_config_currency":"USD"
     }

Payments Metadata - optional

    "metadata": {
        "report_group" : "Hello"
      }

How did you test it?

Find the PR for cypress testcases here #8234

MCA Create

Note: Add Metadata

curl --location 'http://localhost:8080/account/postman_merchant_GHAction_0e943b6a-2420-40b9-9038-014526c6d5c4/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_f5rS4tT7dwe1ASV4c9vswu99Exi1XhbtkQkq8WlQ4kJkwggWd1j5PMlyMOBRxC7X' \
--data-raw '{
    "connector_type": "payment_processor",
    "connector_name": "worldpayvantiv",
    "business_country": "US",
    "business_label": "default",
    "connector_account_details": {
        "auth_type": "SignatureKey",
         "api_key": "***********8",
            "key1": "***********",
            "api_secret": "********"
    },
    "test_mode": false,
    "disabled": false,
    "payment_methods_enabled": [
     
        {
            "payment_method": "card",
            "payment_method_types": [
                {
                    "payment_method_type": "credit",
                    "minimum_amount": 1,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                }
            ]
        },
        {
            "payment_method": "card",
            "payment_method_types": [
                {
                    "payment_method_type": "debit",
                    "minimum_amount": 1,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                }
            ]
        }
    ],
    "metadata": {
        "report_group" : "Hello",
        "merchant_config_currency":"EUR"
    }
}'

Response

{"connector_type":"payment_processor","connector_name":"worldpayvantiv","connector_label":"worldpayvantiv_US_default","merchant_connector_id":"mca_mDfUiiycKohM3lhqPzmF","profile_id":"pro_sKicDP92EtTBg8xTcMvo","connector_account_details":{"auth_type":"SignatureKey","api_key":"YA****************AG","key1":"e@************{S","api_secret":"VI*******ST"},"payment_methods_enabled":[{"payment_method":"pay_later","payment_method_types":[{"payment_method_type":"affirm","payment_experience":"redirect_to_url","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"pay_later","payment_method_types":[{"payment_method_type":"afterpay_clearpay","payment_experience":"redirect_to_url","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"pay_later","payment_method_types":[{"payment_method_type":"klarna","payment_experience":"redirect_to_url","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"pay_later","payment_method_types":[{"payment_method_type":"klarna","payment_experience":"invoke_sdk_client","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"bank_redirect","payment_method_types":[{"payment_method_type":"ideal","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"bancontact_card","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"przelewy24","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"giropay","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"sofort","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"eps","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"bank_debit","payment_method_types":[{"payment_method_type":"ach","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"becs","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"sepa","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"bacs","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"bank_transfer","payment_method_types":[{"payment_method_type":"ach","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"bacs","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"sepa","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"card","payment_method_types":[{"payment_method_type":"credit","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"card","payment_method_types":[{"payment_method_type":"debit","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"wallet","payment_method_types":[{"payment_method_type":"apple_pay","payment_experience":"invoke_sdk_client","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"wallet","payment_method_types":[{"payment_method_type":"google_pay","payment_experience":"invoke_sdk_client","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]}],"connector_webhook_details":null,"metadata":{"google_pay":{"merchant_info":{"merchant_name":"Narayan Bhat"},"allowed_payment_methods":[{"type":"CARD","parameters":{"allowed_auth_methods":["PAN_ONLY","CRYPTOGRAM_3DS"],"allowed_card_networks":["AMEX","DISCOVER","INTERAC","JCB","MASTERCARD","VISA"]},"tokenization_specification":{"type":"PAYMENT_GATEWAY","parameters":{"gateway":"example","gateway_merchant_id":"{{gateway_merchant_id}}"}}}]},"report_group":"Hello"},"test_mode":false,"disabled":false,"frm_configs":null,"business_country":"US","business_label":"default","business_sub_label":null,"applepay_verified_domains":null,"pm_auth_config":null,"status":"active","additional_merchant_data":null,"connector_wallets_details":null}
Payment - Automatic Capture
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_f5rS4tT7dwe1ASV4c9vswu99Exi1XhbtkQkq8WlQ4kJkwggWd1j5PMlyMOBRxC7X' \
--data-raw '{
    "return_url": "https://example.com",
    "confirm": true,
    "customer_acceptance": null,
    "description": "Test Payment",
    "email": "hyperswitch_sdk_demo_id@gmail.com",
    "browser_info": {
        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "language": "en-US",
        "color_depth": 32,
        "screen_height": 1117,
        "screen_width": 1728,
        "time_zone": -330,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "127.0.0.1"
    },
    "payment_method": "card",
    "amount": 5000,
    "authentication_type": "no_three_ds",
    "payment_method_data": {
        "card": {
            "card_number": "4470330769941000",
            "card_exp_month": "01",
            "card_exp_year": "27",
            
            "card_cvc": "123"
        }
    },
    "currency": "EUR"
}'

Response

{"payment_id":"pay_0DS5p4fWlx7o3YrJImLd","merchant_id":"postman_merchant_GHAction_0e943b6a-2420-40b9-9038-014526c6d5c4","status":"succeeded","amount":5000,"net_amount":5000,"shipping_cost":null,"amount_capturable":0,"amount_received":5000,"connector":"worldpayvantiv","client_secret":"pay_0DS5p4fWlx7o3YrJImLd_secret_nxG6CBMA6jyl2GJCwLQo","created":"2025-06-03T10:00:29.128Z","currency":"EUR","customer_id":null,"customer":{"id":null,"name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":"Test Payment","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":null,"payment_method":"card","payment_method_data":{"card":{"last4":"1000","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"447033","card_extended_bin":null,"card_exp_month":"01","card_exp_year":"27","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":null,"name":null,"phone":null,"return_url":"https://example.com/","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":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"309835803353942786","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_0DS5p4fWlx7o3YrJImLd","payment_link":null,"profile_id":"pro_sKicDP92EtTBg8xTcMvo","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_mDfUiiycKohM3lhqPzmF","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-03T10:15:29.128Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-03T10:00:29.551Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":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}
Payment - Manual Capture
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_f5rS4tT7dwe1ASV4c9vswu99Exi1XhbtkQkq8WlQ4kJkwggWd1j5PMlyMOBRxC7X' \
--data-raw '{
    
    "return_url": "https://example.com",
    "confirm": true,
    "customer_acceptance": null,
    "description": "Test Payment",
    "capture_method": "manual",
    "email": "hyperswitch_sdk_demo_id@gmail.com",
    "browser_info": {
        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "language": "en-US",
        "color_depth": 32,
        "screen_height": 1117,
        "screen_width": 1728,
        "time_zone": -330,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "127.0.0.1"
    },
    
    "payment_method": "card",
    "amount": 5000,
    "authentication_type": "no_three_ds",
    "payment_method_data": {
        "card": {
            "card_number": "4470330769941000",
            "card_exp_month": "01",
            "card_exp_year": "27",
            
            "card_cvc": "123"
        }
    },
    "currency": "EUR"
}'

Response

{"payment_id":"pay_w1skMTTK9fahKyRPaxFn","merchant_id":"postman_merchant_GHAction_0e943b6a-2420-40b9-9038-014526c6d5c4","status":"requires_capture","amount":5000,"net_amount":5000,"shipping_cost":null,"amount_capturable":5000,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_w1skMTTK9fahKyRPaxFn_secret_riJAK83eAjjroVnvZpom","created":"2025-06-03T10:01:55.966Z","currency":"EUR","customer_id":null,"customer":{"id":null,"name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":"Test Payment","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1000","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"447033","card_extended_bin":null,"card_exp_month":"01","card_exp_year":"27","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":null,"name":null,"phone":null,"return_url":"https://example.com/","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":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"037145635133998069","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_w1skMTTK9fahKyRPaxFn","payment_link":null,"profile_id":"pro_sKicDP92EtTBg8xTcMvo","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_mDfUiiycKohM3lhqPzmF","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-03T10:16:55.966Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-03T10:01:56.302Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":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}

Capture

curl --location 'http://localhost:8080/payments/pay_w1skMTTK9fahKyRPaxFn/capture' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_f5rS4tT7dwe1ASV4c9vswu99Exi1XhbtkQkq8WlQ4kJkwggWd1j5PMlyMOBRxC7X' \
--data '{
    "amount_to_capture": 10,
    "statement_descriptor_name": "Joseph",
    "statement_descriptor_suffix": "JS"
}'

Response

{"payment_id":"pay_w1skMTTK9fahKyRPaxFn","merchant_id":"postman_merchant_GHAction_0e943b6a-2420-40b9-9038-014526c6d5c4","status":"partially_captured","amount":5000,"net_amount":5000,"shipping_cost":null,"amount_capturable":0,"amount_received":10,"connector":"worldpayvantiv","client_secret":"pay_w1skMTTK9fahKyRPaxFn_secret_riJAK83eAjjroVnvZpom","created":"2025-06-03T10:01:55.966Z","currency":"EUR","customer_id":null,"customer":{"id":null,"name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":"Test Payment","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1000","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"447033","card_extended_bin":null,"card_exp_month":"01","card_exp_year":"27","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":null,"name":null,"phone":null,"return_url":"https://example.com/","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":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"507635677444597930","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_w1skMTTK9fahKyRPaxFn","payment_link":null,"profile_id":"pro_sKicDP92EtTBg8xTcMvo","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_mDfUiiycKohM3lhqPzmF","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-03T10:16:55.966Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-03T10:02:35.795Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":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}
Payment - Manual and Void
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_f5rS4tT7dwe1ASV4c9vswu99Exi1XhbtkQkq8WlQ4kJkwggWd1j5PMlyMOBRxC7X' \
--data-raw '{
    "return_url": "https://example.com",
    "confirm": true,
    "customer_acceptance": null,
    "description": "Test Payment",
    "capture_method": "manual",
    "email": "hyperswitch_sdk_demo_id@gmail.com",
    "browser_info": {
        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "language": "en-US",
        "color_depth": 32,
        "screen_height": 1117,
        "screen_width": 1728,
        "time_zone": -330,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "127.0.0.1"
    },
    
    "payment_method": "card",
    "amount": 5000,
    "authentication_type": "no_three_ds",
    "payment_method_data": {
        "card": {
            "card_number": "4470330769941000",
            "card_exp_month": "01",
            "card_exp_year": "27",
            
            "card_cvc": "123"
        }
    },
    "currency": "EUR"
}'

Response

{"payment_id":"pay_1VguBrodKij7MjODXDUx","merchant_id":"postman_merchant_GHAction_0e943b6a-2420-40b9-9038-014526c6d5c4","status":"requires_capture","amount":5000,"net_amount":5000,"shipping_cost":null,"amount_capturable":5000,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_1VguBrodKij7MjODXDUx_secret_0NK6mTyzXyIksKIscFdg","created":"2025-06-03T10:03:40.285Z","currency":"EUR","customer_id":null,"customer":{"id":null,"name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":"Test Payment","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1000","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"447033","card_extended_bin":null,"card_exp_month":"01","card_exp_year":"27","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":null,"name":null,"phone":null,"return_url":"https://example.com/","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":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"811673778835197805","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_1VguBrodKij7MjODXDUx","payment_link":null,"profile_id":"pro_sKicDP92EtTBg8xTcMvo","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_mDfUiiycKohM3lhqPzmF","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-03T10:18:40.285Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-03T10:03:40.653Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":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}

Void

curl --location 'http://localhost:8080/payments/pay_qRZdNBi5Uqbub8TPwW4g/cancel' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_f5rS4tT7dwe1ASV4c9vswu99Exi1XhbtkQkq8WlQ4kJkwggWd1j5PMlyMOBRxC7X' \
--data '{"cancellation_reason":"requested_by_customer"}'

Response

{"payment_id":"pay_qRZdNBi5Uqbub8TPwW4g","merchant_id":"postman_merchant_GHAction_0e943b6a-2420-40b9-9038-014526c6d5c4","status":"cancelled","amount":5000,"net_amount":5000,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_qRZdNBi5Uqbub8TPwW4g_secret_3pTlx8WqwVgOzNL13YRZ","created":"2025-06-03T10:11:25.750Z","currency":"EUR","customer_id":null,"customer":{"id":null,"name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":"Test Payment","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1000","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"447033","card_extended_bin":null,"card_exp_month":"01","card_exp_year":"27","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":null,"name":null,"phone":null,"return_url":"https://example.com/","authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":"requested_by_customer","error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"274134101692557291","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_qRZdNBi5Uqbub8TPwW4g","payment_link":null,"profile_id":"pro_sKicDP92EtTBg8xTcMvo","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_mDfUiiycKohM3lhqPzmF","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-03T10:26:25.750Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-03T10:11:35.087Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":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}

Payment and Refund
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_f5rS4tT7dwe1ASV4c9vswu99Exi1XhbtkQkq8WlQ4kJkwggWd1j5PMlyMOBRxC7X' \
--data-raw '{
    
    "return_url": "https://example.com",
    "confirm": true,
    "customer_acceptance": null,
    "description": "Test Payment",
    "email": "hyperswitch_sdk_demo_id@gmail.com",
    "browser_info": {
        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "language": "en-US",
        "color_depth": 32,
        "screen_height": 1117,
        "screen_width": 1728,
        "time_zone": -330,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "127.0.0.1"
    },
    
    "payment_method": "card",
    "amount": 5000,
    "authentication_type": "no_three_ds",
    "payment_method_data": {
        "card": {
            "card_number": "4470330769941000",
            "card_exp_month": "01",
            "card_exp_year": "27",
            
            "card_cvc": "123"
        }
    },
    "currency": "EUR"
}'

Response

{"payment_id":"pay_zRc36Lj42iKAOFxZgSxo","merchant_id":"postman_merchant_GHAction_0e943b6a-2420-40b9-9038-014526c6d5c4","status":"succeeded","amount":5000,"net_amount":5000,"shipping_cost":null,"amount_capturable":0,"amount_received":5000,"connector":"worldpayvantiv","client_secret":"pay_zRc36Lj42iKAOFxZgSxo_secret_IrmD7ftImm8kFInOIdmr","created":"2025-06-03T10:06:14.096Z","currency":"EUR","customer_id":null,"customer":{"id":null,"name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":"Test Payment","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":null,"payment_method":"card","payment_method_data":{"card":{"last4":"1000","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"447033","card_extended_bin":null,"card_exp_month":"01","card_exp_year":"27","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":null,"name":null,"phone":null,"return_url":"https://example.com/","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":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"615543068718754950","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_zRc36Lj42iKAOFxZgSxo","payment_link":null,"profile_id":"pro_sKicDP92EtTBg8xTcMvo","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_mDfUiiycKohM3lhqPzmF","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-03T10:21:14.096Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-03T10:06:14.472Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":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}

Refund

curl --location 'http://localhost:8080/refunds' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_f5rS4tT7dwe1ASV4c9vswu99Exi1XhbtkQkq8WlQ4kJkwggWd1j5PMlyMOBRxC7X' \
--data '{
    "payment_id": "pay_zRc36Lj42iKAOFxZgSxo",
    "amount": 10,
    "reason": "Customer returned product",
    "refund_type": "instant",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'

Response

{"refund_id":"ref_u50Ektt5srnf8HobAdxT","payment_id":"pay_zRc36Lj42iKAOFxZgSxo","amount":10,"currency":"EUR","status":"succeeded","reason":"Customer returned product","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"},"error_message":null,"error_code":null,"unified_code":null,"unified_message":null,"created_at":"2025-06-03T10:06:40.909Z","updated_at":"2025-06-03T10:06:41.300Z","connector":"worldpayvantiv","profile_id":"pro_sKicDP92EtTBg8xTcMvo","merchant_connector_id":"mca_mDfUiiycKohM3lhqPzmF","split_refunds":{"stripe_split_refund":{"revert_platform_fee":true,"revert_transfer":true}},"issuer_error_code":null,"issuer_error_message":null}

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 requested review from a team as code owners June 3, 2025 09:35
@semanticdiff-com
Copy link

semanticdiff-com bot commented Jun 3, 2025

@AkshayaFoiger AkshayaFoiger self-assigned this Jun 3, 2025
@AkshayaFoiger AkshayaFoiger added A-connector-compatibility Area: Connector compatibility A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement labels Jun 3, 2025
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Jun 3, 2025
@AkshayaFoiger AkshayaFoiger changed the title feat(connectors): [Worldpayvantiv] Add worldpay vantiv non-3ds card support feat(connectors): [Worldpayvantiv] add worldpay vantiv nothreeds card support Jun 3, 2025
@hyperswitch-bot hyperswitch-bot bot added M-api-contract-changes Metadata: This PR involves API contract changes and removed M-api-contract-changes Metadata: This PR involves API contract changes labels Jun 3, 2025
@AkshayaFoiger AkshayaFoiger changed the title feat(connectors): [Worldpayvantiv] add worldpay vantiv nothreeds card support feat(connectors): [Worldpayvantiv] add no-threeds card support Jun 3, 2025
@hyperswitch-bot hyperswitch-bot bot removed the M-api-contract-changes Metadata: This PR involves API contract changes label Jun 3, 2025
@AkshayaFoiger AkshayaFoiger changed the base branch from main to virtual_base_branch June 3, 2025 11:19
@AkshayaFoiger AkshayaFoiger force-pushed the virtual_base_branch branch 2 times, most recently from 66ba151 to 1e32d94 Compare June 3, 2025 11:32
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Jun 4, 2025
@AkshayaFoiger AkshayaFoiger requested a review from a team as a code owner June 4, 2025 08:01
(
None,
Some(Sale {
id: item.router_data.attempt_id.clone(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Use attempt id if it is less than 26 characters, otherwise generate a random string.

deepanshu-iiitu
deepanshu-iiitu previously approved these changes Jun 4, 2025
ShankarSinghC
ShankarSinghC previously approved these changes Jun 4, 2025
Base automatically changed from virtual_base_branch to main June 4, 2025 10:31
@Gnanasundari24 Gnanasundari24 dismissed stale reviews from ShankarSinghC and deepanshu-iiitu June 4, 2025 10:31

The base branch was changed.

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jun 4, 2025
Merged via the queue into main with commit f5c4f61 Jun 4, 2025
15 of 20 checks passed
@Gnanasundari24 Gnanasundari24 deleted the worldpay_vantiv branch June 4, 2025 14:32
AkshayaFoiger added a commit that referenced this pull request Jun 4, 2025
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
AkshayaFoiger added a commit that referenced this pull request Jun 5, 2025
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
pixincreate added a commit that referenced this pull request Jun 9, 2025
…tch into cypress/fix

* 'cypress/fix' of github.com:juspay/hyperswitch:
  chore(cypress): run formatter and address lints

* 'main' of github.com:juspay/hyperswitch:
  feat(router): add merchantId authentication for Payments v2 (#8239)
  chore(version): 2025.06.06.0
  Documentation edits made through Mintlify web editor
  Documentation edits made through Mintlify web editor
  feat(router): Return payment_experience in PML for payment (v2) (#8255)
  refactor: add infra-values in intent kafka events (#8264)
  fix(wasm): [Worldpayvantiv] add support for metadata.report_group (#8260)
  chore(version): 2025.06.05.0
  revert(routing): Add connectors from current active routing algorithm before adding fallback connectors (#8207)
  feat(connectors): [Worldpayvantiv] add card support (#8219)
  feat(connectors): [Template] add Worldpayvantiv  (#8226)
  refactor(dynamic_routing): add logic for creating merchant account in decision engine (#8191)
  feat(events): adding infra level components to api-events (#8214)
  chore(version): 2025.06.04.0
  feat(core): add support for consuming eci for AuthNResponse in Authentication flow (#8225)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-connector-compatibility Area: Connector compatibility A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement M-api-contract-changes Metadata: This PR involves API contract changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants