Closed ShipraShalini closed 1 year ago
You need to just add item_id in your JSON.
def create(period, interval, name, amount, description, notes, currency):
client = razorpay.Client(auth=(RAZORPAY_KEY_ID, RAZORPAY_SECRET))
return client.plan.create(
{
"item_id": "YOUR_ITEM_ID",
"period": "weekly",
"interval": 1,
"item": {
"name": "Test plan - Weekly",
"amount": 69900,
"currency": "INR",
"description": "Description for the test plan"
},
"notes": {
"notes_key_1": "Tea, Earl Grey, Hot",
"notes_key_2": "Tea, Earl Grey… decaf."
}
})
checkout this @ShipraShalini
@soheshdoshi Where do I find the item id? When I create a plan on the Razorpay dashboard it creates an item_id by itself same for the curl request. if I pass any random item_id
it says- razorpay.errors.BadRequestError: The id provided does not exist
after passing order_id i am getting the same error The id provided does not exist WHY?
Hey @ShipraShalini - couple of things we can try here.
item_id
, but it's auto generated all we need is to give proper params.
Edit - 3rd method worked fine for me. Tested this from my end and it is working #112 . Closing this issue for now. if you need any help then please let us know
When trying to create a plan, I get the following error:
BadRequestError: The requested URL was not found on the server.
The code snippet:
So I tried to create a plan by directly calling the API using the Postman collections downloaded from the API Reference. I added the auth creds as header, but I still get the same error.
Is there a way to fix this? Am I doing anything wrong?