fix(nuvei): For NTID/proxy flow is_rebilling should always be sent 1 & pass customer_details in proxy flow + Add US as supported countries for GOOGLEPAY#9738
Conversation
Changed Files
|
is_rebilling should always be sent 1 & pass customer_details in proxy flow
crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs
Outdated
Show resolved
Hide resolved
| } else { | ||
| None | ||
| }; | ||
| let is_rebilling = Some("1".to_string()); |
There was a problem hiding this comment.
Should we have is_rebilling as enum so that we can pass the numeric values from constants?
Also please add a comment on what does "1" indicate ?
| eps = { country = "AU,CA,GB,IN,JP,NZ,PH,SG,TH,US",currency = "AED,ALL,AMD,ARS,AUD,AZN,BAM,BDT,BGN,BHD,BMD,BND,BRL,BYN,CAD,CHF,CLP,CNY,COP,CRC,CZK,DKK,DOP,DZD,EGP,EUR,GBP,GEL,GHS,GTQ,HKD,HUF,IDR,INR,IQD,ISK,JOD,JPY,KES,KGS,KRW,KWD,KYD,KZT,LBP,LKR,MAD,MDL,MKD,MMK,MNT,MUR,MWK,MXN,MYR,MZN,NAD,NGN,NOK,NZD,OMR,PEN,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,SAR,SEK,SGD,SOS,THB,TND,TOP,TRY,TTD,TWD,UAH,UGX,USD,UYU,UZS,VND,XAF,XOF,YER,ZAR" } | ||
| apple_pay = { country = "AU,AT,BY,BE,BR,BG,CA,CN,HR,CY,CZ,DK,EE,FO,FI,FR,GE,DE,GR,GL,GG,HK,HU,IS,IE,IM,IL,IT,JP,JE,KZ,LV,LI,LT,LU,MO,MT,MC,NL,NZ,NO,PL,PT,RO,RU,SM,SA,SG,SK,SI,ES,SE,CH,TW,UA,AE,GB,US,VA",currency = "AED,ALL,AMD,ARS,AUD,AZN,BAM,BDT,BGN,BHD,BMD,BND,BRL,BYN,CAD,CHF,CLP,CNY,COP,CRC,CZK,DKK,DOP,DZD,EGP,EUR,GBP,GEL,GHS,GTQ,HKD,HUF,IDR,INR,IQD,ISK,JOD,JPY,KES,KGS,KRW,KWD,KYD,KZ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,ALL,AMD,ARS,AUD,AZN,BAM,BDT,BGN,BHD,BMD,BND,BRL,BYN,CAD,CHF,CLP,CNY,COP,CRC,CZK,DKK,DOP,DZD,EGP,EUR,GBP,GEL,GHS,GTQ,HKD,HUF,IDR,INR,IQD,ISK,JOD,JPY,KES,KGS,KRW,KWD,KYD,KZT,LBP,LKR,MAD,MDL,MKD,MMK,MNT,MUR,MWK,MXN,MYR,MZN,NAD,NGN,NOK,NZD,OMR,PEN,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,SAR,SEK,SGD,SOS,THB,TND,TOP,TRY,TTD,TWD,UAH,UGX,USD,UYU,UZS,VND,XAF,XOF,YER,ZAR" } |
There was a problem hiding this comment.
This is from the PR description:
Add US as supported country for GOOGLEPAY, even though it's not listed as a supported country in the documentation
If the US is not among the supported countries, why are we adding it to the config?
If this is intended for testing purposes, it should not be added to production.toml, correct?
Also, the PR title does not reflect this environment change — please update it accordingly.
There was a problem hiding this comment.
US was removed recently, but connector doesn't throw any error if we pass US. US is explicitly added to support standard countries for RECURLY as per product decision. We are raising the query for the same for nuvei team.
There was a problem hiding this comment.
I feel until we don't get the confirm from nuvei team regarding this, we should not have US atleast as part of production envs.
is_rebilling should always be sent 1 & pass customer_details in proxy flowis_rebilling should always be sent 1 & pass customer_details in proxy flow + Add US as supported countries for GOOGLEPAY
Applied suggestion Co-authored-by: Shankar Singh C <83439957+ShankarSinghC@users.noreply.github.com>
…1 & pass customer_details in proxy flow + Add US as supported countries for GOOGLEPAY (#9738) Co-authored-by: Shankar Singh C <83439957+ShankarSinghC@users.noreply.github.com>
…1 & pass customer_details in proxy flow + Add US as supported countries for GOOGLEPAY (juspay#9738) Co-authored-by: Shankar Singh C <83439957+ShankarSinghC@users.noreply.github.com>
…1 & pass customer_details in proxy flow + Add US as supported countries for GOOGLEPAY (#9738) Co-authored-by: Shankar Singh C <83439957+ShankarSinghC@users.noreply.github.com>
Type of Change
Description
is_rebillingshould be sent as1always forNTIDflow in Nuvei.router_datafrom core.REQUEST
{ "amount": 10023, "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" } }, "setup_future_usage": "off_session", "customer_id": "nithxxinn", "return_url": "https://www.google.com", "capture_method": "automatic", "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": "card", "payment_method_type": "credit", "off_session": true, "recurring_details": { "type": "network_transaction_id_and_card_details", "data": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "2030", "card_network":"VISA", "network_transaction_id": "01615070********" } } }RESPONSE :
{ "payment_id": "pay_LkaUU5hsgNIRtS3dNJ7Y", "merchant_id": "merchant_1760007762", "status": "succeeded", "amount": 10023, "net_amount": 10023, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10023, "connector": "nuvei", "client_secret": "pay_LkaUU5hsgNIRtS3dNJ7Y_secret_SnY5seciR0qmDoTyLD3Z", "created": "2025-10-10T07:39:13.663Z", "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": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "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": { "customer_id": "nithxxinn", "created_at": 1760081953, "expires": 1760085553, "secret": "epk_84b79b41787640c780ec0ffbc06d61e2" }, "manual_retry_allowed": null, "connector_transaction_id": "7110000000018185783", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "9599777111", "payment_link": null, "profile_id": "pro_D59PF6bunaFycoeexf3v", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_dBUZgHuGCA5UOuipcycK", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-10-10T07:54:13.663Z", "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": null, "network_transaction_id": "", "payment_method_status": null, "updated": "2025-10-10T07:39:16.176Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "request_extended_authorization": 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, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null, "is_stored_credential": true, "mit_category": null }Connector request
Non Mandate request
{ "amount": 30000, "capture_method": "automatic", "currency": "AED", "confirm": true, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "127.0.0.1", "user_agent": "amet irure esse" } }, "connector": [ "nuvei" ], "customer_id": "nidthxxinn", "return_url": "https://www.google.com", "payment_method": "card", "payment_method_type": "credit", "billing": { "address": { "zip": "560095", "country": "AT", "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": "4531739335817394", "card_exp_month": "01", "card_exp_year": "2026", "card_holder_name": "John Smith", "card_cvc": "100" } } }RESPONSE
Additional Changes
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --allcargo clippy