Skip to content

feat(core): add referer field to browser_info#9474

Merged
likhinbopanna merged 5 commits intomainfrom
browser-info-referer
Sep 24, 2025
Merged

feat(core): add referer field to browser_info#9474
likhinbopanna merged 5 commits intomainfrom
browser-info-referer

Conversation

@Aishwariyaa-Anand
Copy link
Contributor

Type of Change

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

Description

This PR adds a referer field to the BrowserInformation struct to capture the HTTP Referer header value from client requests.

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?

Enable UCS

curl --location 'http://localhost:8080/v2/configs/' \
--header 'Authorization: admin-api-key=test_admin' \
--header 'x-tenant-id: public' \
--header 'Content-Type: application/json' \
--data '{
    "key": "ucs_rollout_config_cloth_seller_Zoo9KadtslxR8ICC7dB6_razorpay_upi_Authorize",
    "value": "1.0"
}'

Create payment

curl --location 'http://localhost:8080/v2/payments' \
--header 'Content-Type: application/json' \
--header 'x-profile-id: pro_zjXchnTKtjXfUfQ9FJEL' \
--header 'X-Merchant-Id: cloth_seller_Zoo9KadtslxR8ICC7dB6' \
--header 'x-tenant-id: public' \
--data-raw '{
    "amount_details": {
        "order_amount": 100,
        "currency": "INR"
    },
    "merchant_connector_details": {
        "connector_name": "razorpay",
        "merchant_connector_creds": {
            "auth_type": "BodyKey",
            "api_key": "_",
            "key1": "_"
        }
    },
    "return_url": "https://api-ns2.juspay.in/v2/pay/response/irctc",
    "merchant_reference_id": "razorpayirctc1758535732",
    "capture_method":"automatic",
    "payment_method_data": {
        "upi": {
            "upi_collect": {
                "vpa_id": "success@razorpay"
            }
        },
        "billing": {
            "address": {
                "line1": "1467",
                "line2": "Harrison Street",
                "line3": "Harrison Street",
                "city": "San Fransico",
                "state": "California",
                "zip": "94122",
                "country": "IN",
                "first_name": "Swangi",
                "last_name": "Kumari"
            },
            "phone": {
                "number": "8056594427",
                "country_code": "+91"
            },
            "email": "swangi.kumari@juspay.in"
        }
    },
    "browser_info": {
        "user_agent": "Dalvik/2.1.0",
        "referer": "abcd.com",
        "ip_address": "157.51.3.204"
    },
    "payment_method_subtype": "upi_collect",
    "payment_method_type": "upi",
    "return_raw_connector_response": true
}'

Verify UCS call to connector
image

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

@Aishwariyaa-Anand Aishwariyaa-Anand self-assigned this Sep 22, 2025
@Aishwariyaa-Anand Aishwariyaa-Anand requested review from a team as code owners September 22, 2025 10:12
@Aishwariyaa-Anand Aishwariyaa-Anand added the A-core Area: Core flows label Sep 22, 2025
@semanticdiff-com
Copy link

semanticdiff-com bot commented Sep 22, 2025

@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Sep 22, 2025
@Aishwariyaa-Anand Aishwariyaa-Anand linked an issue Sep 22, 2025 that may be closed by this pull request
hrithikesh026
hrithikesh026 previously approved these changes Sep 23, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Sep 24, 2025
Merged via the queue into main with commit 46d483d Sep 24, 2025
21 of 25 checks passed
@likhinbopanna likhinbopanna deleted the browser-info-referer branch September 24, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-core Area: Core flows M-api-contract-changes Metadata: This PR involves API contract changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] add referer field to browser_info

4 participants