Skip to content

Conversation

AkshayaFoiger
Copy link
Contributor

@AkshayaFoiger AkshayaFoiger commented Jun 30, 2025

Type of Change

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

Description

In this PR

  1. We have implemented the CIT and MIT payments, only for - network transaction id flow
  2. Completely refactored the status handling
  3. Refactored Psync and Rsync flow.

Any payment operation triggered to Vantiv (if didn't cause an API failure) will be marked as pending initially and later payment status gets updated via sync calls.

Note: Psync after void will fail the payment - this is a known issue.

How did you test it?

MCA Create
curl --location 'http://localhost:8080/account/postman_merchant_GHAction_0e454918-80a7-4094-bcff-daa8e346b243/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_2HAFolGlYSsegZm3**********' \
--data '{
    "connector_type": "payment_processor",
    "connector_name": "worldpayvantiv",
    "business_country": "US",
    "business_label": "default",
    "connector_account_details": {
        "auth_type": "SignatureKey",
         "api_key": "**************", 
            "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
                }
            ]
        },
        {
            "payment_method": "wallet",
            "payment_method_types": [
                {
                    "payment_method_type": "apple_pay",
                    "payment_experience": "invoke_sdk_client",
                    "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",
                    "minimum_amount": 1,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": true
                }
            ]
        }
    ],
    "metadata": {
        "report_group" : "Hello",
        "merchant_config_currency":"USD",
    }
}'

Response

{"connector_type":"payment_processor","connector_name":"worldpayvantiv","connector_label":"worldpayvantiv_US_default","merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","connector_account_details":{"auth_type":"SignatureKey","api_key":"u8**************01","key1":"01*****81","api_secret":"qR***********Fr"},"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","merchant_config_currency":"USD"},"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}
Mandates via NTI 0. Enable `is_connector_agnostic_mit_enabled` for your profile
  1. Create a CIT with Vantiv
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' \
--data '{
    "amount": 10,
    "currency": "USD",
    "confirm": true,
    "description": "payments",
    "connector": ["worldpayvantiv"],
    "capture_method": "automatic",
    "customer_id": "9ad5a4e4-80f1-494d-b081-8dc5497f0145",
    "authentication_type": "no_three_ds",
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "Ceutâ",
            "zip": "94122",
            "country": "AR",
            "first_name": "joseph",
            "last_name": "Doe"
        }
    },
  
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "4111111111111111", 
            "card_exp_month": "03",
            "card_exp_year": "30",
            "card_holder_name": "Joseph",
            "card_cvc": "737"
        }
    },
    "customer_acceptance": {
        "acceptance_type": "online",
        "accepted_at": "2025-03-27T13:56:49.848Z",
        "online": {
            "ip_address": null,
            "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15"
        }
    },
    "setup_future_usage": "off_session",
    "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": "13.232.74.226"
    },
    "metadata": {"report_group": "test"}
}'

Response

{"payment_id":"pay_2lKP1TDqbxFSb4LeKczw","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"processing","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_2lKP1TDqbxFSb4LeKczw_secret_kteL8nR3S6vFvyQ56mmG","created":"2025-06-30T09:47:06.353Z","currency":"USD","customer_id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","customer":{"id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"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":"ce5eae6b-563b-4f58-bd58-903d633a5a66","created_at":1751276826,"expires":1751280426,"secret":"epk_32a625084c354731b59c7d3accac3b70"},"manual_retry_allowed":false,"connector_transaction_id":"83997095739360411","frm_message":null,"metadata":{"report_group":"test"},"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_2lKP1TDqbxFSb4LeKczw","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:02:06.353Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"13.232.74.226","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_method_id":"pm_QH26P6o4MrXFv09GaAd7","payment_method_status":"inactive","updated":"2025-06-30T09:47:07.025Z","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}
  1. Do a Psync
curl --location 'http://localhost:8080/payments/pay_2lKP1TDqbxFSb4LeKczw?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY'

Response

{"payment_id":"pay_2lKP1TDqbxFSb4LeKczw","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"succeeded","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":0,"amount_received":10,"connector":"worldpayvantiv","client_secret":"pay_2lKP1TDqbxFSb4LeKczw_secret_kteL8nR3S6vFvyQ56mmG","created":"2025-06-30T09:47:06.353Z","currency":"USD","customer_id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","customer":{"id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"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":null,"manual_retry_allowed":false,"connector_transaction_id":"83997095739360411","frm_message":null,"metadata":{"report_group":"test"},"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_2lKP1TDqbxFSb4LeKczw","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:02:06.353Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"13.232.74.226","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_method_id":"pm_QH26P6o4MrXFv09GaAd7","payment_method_status":"inactive","updated":"2025-06-30T09:49:15.019Z","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}
  1. Do a MIT payment with the same connector
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' \
--data-raw '{
    "amount": 6500,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "customer_id": "ce5eae6b-563b-4f58-bd58-903d633a5a66",
    "email": "[email protected]",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://hyperswitch.io",
    "off_session": true,
    "recurring_details": {
        "type": "payment_method_id",
        "data": "pm_QH26P6o4MrXFv09GaAd7"
    },
    "connector": [
        "worldpayvantiv"
    ],
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "browser_info": {
        "ip_address": "129.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",
        "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
    }
}'

