Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Pan field when creating Linked account using razorpay-node #404

Open
lovestaco opened this issue Apr 18, 2024 · 0 comments
Open

Comments

@lovestaco
Copy link

lovestaco commented Apr 18, 2024

Steps to reproduce the behavior

export const razorPayInstance = new Razorpay({
	// Replace with your key_id
	key_id: process.env.RAZOR_PAY_KEY_ID!,
	// Replace with your key_secret
	key_secret: process.env.RAZOR_PAY_KEY_SECRET!,
})
const linkedAccBody = {
    "email": "[email protected]",
    "phone": "9620107401",
    "type": "route",
    "legal_business_name": "Antino",
    "business_type": "individual",
    "contact_name": "Antino",
    "profile": {
        "category": "services",
        "subcategory": "automotive_service_shops",
        "addresses": {
            "registered": {
                "street1": "HSR layout",
                "street2": "HSR",
                "city": "Bangalore",
                "state": "KARNATAKA",
                "postal_code": "560041",
                "country": "India"
            }
        },
    },
    "legal_info": {
        "pan": "ETFPM5333C",
        "gst": "18AABCU9603R1ZM"
    }
}
const createLinkedAccRes = await razorPayInstance.accounts.create(linkedAccBody)

Expected behaviour

  1. Expected a linked account to be created and API returning the id.

Actual behaviour

The problem exists both in the Test keys and Live keys.

The problem is we are getting an invalid pan field when giving the original Pan number

{
"code": "BAD_REQUEST_ERROR",
"description": "The pan field is invalid",
"source": "business",
"step": "payment_initiation",
"reason": "input_validation_failed",
"metadata": {},
"field": "pan"
}

Test cases done:

Case 1: Used the test Pan field mentioned in the API docs with Node.js Razorpay Instance.
Result: Works fine

{
"pan": "AAACL1234C",
"gst": "36AAECL6705C1ZS"
}

Case 2: Used the test Pan field mentioned in the API docs with Rest API POST request.
Result: Works fine

{
"pan": "AAACL1234C",
"gst": "36AAECL6705C1ZS"
}

Case 3: Used my real Pan field with Node.js Razorpay Instance.
Result: Pan field invalid

{
"pan": "AGJPY1257C",
"gst": "36AAECL6705C1ZS"
}

Case 4: Used my real Pan field with Rest API POST request.
Result: Pan field invalid

{
"pan": "ETFPM5333C",
"gst": "36AAECL6705C1ZS"
}

Node version

Node v18.18.2

Library version

"razorpay": "^2.9.2"

Additional Information

@razorpay-sanjib @amitrazorpay @KanhaRazorpay @bala-razorpay @ankitdas13

@lovestaco lovestaco changed the title Invalid Pan field when trying to create Linked account using sdk Invalid Pan field when trying to create Linked account using SDK Apr 18, 2024
@lovestaco lovestaco changed the title Invalid Pan field when trying to create Linked account using SDK Invalid Pan field when creating Linked account using SDK Apr 18, 2024
@lovestaco lovestaco changed the title Invalid Pan field when creating Linked account using SDK Invalid Pan field when creating Linked account using Node SDK Apr 18, 2024
@lovestaco lovestaco changed the title Invalid Pan field when creating Linked account using Node SDK Invalid Pan field when creating Linked account using razorpay-node Apr 18, 2024
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

No branches or pull requests

1 participant