razorpay / razorpay-node

Razorpay node.js bindings
MIT License
182 stars 111 forks source link

Not able to create Item from sdk. #256

Closed shailesh87 closed 2 years ago

shailesh87 commented 2 years ago

Hi Mate,

when I want to create Item from sdk using-

`var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })

instance.Items.create({ "name": "Book / English August", "description": "An indian story, Booker prize winner.", "amount": 20000, "currency": "INR" });`

it will not work throw error - name is not required.

{ "statusCode": 400, "error": { "code": "BAD_REQUEST_ERROR", "description": "The name field is required.", "source": "business", "step": "payment_initiation", "reason": "input_validation_failed", "metadata": {}, "field": "name" } }

Please any one hel regarding this issue.

Thanks

ankitdas13 commented 2 years ago

Hi @shailesh87 sorry for the delay could you please use this snippet code ? instance.items.create({ "name": "Book / English August", "description": "An indian story, Booker prize winner.", "amount": 20000, "currency": "INR" })

let us know if you need any help

ankitdas13 commented 2 years ago

Closing this ticket for now. If the issue persists, please reopen.