Additional parameters for API
-
Hello team
Razorpay has asked us to add additional fields to be passed via API.
The use case falls under the goods flow, you’ll need to pass the line_items parameter while creating the order in order's api.
In order api:
{
"amount": 10000,
"currency": "INR",
"receipt": "receipt#1",
"customer_id": "cust_OwZZseNBf9Uqsi",
"customer_details": {
"name": "Customer name",
"email": "[email protected]",
"contact": "999999999",
"shipping_address": {
"line1": "Mantri apartment",
"line2": "Koramangala",
"city": "Bengaluru",
"country": "IND",
"state": "Karnataka",
"zipcode": "560032",
"latitude": "123123",
"longitude": "1231231"
}
},
"line_items": [
{
"type": "e-commerce",
"name": "TEST",
"e-commerce": {
"other_product_codes": {
"hs_code": "620520"
}
}
}
],
"notes": {
"key2": "value2"
}
}
You can add multiple line items in the same format if required, based on the products involved in the order.
Sample snippet:
"line_items": [
{
"type": "",
"name": "",
"e-commerce": {
"other_product_codes": {
"hs_code": "620520"
}
}
}
{
"type": "",
"name": "",
"e-commerce": {
"other_product_codes": {
"hs_code": "586243"
}
}
}
]hs_code : Can be fetched from Woocommerce Product Tags
e-commerce is a static value
You must be logged in to reply to this topic.