Skip to content

feat(core): Juspay 3DS Server via Payments API#9433

Merged
likhinbopanna merged 4 commits intomainfrom
juspay3dsserver-fix
Sep 19, 2025
Merged

feat(core): Juspay 3DS Server via Payments API#9433
likhinbopanna merged 4 commits intomainfrom
juspay3dsserver-fix

Conversation

@awasthi21
Copy link
Contributor

@awasthi21 awasthi21 commented Sep 18, 2025

Type of Change

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

Description

Added Support for External Auth( Juspay 3ds Server ) via Payments API

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Testing Video :

Screen.Recording.2025-09-18.at.2.31.48.PM.mov

MCA Create

curl --location 'http://localhost:8080/accounts' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data-raw '{"merchant_id":"postman_merchant_GHAction_885820bf-1cb9-4d9b-8b21-c852aa85b6a4","locker_id":"m0010","merchant_name":"NewAge Retailer","merchant_details":{"primary_contact_person":"John Test","primary_email":"JohnTest@test.com","primary_phone":"sunt laborum","secondary_contact_person":"John Test2","secondary_email":"JohnTest2@test.com","secondary_phone":"cillum do dolor id","website":"www.example.com","about_business":"Online Retail with a wide selection of organic products for North America","address":{"line1":"1467","line2":"Harrison Street","line3":"Harrison Street","city":"San Fransico","state":"California","zip":"94122","country":"US"}},"return_url":"https://duck.com/success","webhook_details":{"webhook_version":"1.0.1","webhook_username":"ekart_retail","webhook_password":"password_ekart@123","payment_created_enabled":true,"payment_succeeded_enabled":true,"payment_failed_enabled":true},"sub_merchants_enabled":false,"metadata":{"city":"NY","unit":"245"},"primary_business_details":[{"country":"US","business":"default"}]}'

Response

{
    "merchant_id": "postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21",
    "merchant_name": "NewAge Retailer",
    "return_url": "https://duck.com/success",
    "enable_payment_response_hash": true,
    "payment_response_hash_key": "XLZG7RyEJ8YdhVxEHwcjUzzY2ZtNqY5yfnYooGcqwpzPuXxnxMWVsVrHraIUsHmu",
    "redirect_to_merchant_with_http_post": false,
    "merchant_details": {
        "primary_contact_person": "John Test",
        "primary_phone": "sunt laborum",
        "primary_email": "JohnTest@test.com",
        "secondary_contact_person": "John Test2",
        "secondary_phone": "cillum do dolor id",
        "secondary_email": "JohnTest2@test.com",
        "website": "www.example.com",
        "about_business": "Online Retail with a wide selection of organic products for North America",
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": null,
            "last_name": null,
            "origin_zip": null
        },
        "merchant_tax_registration_id": null
    },
    "webhook_details": {
        "webhook_version": "1.0.1",
        "webhook_username": "ekart_retail",
        "webhook_password": "password_ekart@123",
        "webhook_url": null,
        "payment_created_enabled": true,
        "payment_succeeded_enabled": true,
        "payment_failed_enabled": true,
        "payment_statuses_enabled": null,
        "refund_statuses_enabled": null,
        "payout_statuses_enabled": null
    },
    "payout_routing_algorithm": null,
    "sub_merchants_enabled": false,
    "parent_merchant_id": null,
    "publishable_key": "pk_dev_b4e1e1d94cb342519cd24bb733dd37d4",
    "metadata": {
        "city": "NY",
        "unit": "245",
        "compatible_connector": null
    },
    "locker_id": "m0010",
    "primary_business_details": [
        {
            "country": "US",
            "business": "default"
        }
    ],
    "frm_routing_algorithm": null,
    "organization_id": "org_g4by1NNhhkA8dEyuYjnc",
    "is_recon_enabled": false,
    "default_profile": "pro_wN2DDFFq3xrWz1xU7efg",
    "recon_status": "not_requested",
    "pm_collect_link_config": null,
    "product_type": "orchestration",
    "merchant_account_type": "standard"
}

MCA - Cybersource