Response

{"payment_id":"pay_hzqIaJUelieO3OkgacKN","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"processing","amount":6500,"net_amount":6500,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_hzqIaJUelieO3OkgacKN_secret_6fYRsNwF8UdKNSvquyY7","created":"2025-06-30T09:52:21.261Z","currency":"USD","customer_id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","customer":{"id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","name":"John Doe","email":"[email protected]","phone":"999999999","phone_country_code":"+65"},"description":"Its my first payment request","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"[email protected]","name":"John Doe","phone":"999999999","return_url":"https://hyperswitch.io/","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,"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":"ce5eae6b-563b-4f58-bd58-903d633a5a66","created_at":1751277141,"expires":1751280741,"secret":"epk_676600b403cd43be8c4b57c7d96faafd"},"manual_retry_allowed":false,"connector_transaction_id":"84085052987747238","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_hzqIaJUelieO3OkgacKN","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:07:21.261Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"129.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":"pm_QH26P6o4MrXFv09GaAd7","payment_method_status":"active","updated":"2025-06-30T09:52:23.739Z","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":"saved_card","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}
  1. Do a Psync
curl --location 'http://localhost:8080/payments/pay_hzqIaJUelieO3OkgacKN?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY'

response

{"payment_id":"pay_hzqIaJUelieO3OkgacKN","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"succeeded","amount":6500,"net_amount":6500,"shipping_cost":null,"amount_capturable":0,"amount_received":6500,"connector":"worldpayvantiv","client_secret":"pay_hzqIaJUelieO3OkgacKN_secret_6fYRsNwF8UdKNSvquyY7","created":"2025-06-30T09:52:21.261Z","currency":"USD","customer_id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","customer":{"id":"ce5eae6b-563b-4f58-bd58-903d633a5a66","name":"John Doe","email":"[email protected]","phone":"999999999","phone_country_code":"+65"},"description":"Its my first payment request","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"Joseph","last_name":null},"phone":null,"email":null}},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"[email protected]","name":"John Doe","phone":"999999999","return_url":"https://hyperswitch.io/","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,"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":null,"manual_retry_allowed":false,"connector_transaction_id":"84085052987747238","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_hzqIaJUelieO3OkgacKN","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:07:21.261Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"129.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":"pm_QH26P6o4MrXFv09GaAd7","payment_method_status":"active","updated":"2025-06-30T09:53:49.963Z","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":"saved_card","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}
Manual + Refund 1. Create a manual payment
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' \
--data '{
    "amount": 10,
    "currency": "USD",
    "confirm": true,
    "description": "payments",
    "connector": ["worldpayvantiv"],
    
    "capture_method": "manual",
    "customer_id": "082c2d86-e9e2-481a-bd7e-1bd2e86575ba",
    "authentication_type": "no_three_ds",
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "Ceutâ",
            "zip": "94122",
            "country": "AR",
            "first_name": "joseph",
            "last_name": "Doe"
        }
    },

    
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "4111111111111111", 
            "card_exp_month": "03",
            "card_exp_year": "30",
            "card_holder_name": "Joseph",
            "card_cvc": "737"
        }
    }
  
}'

Response

{"payment_id":"pay_uKMQNl7N9wfLvmtq7oJZ","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"processing","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_uKMQNl7N9wfLvmtq7oJZ_secret_YqGIoiSGvX5aCT0GAM3F","created":"2025-06-30T09:57:16.636Z","currency":"USD","customer_id":"43dbe83d-b75c-496d-a546-59ce2c963322","customer":{"id":"43dbe83d-b75c-496d-a546-59ce2c963322","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"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":"43dbe83d-b75c-496d-a546-59ce2c963322","created_at":1751277436,"expires":1751281036,"secret":"epk_456b8bb12f6b4a0a8019c6745dc3e615"},"manual_retry_allowed":false,"connector_transaction_id":"83997095739384098","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_uKMQNl7N9wfLvmtq7oJZ","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:12:16.636Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-30T09:57:18.185Z","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}
  1. Call Psync
curl --location 'http://localhost:8080/payments/pay_uKMQNl7N9wfLvmtq7oJZ?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY'

Response

