cURL using web need help

Anyone can guide me to use this cURL in web

curl --request POST
–url https://sandbox.cashfree.com/pg/links
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–header ‘x-api-version: 2022-01-01’
–data ’
{
“link_amount”: 100,
“link_currency”: “INR”,
“link_minimum_partial_amount”: 20,
“link_id”: “my_link_id”,
“link_partial_payments”: true,
“customer_details”: {
“customer_name”: “John Doe”,
“customer_phone”: “9999999999”,
“customer_email”: “[email protected]
},
“link_expiry_time”: “2021-10-14T15:04:05+05:30”,
“link_purpose”: “Payment for PlayStation 11”,
“link_notify”: {
“send_sms”: false,
“send_email”: true
},
“link_auto_reminders”: true,
“link_notes”: {
“key_1”: “value_1”,
“key_2”: “value_2”
},
“link_meta”: {
“notify_url”: “https://ee08e626ecd88c61c85f5c69c0418cb5.m.pipedream.net”,
“upi_intent”: false,
“return_url”: “https://b8af79f41056.eu.ngrok.io?link_id={link_id}
}
}

1 Like

OK i tested your curl it had few problems so use this -

curl --request POST 'https://sandbox.cashfree.com/pg/links' --header 'Accept: application/json'
--header 'Content-Type: application/json'
--header 'x-api-version: 2022-01-01'
--data '
{
"link_amount": 100,
"link_currency": "INR",
"link_minimum_partial_amount": 20,
"link_id": "my_link_id",
"link_partial_payments": true,
"customer_details": {
"customer_name": "John Doe",
"customer_phone": "9999999999",
"customer_email": "[email protected]"
},
"link_expiry_time": "2021-10-14T15:04:05+05:30",
"link_purpose": "Payment for PlayStation 11",
"link_notify": {
"send_sms": false,
"send_email": true
},
"link_auto_reminders": true,
"link_notes": {
"key_1": "value_1",
"key_2": "value_2"
},
"link_meta": {
"notify_url": "https://ee08e626ecd88c61c85f5c69c0418cb5.m.pipedream.net",
"upi_intent": false,
"return_url": "https://b8af79f41056.eu.ngrok.io?link_id={link_id}"
}
}
'

And the blocks generated are -

3 Likes

thanks, its working :heart_eyes:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.