curl --location 'http://localhost:8080/account/postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_g7rE9SY1JQkqi1uMGDZtsGgkN63HNZYH3PwHpe4mkQYsOIRjxPvl9dHgY5NL2nlw' \
--data '{
    "connector_type": "payment_processor",
    "connector_name": "cybersource",
    "connector_label": "cybersourc",
    
    "connector_account_details": {
        "auth_type": "SignatureKey",
        "api_secret": "=",
        "api_key": "",
        "key1": ""
    },
    "metadata": {
        "acquirer_bin": "",
        "acquirer_merchant_id": "",
        "acquirer_country_code":""

    },
    "test_mode": true,
    "disabled": false,
    "payment_methods_enabled": [
        {
            "payment_method": "real_time_payment",
            "payment_method_types": [
                {
                    "payment_method_type": "duit_now",
                    "payment_experience": "display_qr_code",
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                }
            ]
        },
        {
            "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": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "apple_pay",
                    "payment_experience": "redirect_to_url",
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "we_chat_pay",
                    "payment_experience": "redirect_to_url",
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                }
            ]
        },
        {
            "payment_method": "bank_redirect",
            "payment_method_types": [
                {
                    "payment_method_type": "online_banking_fpx",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "giropay",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "sofort",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                }
            ]
        },
        {
            "payment_method": "bank_debit",
            "payment_method_types": [
                {
                    "payment_method_type": "sepa",
                    "payment_experience": "redirect_to_url",
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                }
            ]
        },
        {
            "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": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "klarna",
                    "payment_experience": "redirect_to_url",
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                }
            ]
        },
        {
            "payment_method": "card",
            "payment_method_types": [
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "Mastercard"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "Visa"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "Interac"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "AmericanExpress"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "JCB"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "DinersClub"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "Discover"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "CartesBancaires"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "UnionPay"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "Mastercard"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "Visa"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "Interac"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "AmericanExpress"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "JCB"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "DinersClub"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "Discover"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "CartesBancaires"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "UnionPay"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                }
            ]
        }
    ],
    
    "connector_wallets_details": {
        "google_pay": {
            "provider_details": {
                "merchant_info": {
                    "merchant_id": "valueTBDForProd",
                    "merchant_name": "Test",
                    "tokenization_specification": {
                        "type": "PAYMENT_GATEWAY",
                        "parameters": {
                            "gateway": "cybersource",
                            "public_key": "+",
                            "private_key": "+",
                            "recipient_id": "someRecipient"
                            
                        }
                    }
                }
            },
            "cards": {
                "allowed_auth_methods": [
                    "PAN_ONLY",
                    "CRYPTOGRAM_3DS"
                ],
                "allowed_card_networks": [
                    "AMEX",
                    "DISCOVER",
                    "INTERAC",
                    "JCB",
                    "MASTERCARD",
                    "VISA"
                ]
            }
        }
    },
    "connector_webhook_details": {
        "merchant_secret": "",
        "additional_secret": null
    }
}'

Response