{"payment_id":"pay_uKMQNl7N9wfLvmtq7oJZ","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"requires_capture","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_uKMQNl7N9wfLvmtq7oJZ_secret_YqGIoiSGvX5aCT0GAM3F","created":"2025-06-30T09:57:16.636Z","currency":"USD","customer_id":"43dbe83d-b75c-496d-a546-59ce2c963322","customer":{"id":"43dbe83d-b75c-496d-a546-59ce2c963322","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"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":null,"manual_retry_allowed":false,"connector_transaction_id":"83997095739384098","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_uKMQNl7N9wfLvmtq7oJZ","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:12:16.636Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-30T09:58:32.411Z","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}
  1. Capture
curl --location 'http://localhost:8080/payments/pay_uKMQNl7N9wfLvmtq7oJZ/capture' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' \
--data '{
    "amount_to_capture": 10,
    "statement_descriptor_name": "Joseph",
    "statement_descriptor_suffix": "JS"
}'

Response

{"payment_id":"pay_uKMQNl7N9wfLvmtq7oJZ","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"processing","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_uKMQNl7N9wfLvmtq7oJZ_secret_YqGIoiSGvX5aCT0GAM3F","created":"2025-06-30T09:57:16.636Z","currency":"USD","customer_id":"43dbe83d-b75c-496d-a546-59ce2c963322","customer":{"id":"43dbe83d-b75c-496d-a546-59ce2c963322","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"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":null,"manual_retry_allowed":false,"connector_transaction_id":"83997095739385384","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_uKMQNl7N9wfLvmtq7oJZ","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:12:16.636Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-30T09:59:22.847Z","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}
  1. Call Psync
curl --location 'http://localhost:8080/payments/pay_uKMQNl7N9wfLvmtq7oJZ?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY'

Response

{"payment_id":"pay_uKMQNl7N9wfLvmtq7oJZ","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"succeeded","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":0,"amount_received":10,"connector":"worldpayvantiv","client_secret":"pay_uKMQNl7N9wfLvmtq7oJZ_secret_YqGIoiSGvX5aCT0GAM3F","created":"2025-06-30T09:57:16.636Z","currency":"USD","customer_id":"43dbe83d-b75c-496d-a546-59ce2c963322","customer":{"id":"43dbe83d-b75c-496d-a546-59ce2c963322","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"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":null,"manual_retry_allowed":false,"connector_transaction_id":"83997095739385384","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_uKMQNl7N9wfLvmtq7oJZ","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:12:16.636Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-30T10:00:09.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}
  1. Create a refund
curl --location 'http://localhost:8080/refunds' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' \
--data '{
    "payment_id": "pay_uKMQNl7N9wfLvmtq7oJZ",
    "amount": 10,
    "reason": "Customer returned product",
    "refund_type": "instant",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
     "split_refunds": {
        "stripe_split_refund": {
            "revert_platform_fee": true,
            "revert_transfer": true
        }   
        
    }
}'

Response

{"refund_id":"ref_ONP0iAUqRWqq6v7gSGWS","payment_id":"pay_uKMQNl7N9wfLvmtq7oJZ","amount":10,"currency":"USD","status":"pending","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-30T10:01:00.032Z","updated_at":"2025-06-30T10:01:01.059Z","connector":"worldpayvantiv","profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","split_refunds":{"stripe_split_refund":{"revert_platform_fee":true,"revert_transfer":true}},"issuer_error_code":null,"issuer_error_message":null}
  1. Call Rsync
{"refund_id":"ref_ONP0iAUqRWqq6v7gSGWS","payment_id":"pay_uKMQNl7N9wfLvmtq7oJZ","amount":10,"currency":"USD","status":"pending","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-30T10:01:00.032Z","updated_at":"2025-06-30T10:01:01.059Z","connector":"worldpayvantiv","profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","split_refunds":{"stripe_split_refund":{"revert_platform_fee":true,"revert_transfer":true}},"issuer_error_code":null,"issuer_error_message":null}

Response

{"refund_id":"ref_ONP0iAUqRWqq6v7gSGWS","payment_id":"pay_uKMQNl7N9wfLvmtq7oJZ","amount":10,"currency":"USD","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-30T10:01:00.032Z","updated_at":"2025-06-30T10:02:07.545Z","connector":"worldpayvantiv","profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","split_refunds":{"stripe_split_refund":{"revert_platform_fee":true,"revert_transfer":true}},"issuer_error_code":null,"issuer_error_message":null}
Void 1. Create a manual payment with vantiv
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' \
--data '{
    "amount": 10,
    "currency": "USD",
    "confirm": true,
    "description": "payments",
    "connector": ["worldpayvantiv"],
    "capture_method": "manual",
    "customer_id": "fb640a0d-6001-4d8d-9f8d-c7365092fbb2",
    "authentication_type": "no_three_ds",
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "Ceutâ",
            "zip": "94122",
            "country": "AR",
            "first_name": "joseph",
            "last_name": "Doe"
        }
    },
   
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "4111111111111111", 
            "card_exp_month": "03",
            "card_exp_year": "30",
            "card_holder_name": "Joseph",
            "card_cvc": "737"
        }
    } 
}'

