feat(connector): [NUVEI] Added support for AVC CVV checks, post confirm void and 0$ txns#8766
Merged
likhinbopanna merged 19 commits intomainfrom Aug 13, 2025
Merged
feat(connector): [NUVEI] Added support for AVC CVV checks, post confirm void and 0$ txns#8766likhinbopanna merged 19 commits intomainfrom
likhinbopanna merged 19 commits intomainfrom
Conversation
Changed Files
|
2 tasks
deepanshu-iiitu
requested changes
Aug 11, 2025
crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs
Outdated
Show resolved
Hide resolved
deepanshu-iiitu
previously approved these changes
Aug 11, 2025
deepanshu-iiitu
approved these changes
Aug 11, 2025
swangi-kumari
approved these changes
Aug 11, 2025
likhinbopanna
approved these changes
Aug 11, 2025
Contributor
Author
|
CHANGE REQUIRED FOR 0$ transaction : We are going to change this to setup mandate flow in upcomming pr rightnow its routing through AUTHORIZE flow itself . We can skip the test for this as of now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
Added few Nuvie features
Post Capture Void : After capture of successful amount we should be able to make void (typically before 24 hours)
0$ transaction : Allow 0$ transaction // We are going to change this to setup mandate flow in upcomming pr rightnow its routing through AUTHORIZE flow itself . We can skip the test for this as of now.
zero dollar transaction
Get connector mandate id with 0 transaction initization `/payments`
Request
{ "amount": 0, "currency": "EUR", "confirm": true, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, // "order_tax_amount": 100, "setup_future_usage": "off_session", // "payment_type":"setup_mandate", "customer_id": "nithxxinn", "return_url": "https://www.google.com", "capture_method": "automatic", "payment_method": "card", "payment_method_type": "credit", "authentication_type": "no_three_ds", "description": "hellow world", "billing": { "address": { "zip": "560095", "country": "US", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "line2": "Fasdf", "city": "Fasdf" } }, "browser_info": { "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "ip_address": "192.168.1.1", "java_enabled": false, "java_script_enabled": true, "language": "en-US", "color_depth": 24, "screen_height": 1080, "screen_width": 1920, "time_zone": 330, "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" }, "email": "hello@gmail.com", "payment_method_data": { "card": { "card_number": "4000000000009995", "card_exp_month": "01", "card_exp_year": "2026", "card_holder_name": "John Smith", "card_cvc": "100" } } }response
{ "payment_id": "pay_bnO3yXpju09Ws8oBUR9w", "merchant_id": "merchant_1754498214", "status": "requires_capture", "amount": 0, "net_amount": 0, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "nuvei", "client_secret": "pay_bnO3yXpju09Ws8oBUR9w_secret_Y6WO2DC3Uidzbeb7WyWa", "created": "2025-08-06T17:23:41.192Z", "currency": "EUR", "customer_id": "nithxxinn", "customer": { "id": "nithxxinn", "name": null, "email": "hello@gmail.com", "phone": null, "phone_country_code": null }, "description": "hellow world", "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": "9995", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "2026", "card_holder_name": "John Smith", "payment_checks": { "avs_description": null, "avs_result_code": "", "cvv_2_reply_code": "", "cvv_2_description": null, "merchant_advice_code": "", "merchant_advice_code_description": null }, "authentication_data": { "challengePreferenceReason": "12" } }, "billing": null }, "payment_token": "token_rO5qEPT5099xgR6E600V", "shipping": null, "billing": { "address": { "city": "Fasdf", "country": "US", "line1": "Fasdf", "line2": "Fasdf", "line3": null, "zip": "560095", "state": null, "first_name": "Sakil", "last_name": "Mostak", "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": "hello@gmail.com", "name": null, "phone": null, "return_url": "https://www.google.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": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "nithxxinn", "created_at": 1754501021, "expires": 1754504621, "secret": "epk_6fb49f9cdabd42dd9d33789fb584df66" }, "manual_retry_allowed": false, "connector_transaction_id": "7110000000016293888", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "7657741111", "payment_link": null, "profile_id": "pro_Lm9uDS83De6QX5EHQNMy", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_BgWz2Uy3MgHlzzgy7W7H", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-06T17:38:41.192Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": 330, "ip_address": "192.168.1.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36", "color_depth": 24, "java_enabled": false, "screen_width": 1920, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "screen_height": 1080, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_Ku0TdAhmkKDiX9TqhomL", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-08-06T17:23:46.105Z", "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": "2073997111", // connector mandate id "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 }Mandates triggered using 0 transcation payment method id
Request
##response
{ "payment_id": "pay_eW2XRbgGai3X3RpAVVGD", "merchant_id": "merchant_1754498214", "status": "succeeded", "amount": 333, "net_amount": 333, "shipping_cost": null, "amount_capturable": 0, "amount_received": 333, "connector": "nuvei", "client_secret": "pay_eW2XRbgGai3X3RpAVVGD_secret_H6pCfoxWHonNwkXzyHD2", "created": "2025-08-06T17:34:58.537Z", "currency": "EUR", "customer_id": "nithxxinn", "customer": { "id": "nithxxinn", "name": null, "email": "hello@gmail.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "9995", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "2026", "card_holder_name": "John Smith", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "hello@gmail.com", "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": "nithxxinn", "created_at": 1754501698, "expires": 1754505298, "secret": "epk_7e35c394cdc94bc59e5184173d3fa385" }, "manual_retry_allowed": false, "connector_transaction_id": "7110000000016294501", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "7658013111", "payment_link": null, "profile_id": "pro_Lm9uDS83De6QX5EHQNMy", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_BgWz2Uy3MgHlzzgy7W7H", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-06T17:49:58.537Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": 330, "ip_address": "192.168.1.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36", "color_depth": 24, "java_enabled": false, "screen_width": 1920, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "screen_height": 1080, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_Ku0TdAhmkKDiX9TqhomL", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-08-06T17:35:01.823Z", "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": "2073997111", "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 }Post capture cancel
/payments/:id/cancel_post_capture
Response
{ "payment_id": "pay_MyZex1y0W8JtlkJ4E8sX", "merchant_id": "merchant_1754498214", "status": "partially_captured", "amount": 21, "net_amount": 21, "shipping_cost": null, "amount_capturable": 0, "amount_received": 21, "connector": "nuvei", "client_secret": "pay_MyZex1y0W8JtlkJ4E8sX_secret_Ih4q9iGVVaUNIM69pSHv", "created": "2025-08-06T16:45:05.230Z", "currency": "EUR", "customer_id": null, "customer": { "id": null, "name": null, "email": "hello@gmail.com", "phone": null, "phone_country_code": null }, "description": "hellow world", "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": "9995", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "2026", "card_holder_name": "John Smith", "payment_checks": { "avs_description": null, "avs_result_code": "", "cvv_2_reply_code": "", "cvv_2_description": null, "merchant_advice_code": "", "merchant_advice_code_description": null }, "authentication_data": { "challengePreferenceReason": "12" } }, "billing": null }, "payment_token": "token_IpZOPBQT3Cr7UWNqtKFT", "shipping": null, "billing": { "address": { "city": "Fasdf", "country": "US", "line1": "Fasdf", "line2": "Fasdf", "line3": null, "zip": "560095", "state": null, "first_name": "Sakil", "last_name": "Mostak", "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://www.google.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": "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": "7110000000016291191", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "7656640111", "payment_link": null, "profile_id": "pro_Lm9uDS83De6QX5EHQNMy", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_BgWz2Uy3MgHlzzgy7W7H", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-06T17:00:05.230Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": 330, "ip_address": "192.168.1.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36", "color_depth": 24, "java_enabled": false, "screen_width": 1920, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "screen_height": 1080, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": "pm_IINXjPD3GBVwSFS5jrNS", "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-06T16:45:23.093Z", "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 }For AVS , cvv and MAC you can check in the above payment resopnses
cargo +nightly fmt --allcargo clippy