{
    "connector_type": "payment_processor",
    "connector_name": "cybersource",
    "connector_label": "cybersource_AU_defa",
    "merchant_connector_id": "mca_rdmYF3bG2r0wu8zvOxHM",
    "profile_id": "pro_wN2DDFFq3xrWz1xU7efg",
    "connector_account_details": {
        "auth_type": "SignatureKey",
        "api_key": "d0********************************4c",
        "key1": "ju*************ox",
        "api_secret": "rK****************************************k="
    },
    "payment_methods_enabled": [
        {
            "payment_method": "real_time_payment",
            "payment_method_types": [
                {
                    "payment_method_type": "duit_now",
                    "payment_experience": "display_qr_code",
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                }
            ]
        },
        {
            "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": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "apple_pay",
                    "payment_experience": "redirect_to_url",
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "we_chat_pay",
                    "payment_experience": "redirect_to_url",
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                }
            ]
        },
        {
            "payment_method": "bank_redirect",
            "payment_method_types": [
                {
                    "payment_method_type": "online_banking_fpx",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "giropay",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "sofort",
                    "payment_experience": null,
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                }
            ]
        },
        {
            "payment_method": "bank_debit",
            "payment_method_types": [
                {
                    "payment_method_type": "sepa",
                    "payment_experience": "redirect_to_url",
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                }
            ]
        },
        {
            "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": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "klarna",
                    "payment_experience": "redirect_to_url",
                    "card_networks": null,
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                }
            ]
        },
        {
            "payment_method": "card",
            "payment_method_types": [
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "Mastercard"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "Visa"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "Interac"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "AmericanExpress"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "JCB"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "DinersClub"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "Discover"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "CartesBancaires"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "debit",
                    "payment_experience": null,
                    "card_networks": [
                        "UnionPay"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "Mastercard"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "Visa"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "Interac"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "AmericanExpress"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "JCB"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "DinersClub"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "Discover"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "CartesBancaires"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                },
                {
                    "payment_method_type": "credit",
                    "payment_experience": null,
                    "card_networks": [
                        "UnionPay"
                    ],
                    "accepted_currencies": null,
                    "accepted_countries": null,
                    "minimum_amount": 0,
                    "maximum_amount": 68607706,
                    "recurring_enabled": true,
                    "installment_payment_enabled": false
                }
            ]
        }
    ],
    "connector_webhook_details": {
        "merchant_secret": "ee148db14b97d503ab5958e7abb5c374",
        "additional_secret": null
    },
    "metadata": {
        "acquirer_bin": "438309",
        "acquirer_merchant_id": "00002000000",
        "acquirer_country_code": "840"
    },
    "test_mode": true,
    "disabled": false,
    "frm_configs": null,
    "business_country": null,
    "business_label": null,
    "business_sub_label": null,
    "applepay_verified_domains": null,
    "pm_auth_config": null,
    "status": "active",
    "additional_merchant_data": null,
    "connector_wallets_details": {
        "google_pay": {
            "provider_details": {
                "merchant_info": {
                    "merchant_id": "",
                    "merchant_name": "",
                    "tokenization_specification": {
                        "type": "PAYMENT_GATEWAY",
                        "parameters": {
                            "gateway": "cybersource",
                            "public_key": "+/=",
                            "private_key": "+",
                            "recipient_id": "someRecipient"
                        }
                    }
                }
            },
            "cards": {
                "allowed_auth_methods": [
                    "PAN_ONLY",
                    "CRYPTOGRAM_3DS"
                ],
                "allowed_card_networks": [
                    "AMEX",
                    "DISCOVER",
                    "INTERAC",
                    "JCB",
                    "MASTERCARD",
                    "VISA"
                ]
            }
        }
    }
}

MCA - Juspay 3ds Server

curl --location 'http://localhost:8080/account/postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key:' \
--data '{
    "connector_type": "authentication_processor",
    "connector_name": "juspaythreedsserver",
    "connector_account_details": {
        "auth_type": "NoKey"
    },
    
    
    
    
    
    "test_mode": true,
    "disabled": false,
    "metadata": {
        "merchant_category_code": "5411",
        "merchant_country_code": "840",
        "merchant_name": "Dummy Merchant",
        "endpoint_prefix": "weew",
        "three_ds_requestor_name": "juspay-prev",
        "three_ds_requestor_id": "juspay-prev",
        "pull_mechanism_for_external_3ds_enabled": true,
        "acquirer_bin": "",
        "acquirer_merchant_id": "",
        "acquirer_country_code": "356"
    }
}'

Response

{
    "connector_type": "authentication_processor",
    "connector_name": "juspaythreedsserver",
    "connector_label": "juspaythreedsserver_US_default",
    "merchant_connector_id": "mca_VwUEB4zwQCl3YiFw2r2W",
    "profile_id": "pro_wN2DDFFq3xrWz1xU7efg",
    "connector_account_details": {
        "auth_type": "NoKey"
    },
    "payment_methods_enabled": null,
    "connector_webhook_details": null,
    "metadata": {
        "acquirer_bin": "400000",
        "merchant_name": "Dummy Merchant",
        "endpoint_prefix": "",
        "acquirer_merchant_id": "00002000000",
        "acquirer_country_code": "356",
        "merchant_country_code": "840",
        "three_ds_requestor_id": "-prev",
        "merchant_category_code": "5411",
        "three_ds_requestor_name": "juspay-",
        "pull_mechanism_for_external_3ds_enabled": true
    },
    "test_mode": true,
    "disabled": false,
    "frm_configs": null,
    "business_country": null,
    "business_label": null,
    "business_sub_label": null,
    "applepay_verified_domains": null,
    "pm_auth_config": null,
    "status": "active",
    "additional_merchant_data": null,
    "connector_wallets_details": null
}