Response

{"payment_id":"pay_VYvdUN8QOKzzMYsJjsbL","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"processing","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_VYvdUN8QOKzzMYsJjsbL_secret_PithWrAcFr0e4Kb3YBxW","created":"2025-06-30T10:05:18.411Z","currency":"USD","customer_id":"cd60638a-b1ee-420c-87e2-84a0cb417315","customer":{"id":"cd60638a-b1ee-420c-87e2-84a0cb417315","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"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":"cd60638a-b1ee-420c-87e2-84a0cb417315","created_at":1751277918,"expires":1751281518,"secret":"epk_b1782ed082fc40a7b7c1a3580dc68f8e"},"manual_retry_allowed":false,"connector_transaction_id":"83997095871395696","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_VYvdUN8QOKzzMYsJjsbL","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:20:18.411Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-30T10:05:20.952Z","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}
  1. Call Psync
curl --location 'http://localhost:8080/payments/pay_VYvdUN8QOKzzMYsJjsbL?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY'

Response

{"payment_id":"pay_VYvdUN8QOKzzMYsJjsbL","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"requires_capture","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_VYvdUN8QOKzzMYsJjsbL_secret_PithWrAcFr0e4Kb3YBxW","created":"2025-06-30T10:05:18.411Z","currency":"USD","customer_id":"cd60638a-b1ee-420c-87e2-84a0cb417315","customer":{"id":"cd60638a-b1ee-420c-87e2-84a0cb417315","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"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":null,"manual_retry_allowed":false,"connector_transaction_id":"83997095871395696","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_VYvdUN8QOKzzMYsJjsbL","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:20:18.411Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-30T10:06:19.219Z","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}
  1. Void the payment
curl --location 'http://localhost:8080/payments/pay_VYvdUN8QOKzzMYsJjsbL/cancel' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_n7QiMoAbvyRDMYUD1YCqh0JOtSlKx4YbH55UG0WvPeOrKXOgdPLTsMikZcNjz6DY' \
--data '{"cancellation_reason":"requested_by_customer"}'

Response

{"payment_id":"pay_VYvdUN8QOKzzMYsJjsbL","merchant_id":"postman_merchant_GHAction_56a5457a-0ed4-46be-a355-f2f1e7665db0","status":"processing","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_VYvdUN8QOKzzMYsJjsbL_secret_PithWrAcFr0e4Kb3YBxW","created":"2025-06-30T10:05:18.411Z","currency":"USD","customer_id":"cd60638a-b1ee-420c-87e2-84a0cb417315","customer":{"id":"cd60638a-b1ee-420c-87e2-84a0cb417315","name":null,"email":null,"phone":null,"phone_country_code":null},"description":"payments","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"AR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"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":"requested_by_customer","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":null,"manual_retry_allowed":false,"connector_transaction_id":"84085053114454037","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_VYvdUN8QOKzzMYsJjsbL","payment_link":null,"profile_id":"pro_s7S7h1rpBqt5v5y4ccvK","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_V5XFJarrAF5NstSv85Q2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-30T10:20:18.411Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-06-30T10:07:15.673Z","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}

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 30, 2025 09:30
Copy link

semanticdiff-com bot commented Jun 30, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs  11% smaller
  crates/hyperswitch_connectors/src/connectors/worldpayvantiv.rs  8% 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
  crates/hyperswitch_domain_models/src/configs.rs  0% smaller
  loadtest/config/development.toml Unsupported file format

@AkshayaFoiger AkshayaFoiger self-assigned this Jun 30, 2025
@AkshayaFoiger AkshayaFoiger added A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement C-refactor Category: Refactor labels Jun 30, 2025
@AkshayaFoiger AkshayaFoiger changed the title feat(connectors): [Worldpayvantiv] add NTI flow and and refactor sync flows feat(connectors): [Worldpayvantiv] add NTI flow and refactor sync flows Jun 30, 2025
@AkshayaFoiger AkshayaFoiger removed the request for review from a team June 30, 2025 10:42
@AkshayaFoiger
Copy link
Contributor Author

Cypress test is blocked on #8234

@likhinbopanna likhinbopanna added this pull request to the merge queue Jul 1, 2025
Merged via the queue into main with commit f8dc3ec Jul 1, 2025
19 of 23 checks passed
@likhinbopanna likhinbopanna deleted the vantiv-recurring branch July 1, 2025 11:22
AkshayaFoiger added a commit that referenced this pull request Jul 2, 2025
…ws (#8495)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
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 C-feature Category: Feature request or enhancement C-refactor Category: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants