hyperswitch-funcdiff / prs /pr_10020.json
SirajRLX's picture
Add files using upload-large-folder tool
bcd1958 verified
{
"number": 10020,
"title": "feat(payment_method): auth token details vaulting through external vault",
"description": "## Type of Change\r\n<!-- Put an `x` in the boxes that apply -->\r\n\r\n- [ ] Bugfix\r\n- [x] New feature\r\n- [ ] Enhancement\r\n- [ ] Refactoring\r\n- [ ] Dependency updates\r\n- [ ] Documentation\r\n- [ ] CI/CD\r\n\r\n## Description\r\n<!-- Describe your changes in detail -->\r\nA subset of the data we provide in our response could be sensitive and thus requires [PCI Compliance.](https://www.exabeam.com/explainers/pci-compliance/pci-compliance-a-quick-guide/)\r\nIn such cases, we need to tokenize those sensitive data and provide it in the response for Non-PCI Compliant Merchants.\r\n\r\nSensitive data are stored in external vault such at VGS.\r\n\r\nIs_external_vault_enabled is the flag present in the business profile for enabling the external vault.\r\n\r\nSince tokens are generated for each field of the data, multi token support is added to vault module.\r\n\r\nMulti tokens are collected from vault and shown in the response of Post Authentication for merchant use-case.\r\n\r\n### Additional Changes\r\n\r\n- [ ] This PR modifies the API contract\r\n- [ ] This PR modifies the database schema\r\n- [ ] This PR modifies application configuration/environment variables\r\n\r\n<!--\r\nProvide links to the files with corresponding changes.\r\n\r\nFollowing are the paths where you can find config files:\r\n1. `config`\r\n2. `crates/router/src/configs`\r\n3. `loadtest/config`\r\n-->\r\n\r\n\r\n## Motivation and Context\r\n<!--\r\nWhy is this change required? What problem does it solve?\r\nIf it fixes an open issue, please link to the issue here.\r\n\r\nIf you don't have an issue, we'd recommend starting with one first so the PR\r\ncan focus on the implementation (unless it is an obvious bug or documentation fix\r\nthat will have little conversation).\r\n-->\r\n\r\n\r\n## How did you test it?\r\n<!--\r\nDid you write an integration/unit/API test to verify the code changes?\r\nOr did you test this change manually (provide relevant screenshots)?\r\n-->\r\n\r\nTested through Postman:\r\n\r\nCreate an MCA for Vault (VGS):\r\nCreate an MCA for Click2pay Visa:\r\nUpdate Business Profile with external vault details:\r\n```\r\n\"is_external_vault_enabled\": \"enable\",\r\n \"external_vault_connector_details\": {\r\n // \"vault_connector\": \"vgs\",\r\n \"vault_connector_id\": \"mca_CnA68SctZEkznzH4lLp4\",\r\n \"vault_sdk\": \"vgs_sdk\"\r\n }\r\n```\r\nCreate an Auth request:\r\n```\r\ncurl --location '{{baseUrl}}/authentication' \\\r\n--header 'Content-Type: application/json' \\\r\n--header 'Accept: application/json' \\\r\n--header 'x-profile-id:{{profile_id}}' \\\r\n--header 'api-key:{{api_key}}' \\\r\n--data-raw '{\r\n \"amount\": 10,\r\n \"currency\": \"USD\",\r\n \"customer_details\" : {\r\n \"id\": \"sahkal1243\",\r\n \"name\": \"sahkal\",\r\n \"email\": \"sahkalplanet@gmail.com\",\r\n \"phone\":\"7028323872831\",\r\n \"phone_country_code\": \"+91\"\r\n },\r\n \"authentication_connector\": \"ctp_visa\"\r\n}'\r\n```\r\nCollect the authentication_id and client_secret\r\n\r\nCreate an post auth sync request using the authentication_id and client_secret:\r\n```\r\ncurl --location '{{baseUrl}}/authentication/{{merchant_id}}/{{authentication_id}}/sync' \\\r\n--header 'Content-Type: application/json' \\\r\n--header 'Accept: application/json' \\\r\n--header 'x-profile-id:{{profile_id}}' \\\r\n--header 'api-key: {{publishable_key}}' \\\r\n--data '{ \r\n \"client_secret\": \"{{client_secret}}\",\r\n \"payment_method_details\": {\r\n \"payment_method_type\": \"ctp\",\r\n \"payment_method_data\": {\r\n \"encrypted_payload\": \"{{auth_payload}}\",\r\n \"provider\": \"visa\"\r\n }\r\n }\r\n}'\r\n```\r\nResponse should contain vault_token_data:\r\n```\r\n{\r\n \"authentication_id\": \"authn_6fgFiQ64m0kuf3jnxqtS\",\r\n \"merchant_id\": \"merchant_1762435933\",\r\n \"status\": \"success\",\r\n \"client_secret\": \"authn_6fgFiQ64m0kuf3jnxqtS_secret_MMzYe8YLTtHhinCwFDCS\",\r\n \"amount\": 10,\r\n \"currency\": \"USD\",\r\n \"authentication_connector\": \"ctp_visa\",\r\n \"force_3ds_challenge\": false,\r\n \"return_url\": null,\r\n \"created_at\": \"2025-11-07T10:41:52.986Z\",\r\n \"profile_id\": \"pro_G0AjhPb1D08fmW4GFVC9\",\r\n \"psd2_sca_exemption_type\": null,\r\n \"acquirer_details\": {\r\n \"acquirer_bin\": null,\r\n \"acquirer_merchant_id\": null,\r\n \"merchant_country_code\": null\r\n },\r\n \"threeds_server_transaction_id\": null,\r\n \"maximum_supported_3ds_version\": null,\r\n \"connector_authentication_id\": null,\r\n \"three_ds_method_data\": null,\r\n \"three_ds_method_url\": null,\r\n \"message_version\": null,\r\n \"connector_metadata\": null,\r\n \"directory_server_id\": null,\r\n \"vault_token_data\": {\r\n \"type\": \"card_token\",\r\n \"card_number\": \"tok_sandbox_7sYamAy5VjYGjZtBvBPGf8\",\r\n \"card_expiry_year\": \"tok_sandbox_gPdt2LmUNTWHnRHzpVNCjQ\",\r\n \"card_expiry_month\": \"tok_sandbox_6dyaQjzpo1Q9Ga89Jzkb2T\",\r\n \"card_cvc\": null\r\n },\r\n \"billing\": null,\r\n \"shipping\": null,\r\n \"browser_information\": null,\r\n \"email\": null,\r\n \"trans_status\": \"Y\",\r\n \"acs_url\": null,\r\n \"challenge_request\": null,\r\n \"acs_reference_number\": null,\r\n \"acs_trans_id\": null,\r\n \"acs_signed_content\": null,\r\n \"three_ds_requestor_url\": null,\r\n \"three_ds_requestor_app_url\": null,\r\n \"eci\": null,\r\n \"error_message\": null,\r\n \"error_code\": null,\r\n \"profile_acquirer_id\": null\r\n}\r\n```\r\n\r\n## Checklist\r\n<!-- Put an `x` in the boxes that apply -->\r\n\r\n- [x] I formatted the code `cargo +nightly fmt --all`\r\n- [x] I addressed lints thrown by `cargo clippy`\r\n- [x] I reviewed the submitted code\r\n- [ ] I added unit tests for my changes where possible\r\n",
"author": "Sakilmostak",
"created_at": "2025-10-28T07:41:24+00:00",
"merged_at": "2025-11-13T14:25:12+00:00",
"base_branch": "main",
"labels": [
"A-core",
"C-feature",
"A-payment-methods",
"M-api-contract-changes"
],
"url": "https://github.com/juspay/hyperswitch/pull/10020",
"commits": [
{
"sha": "92c71ddb53d0e1ca73a66e1df3a7e3003d62f739",
"message": "add click to pay support for modular authentication",
"author": "Sahkal Poddar",
"date": "2025-10-26T18:47:18+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/92c71ddb53d0e1ca73a66e1df3a7e3003d62f739"
},
{
"sha": "4748d51be1d93dc0f525d171f750951835b3f3a5",
"message": "added transstatus check",
"author": "Sahkal Poddar",
"date": "2025-10-27T07:03:07+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/4748d51be1d93dc0f525d171f750951835b3f3a5"
},
{
"sha": "25cc62507d15218cb358e5de903ba56b2d1dadcc",
"message": "added open-api specs",
"author": "Sahkal Poddar",
"date": "2025-10-27T07:41:36+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/25cc62507d15218cb358e5de903ba56b2d1dadcc"
},
{
"sha": "b6801658e1247efae3e4754efa14bf13aa7e9fb1",
"message": "removed commented code",
"author": "Sahkal Poddar",
"date": "2025-10-27T07:48:57+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/b6801658e1247efae3e4754efa14bf13aa7e9fb1"
},
{
"sha": "8dfde7d3f0700776deaca9f5351fc2bed7582c1e",
"message": "fixed open-api specs",
"author": "Sahkal Poddar",
"date": "2025-10-27T08:07:54+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/8dfde7d3f0700776deaca9f5351fc2bed7582c1e"
},
{
"sha": "1e094950ffd1c695df51ad9c98796ccc2d1a3684",
"message": "fixed open-api specs",
"author": "Sahkal Poddar",
"date": "2025-10-27T09:51:56+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/1e094950ffd1c695df51ad9c98796ccc2d1a3684"
},
{
"sha": "5b341e949e810463a786d1c8a80b80666a98309b",
"message": "fixed open-api specs",
"author": "Sahkal Poddar",
"date": "2025-10-27T09:54:46+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/5b341e949e810463a786d1c8a80b80666a98309b"
},
{
"sha": "57e404fb307a84920c15cb038cf6089adc2c36c8",
"message": "feat: add vgs bypass flow",
"author": "Sk Sakil Mostak",
"date": "2025-10-27T11:03:15+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/57e404fb307a84920c15cb038cf6089adc2c36c8"
},
{
"sha": "544bceb2e02816482918bc9b09c7af10ff065ea6",
"message": "chore: fix clippy + fmt",
"author": "sai-harsha-vardhan",
"date": "2025-10-27T11:42:41+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/544bceb2e02816482918bc9b09c7af10ff065ea6"
},
{
"sha": "b01bec8960c9d63da3498025284dda5e1e7f7944",
"message": "refactor: resolve clippy warnings",
"author": "Sk Sakil Mostak",
"date": "2025-10-27T11:53:08+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/b01bec8960c9d63da3498025284dda5e1e7f7944"
},
{
"sha": "edfa561e7ebdd5be82d21802e83e58c6e055a85c",
"message": "refactor: make vault_id mutli-token compatible",
"author": "Sk Sakil Mostak",
"date": "2025-10-28T11:14:56+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/edfa561e7ebdd5be82d21802e83e58c6e055a85c"
},
{
"sha": "e11ffec59c479f31807a283176de1b7c309a82c4",
"message": "refactor: add secondary url to vgs for auth",
"author": "Sk Sakil Mostak",
"date": "2025-10-28T17:51:30+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/e11ffec59c479f31807a283176de1b7c309a82c4"
},
{
"sha": "0dcd363087837cfb46238be514bc0a0d3f5ceb97",
"message": "resolved pr commengts",
"author": "Sahkal Poddar",
"date": "2025-10-29T11:18:42+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/0dcd363087837cfb46238be514bc0a0d3f5ceb97"
},
{
"sha": "7eb75435727fc68861f67a6d2bcac74a008ebcd3",
"message": "added strum serialiser for provider enum",
"author": "Sahkal Poddar",
"date": "2025-10-30T07:59:06+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/7eb75435727fc68861f67a6d2bcac74a008ebcd3"
},
{
"sha": "0faa7d5c6595cf902941ae15422e81cd0b613dd0",
"message": "refactor: save auth_token in external_vault",
"author": "Sk Sakil Mostak",
"date": "2025-10-30T09:36:03+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/0faa7d5c6595cf902941ae15422e81cd0b613dd0"
},
{
"sha": "b00e3ddd2dcb2d2000fc07d13548ce4e2f96f057",
"message": "Merge branch '11623-add-session-and-post-authentication-call-for-modular-auth' into bypass_vgs_flow_v1",
"author": "Sk Sakil Mostak",
"date": "2025-11-04T10:00:07+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/b00e3ddd2dcb2d2000fc07d13548ce4e2f96f057"
},
{
"sha": "bd641fccec5e7e56be07969beefed3271c469680",
"message": "docs(openapi): re-generate OpenAPI specification",
"author": "hyperswitch-bot[bot]",
"date": "2025-11-04T10:28:15+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/bd641fccec5e7e56be07969beefed3271c469680"
},
{
"sha": "4485f21595ed18163a756e132f4ab09eb8b41a96",
"message": "Merge branch 'main' into bypass_vgs_flow_v1",
"author": "Sk Sakil Mostak",
"date": "2025-11-06T07:46:21+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/4485f21595ed18163a756e132f4ab09eb8b41a96"
},
{
"sha": "fb2ded800f864bf614660da237dfdeb4ddc1f6ad",
"message": "refactor: add change based on requirements",
"author": "Sk Sakil Mostak",
"date": "2025-11-06T13:59:40+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/fb2ded800f864bf614660da237dfdeb4ddc1f6ad"
},
{
"sha": "88a146fc3732e8cc4552b3fbee47411b13bbc494",
"message": "add raw_card_details in post auth sync flow",
"author": "sai-harsha-vardhan",
"date": "2025-10-31T10:57:58+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/88a146fc3732e8cc4552b3fbee47411b13bbc494"
},
{
"sha": "9c76a538f2bf18b9134c69ccb943f0d8514df0f5",
"message": "refactor: add cvc for volatile storage",
"author": "Sk Sakil Mostak",
"date": "2025-11-07T07:43:32+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/9c76a538f2bf18b9134c69ccb943f0d8514df0f5"
},
{
"sha": "3d3e58636635e63955341257a0ef2d4def045fee",
"message": "chore: run formatter",
"author": "hyperswitch-bot[bot]",
"date": "2025-11-07T07:49:57+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/3d3e58636635e63955341257a0ef2d4def045fee"
},
{
"sha": "b6ccf4220bfc587f46edea57d5d8b1d5455295a6",
"message": "refactor: add card multi token integration for vgs",
"author": "Sk Sakil Mostak",
"date": "2025-11-07T08:40:00+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/b6ccf4220bfc587f46edea57d5d8b1d5455295a6"
},
{
"sha": "aa9617421890aec05f2fbf4f6649ad0c4e304631",
"message": "feat: add config based flag to decide whether to vault token data",
"author": "Sk Sakil Mostak",
"date": "2025-11-07T10:31:39+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/aa9617421890aec05f2fbf4f6649ad0c4e304631"
},
{
"sha": "5806d809d6530716f7733ba13d1c400cea197f8b",
"message": "refactor: resolve v2 ci checks",
"author": "Sk Sakil Mostak",
"date": "2025-11-07T14:15:21+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/5806d809d6530716f7733ba13d1c400cea197f8b"
},
{
"sha": "ae8101104e192d69a454c18359980562bc0faec1",
"message": "chore: resolve openapi check",
"author": "Sk Sakil Mostak",
"date": "2025-11-10T08:29:28+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/ae8101104e192d69a454c18359980562bc0faec1"
},
{
"sha": "574f6aa869f28200a8e27f194b69a70c42ab6061",
"message": "chore: differentiate integration for v1 and v2",
"author": "Sk Sakil Mostak",
"date": "2025-11-10T17:03:42+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/574f6aa869f28200a8e27f194b69a70c42ab6061"
},
{
"sha": "89bad2dbf7d09523141c995c9f98b30b78782c8d",
"message": "refactor: resolve comments (part-1)",
"author": "Sk Sakil Mostak",
"date": "2025-11-11T11:10:40+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/89bad2dbf7d09523141c995c9f98b30b78782c8d"
},
{
"sha": "e738e43e01c6c28a7ab4f102f917bd4f74e9a30b",
"message": "refactor: resolve comments (part-2)",
"author": "Sk Sakil Mostak",
"date": "2025-11-11T12:00:13+00:00",
"url": "https://github.com/juspay/hyperswitch/commit/e738e43e01c6c28a7ab4f102f917bd4f74e9a30b"
}
]
}