Enable Config:

curl --location 'http://localhost:8080/configs/' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin' \
--data '{
    "key": "merchants_eligible_for_authentication_service",
    "value": "[\"postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21\", \"sahkal11\"]"
}'

Response

{
    "key": "merchants_eligible_for_authentication_service",
    "value": "[\"postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21\", \"sahkal11\"]"
}

Add Juspay 3ds as External 3DS Authenticator

curl --location --globoff 'localhost:8080/account/postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21/business_profile/{{profile_id}}' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_g7rE9SY1JQkqi1uMGDZtsGgkN63HNZYH3PwHpe4mkQYsOIRjxPvl9dHgY5NL2nlw' \
--data '{
    "is_click_to_pay_enabled": true,
    "authentication_product_ids": {"click_to_pay": "mca_OqBRdcToAauJFZ08i9iI"},
    "authentication_connector_details": {
        "authentication_connectors": ["juspaythreedsserver"],
        "three_ds_requestor_url": "https://google.com"
    },
    "merchant_country_code": "004",
    "merchant_category_code": "5411"
}

'

Response

{
    "merchant_id": "postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21",
    "profile_id": "pro_wN2DDFFq3xrWz1xU7efg",
    "profile_name": "US_default",
    "return_url": "https://duck.com/success",
    "enable_payment_response_hash": true,
    "payment_response_hash_key": "XLZG7RyEJ8YdhVxEHwcjUzzY2ZtNqY5yfnYooGcqwpzPuXxnxMWVsVrHraIUsHmu",
    "redirect_to_merchant_with_http_post": false,
    "webhook_details": {
        "webhook_version": "1.0.1",
        "webhook_username": "ekart_retail",
        "webhook_password": "password_ekart@123",
        "webhook_url": null,
        "payment_created_enabled": true,
        "payment_succeeded_enabled": true,
        "payment_failed_enabled": true,
        "payment_statuses_enabled": null,
        "refund_statuses_enabled": null,
        "payout_statuses_enabled": null
    },
    "metadata": null,
    "routing_algorithm": null,
    "intent_fulfillment_time": 900,
    "frm_routing_algorithm": null,
    "payout_routing_algorithm": null,
    "applepay_verified_domains": null,
    "session_expiry": 900,
    "payment_link_config": null,
    "authentication_connector_details": {
        "authentication_connectors": [
            "juspaythreedsserver"
        ],
        "three_ds_requestor_url": "https://google.com",
        "three_ds_requestor_app_url": null
    },
    "use_billing_as_payment_method_billing": true,
    "extended_card_info_config": null,
    "collect_shipping_details_from_wallet_connector": false,
    "collect_billing_details_from_wallet_connector": false,
    "always_collect_shipping_details_from_wallet_connector": false,
    "always_collect_billing_details_from_wallet_connector": false,
    "is_connector_agnostic_mit_enabled": false,
    "payout_link_config": null,
    "outgoing_webhook_custom_http_headers": null,
    "tax_connector_id": null,
    "is_tax_connector_enabled": false,
    "is_network_tokenization_enabled": false,
    "is_auto_retries_enabled": false,
    "max_auto_retries_enabled": null,
    "always_request_extended_authorization": null,
    "is_click_to_pay_enabled": true,
    "authentication_product_ids": {
        "click_to_pay": "mca_OqBRdcToAauJFZ08i9iI"
    },
    "card_testing_guard_config": {
        "card_ip_blocking_status": "disabled",
        "card_ip_blocking_threshold": 3,
        "guest_user_card_blocking_status": "disabled",
        "guest_user_card_blocking_threshold": 10,
        "customer_id_blocking_status": "disabled",
        "customer_id_blocking_threshold": 5,
        "card_testing_guard_expiry": 3600
    },
    "is_clear_pan_retries_enabled": false,
    "force_3ds_challenge": false,
    "is_debit_routing_enabled": false,
    "merchant_business_country": null,
    "is_pre_network_tokenization_enabled": false,
    "acquirer_configs": null,
    "is_iframe_redirection_enabled": null,
    "merchant_category_code": "5411",
    "merchant_country_code": "004",
    "dispute_polling_interval": null,
    "is_manual_retry_enabled": null,
    "always_enable_overcapture": null
}

Payments Create:

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_g7rE9SY1JQkqi1uMGDZtsGgkN63HNZYH3PwHpe4mkQYsOIRjxPvl9dHgY5NL2nlw' \
--data-raw '{
    "amount": 6540,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "customer_id": "BamboraCustomer",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "three_ds",
    "return_url": "https://google.com",
    "request_external_three_ds_authentication":true,
    "payment_method": "card",
    "payment_method_type": "debit",
    "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"
    },
    "payment_method_data": {
        "card": {
            "card_number": "4622943127013705",
            "card_exp_month": "06",
            "card_exp_year": "31",
            "card_holder_name": "joseph Doe",
            "card_cvc": "838"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "setup_future_usage": "off_session"
}'

Response

{
    "payment_id": "pay_yyRFNGg7kADdi6l0g3fj",
    "merchant_id": "postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21",
    "status": "requires_customer_action",
    "amount": 6540,
    "net_amount": 6540,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": null,
    "connector": "cybersource",
    "client_secret": "pay_yyRFNGg7kADdi6l0g3fj_secret_iYxjs9NiG6dekXkQdty9",
    "created": "2025-09-17T12:40:49.467Z",
    "currency": "USD",
    "customer_id": "BamboraCustomer",
    "customer": {
        "id": "BamboraCustomer",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+1"
    },
    "description": "Its my first payment request",
    "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": "3705",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "462294",
            "card_extended_bin": null,
            "card_exp_month": "06",
            "card_exp_year": "31",
            "card_holder_name": "joseph Doe",
            "payment_checks": null,
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": "token_xIdZQPeCWkTQEXFU7zxc",
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "order_details": null,
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://google.com/",
    "authentication_type": "three_ds",
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "next_action": {
        "type": "three_ds_invoke",
        "three_ds_data": {
            "three_ds_authentication_url": "http://localhost:8080/payments/pay_yyRFNGg7kADdi6l0g3fj/3ds/authentication",
            "three_ds_authorize_url": "https://93a6a1e56b62.ngrok-free.app/payments/pay_yyRFNGg7kADdi6l0g3fj/postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21/authorize/cybersource",
            "three_ds_method_details": {
                "three_ds_method_key": "threeDSMethodData",
                "three_ds_method_data_submission": false,
                "three_ds_method_data": null,
                "three_ds_method_url": null
            },
            "poll_config": {
                "poll_id": "external_authentication_pay_yyRFNGg7kADdi6l0g3fj",
                "delay_in_secs": 2,
                "frequency": 5
            },
            "message_version": "2.2.0",
            "directory_server_id": null
        }
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "debit",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "BamboraCustomer",
        "created_at": 1758112849,
        "expires": 1758116449,
        "secret": "epk_6f1ca90c360b4a268d0e0457c26426b9"
    },
    "manual_retry_allowed": null,
    "connector_transaction_id": null,
    "frm_message": null,
    "metadata": {
        "udf1": "value1",
        "login_date": "2019-09-10T10:11:12Z",
        "new_customer": "true"
    },
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_wN2DDFFq3xrWz1xU7efg",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_rdmYF3bG2r0wu8zvOxHM",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": {
        "authentication_flow": null,
        "electronic_commerce_indicator": null,
        "status": "pending",
        "ds_transaction_id": "fc237cd5-09a1-45d3-ad79-215b0d9ab005",
        "version": "2.2.0",
        "error_code": null,
        "error_message": null
    },
    "external_3ds_authentication_attempted": true,
    "expires_on": "2025-09-17T12:55:49.467Z",
    "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": null,
    "payment_method_status": null,
    "updated": "2025-09-17T12:40:50.022Z",
    "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,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null
}

Auth Call

curl --location 'https://93a6a1e56b62.ngrok-free.app/payments/pay_yyRFNGg7kADdi6l0g3fj/3ds/authentication' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_b4e1e1d94cb342519cd24bb733dd37d4' \
--data '{
    "client_secret": "pay_yyRFNGg7kADdi6l0g3fj_secret_iYxjs9NiG6dekXkQdty9",
    "device_channel": "BRW",
    "threeds_method_comp_ind": "N"
}'

Response

{
    "trans_status": "C",
    "acs_url": "https://mock-three-ds-server-small-lake-1937.fly.dev/processor/mock/acs/trigger-otp?redirectUrl=https%3A%2F%2F93a6a1e56b62.ngrok-free.app%2Fpayments%2Fpay_yyRFNGg7kADdi6l0g3fj%2Fpostman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21%2Fauthorize%2Fcybersource",
    "challenge_request": "eyJtZXNzYWdlVHlwZSI6IkNSZXEiLCJ0aHJlZURTU2VydmVyVHJhbnNJRCI6ImZjMjM3Y2Q1LTA5YTEtNDVkMy1hZDc5LTIxNWIwZDlhYjAwNSIsImFjc1RyYW5zSUQiOiIwMzZjY2EyYi02YTg2LTQ4N2UtODI1NS0zYmJlMmRiNDBiOGYiLCJjaGFsbGVuZ2VXaW5kb3dTaXplIjoiMDEiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMi4wIn0=",
    "acs_reference_number": "036cca2b-6a86-487e-8255-3bbe2db40b8f",
    "acs_trans_id": "036cca2b-6a86-487e-8255-3bbe2db40b8f",
    "three_dsserver_trans_id": "fc237cd5-09a1-45d3-ad79-215b0d9ab005",
    "acs_signed_content": null,
    "three_ds_requestor_url": "https://google.com",
    "three_ds_requestor_app_url": null
}

Mock Server Call

curl --location 'https://mock-three-ds-server-small-lake-1937.fly.dev/processor/mock/acs/trigger-otp?redirectUrl=https%3A%2F%2F93a6a1e56b62.ngrok-free.app%2Fpayments%2Fpay_yyRFNGg7kADdi6l0g3fj%2Fpostman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21%2Fauthorize%2Fcybersource' \
--header 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
--header 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'cache-control: no-cache' \
--header 'content-type: application/x-www-form-urlencoded' \
--header 'origin: https://juspay-3ds-sdk.netlify.app' \
--header 'pragma: no-cache' \
--header 'priority: u=0, i' \
--header 'referer: https://juspay-3ds-sdk.netlify.app/' \
--header 'sec-ch-ua: "Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "macOS"' \
--header 'sec-fetch-dest: iframe' \
--header 'sec-fetch-mode: navigate' \
--header 'sec-fetch-site: cross-site' \
--header 'sec-fetch-storage-access: active' \
--header 'upgrade-insecure-requests: 1' \
--header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36' \
--header 'api-key: dev_g7rE9SY1JQkqi1uMGDZtsGgkN63HNZYH3PwHpe4mkQYsOIRjxPvl9dHgY5NL2nlw' \
--data-urlencode 'creq={"messageType":"CReq","threeDSServerTransID":"fc237cd5-09a1-45d3-ad79-215b0d9ab005","acsTransID":"036cca2b-6a86-487e-8255-3bbe2db40b8f","challengeWindowSize":"01","messageVersion":"2.2.0"}'

Response
Screenshot 2025-09-18 at 1 23 52 PM

Psync Response

{
    "payment_id": "pay_yyRFNGg7kADdi6l0g3fj",
    "merchant_id": "postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21",
    "status": "succeeded",
    "amount": 6540,
    "net_amount": 6540,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 6540,
    "connector": "cybersource",
    "client_secret": "pay_yyRFNGg7kADdi6l0g3fj_secret_iYxjs9NiG6dekXkQdty9",
    "created": "2025-09-17T12:40:49.467Z",
    "currency": "USD",
    "customer_id": "BamboraCustomer",
    "customer": {
        "id": "BamboraCustomer",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+1"
    },
    "description": "Its my first payment request",
    "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": "3705",
            "card_type": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "462294",
            "card_extended_bin": null,
            "card_exp_month": "06",
            "card_exp_year": "31",
            "card_holder_name": "joseph Doe",
            "payment_checks": {
                "avs_response": {
                    "code": "Y",
                    "codeRaw": "Y"
                },
                "card_verification": {
                    "resultCode": "M",
                    "resultCodeRaw": "M"
                }
            },
            "authentication_data": null
        },
        "billing": null
    },
    "payment_token": "token_xIdZQPeCWkTQEXFU7zxc",
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe",
            "origin_zip": null
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": null
    },
    "order_details": null,
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://google.com/",
    "authentication_type": "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": "debit",
    "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": "7581129668626524704805",
    "frm_message": null,
    "metadata": {
        "udf1": "value1",
        "login_date": "2019-09-10T10:11:12Z",
        "new_customer": "true"
    },
    "connector_metadata": null,
    "feature_metadata": {
        "redirect_response": {
            "param": "",
            "json_payload": {}
        },
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "gateway_system": "direct"
    },
    "reference_id": "pay_yyRFNGg7kADdi6l0g3fj_1",
    "payment_link": null,
    "profile_id": "pro_wN2DDFFq3xrWz1xU7efg",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_rdmYF3bG2r0wu8zvOxHM",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": {
        "authentication_flow": "challenge",
        "electronic_commerce_indicator": "02",
        "status": "success",
        "ds_transaction_id": "fc237cd5-09a1-45d3-ad79-215b0d9ab005",
        "version": "2.2.0",
        "error_code": null,
        "error_message": null
    },
    "external_3ds_authentication_attempted": true,
    "expires_on": "2025-09-17T12:55:49.467Z",
    "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": "016153570198200",
    "payment_method_status": null,
    "updated": "2025-09-17T12:42:47.491Z",
    "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,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": 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

@awasthi21 awasthi21 self-assigned this Sep 18, 2025
@awasthi21 awasthi21 requested review from a team as code owners September 18, 2025 08:00
@semanticdiff-com
Copy link

semanticdiff-com bot commented Sep 18, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/routes/app.rs  75% smaller
  crates/router/src/core/payments/operations/payment_confirm.rs  37% smaller

@awasthi21 awasthi21 changed the title feat(core):Juspay 3DS Server via Pyaments API feat(core): Juspay 3DS Server via Pyaments API Sep 18, 2025
Comment on lines +571 to +574
payment_method_id: token
.as_ref()
.map(|t| format!("eph_{t}"))
.unwrap_or_default(),
Copy link
Contributor

Choose a reason for hiding this comment

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

we dont need this change right!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not required . Removed

sahkal
sahkal previously approved these changes Sep 18, 2025
})
})
.transpose()
.change_context(errors::ApiErrorResponse::InternalServerError)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

use attach_printable, explicit logger isn't required

@sai-harsha-vardhan sai-harsha-vardhan changed the title feat(core): Juspay 3DS Server via Pyaments API feat(core): Juspay 3DS Server via Payments API Sep 18, 2025
sahkal
sahkal previously approved these changes Sep 18, 2025
@awasthi21 awasthi21 dismissed stale reviews from sahkal and sai-harsha-vardhan via 1dfbedb September 18, 2025 13:29
@likhinbopanna likhinbopanna added this pull request to the merge queue Sep 19, 2025
Merged via the queue into main with commit f906847 Sep 19, 2025
21 of 25 checks passed
@likhinbopanna likhinbopanna deleted the juspay3dsserver-fix branch September 19, 2025 07:37
pixincreate added a commit that referenced this pull request Sep 23, 2025
…aysafe-apple-pay

* 'main' of github.com:juspay/hyperswitch:
  feat(connector): [Tokenex] add template code (#9416)
  fix(webhooks): add idempotent_event_id generation using URL-safe Base64 (no padding) and SHA256 digest (#9405)
  feat(core): add webhook setup event handler (#9420)
  chore(version): 2025.09.22.0
  fix(connectors): [Nexixpay] send cvv in nexixpay requests (#9459)
  feat(router): add flag to wait for post message in `threeDSMethodData` for `three_ds_invoke` next action in Payments Confirm (#9454)
  feat(connector): [Paysafe] add wasm changes (#9455)
  feat: Implement subscription create for Chargebee (#9303)
  fix(connector): [CYBERSOURCE] Pass transaction type for only wallet MITs (#9444)
  feat(Connector): [checkout] l2l3 data  (#9446)
  feat(nuvei): applepay decrypt at hyperswitch flow (#9431)
  fix(connectors): [Nuvei] payments, refunds and chargeback webhooks (#9378)
  fix(connector): [ADYEN] Add fallback parsing for refusal codes and messages (#9361)
  feat(connector): Add support for get plan prices for Chargebee (#9300)
  feat(core): Juspay 3DS Server via Payments API (#9433)
  fix(core): Add Validation Check for Amount in Capture Flow (#9434)
  chore(version): 2025.09.19.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants