Curl PHP Node.JS Python Go Response
Copy curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
-X POST https://api.razorpay.com/v1/payment_links/ \
-H 'Content-type: application/json' \
-d '{
"amount": 1000,
"currency": "INR",
"accept_partial": true,
"first_min_partial_amount": 100,
"reference_id": "#425",
"description": "Payment for policy no #23456",
"customer": {
"name": "Gaurav Kumar",
"contact": "+919999999999",
"email": "gaurav.kumar@example.com"
},
"notify": {
"sms": true,
"email": true
},
"reminder_enable": false
}'
Copy $api = new Api($key_id , $secret );
$api ->paymentLink->create(array ('amount' =>500 , 'currency' =>'INR' , 'accept_partial' =>true , 'first_min_partial_amount' =>100 , 'description' => 'For XYZ purpose' , 'customer' => array ('name' =>'Gaurav Kumar' , 'email' => 'gaurav.kumar@example.com' , 'contact' =>'+919999999999' ), 'notify' =>array ('sms' =>true , 'email' =>true ) ,'reminder_enable' =>false ));
Copy var instance = new Razorpay ({ key_id : 'YOUR_KEY_ID' , key_secret : 'YOUR_SECRET' })
instance.paymentLink .create ({
amount : 1000 ,
currency : "INR" ,
accept_partial : true ,
first_min_partial_amount : 100 ,
reference_id : "#425" ,
description : "Payment for policy no #23456" ,
customer : {
name : "Gaurav Kumar" ,
contact : 919999999999 ,
email : "gaurav.kumar@example.com"
},
notify : {
sms : true ,
email : true
},
reminder_enable : false
})
Copy import razorpay
client = razorpay.Client(auth=("YOUR_ID" , "YOUR_SECRET" ))
client.payment_link.create({
"amount" : 1000 ,
"currency" : "INR" ,
"accept_partial" : true,
"first_min_partial_amount" : 100 ,
"reference_id" : "#425" ,
"description" : "Payment for policy no #23456" ,
"customer" : {
"name" : "Gaurav Kumar" ,
"contact" : "+919999999999" ,
"email" : "gaurav.kumar@example.com"
},
"notify" : {
"sms" : true,
"email" : true
},
"reminder_enable" : false
})
Copy import ( razorpay "github.com/razorpay/razorpay-go" )
client := razorpay.NewClient("YOUR_KEY_ID" , "YOUR_SECRET" )
data := map [string ]interface {}{
"amount" : 1000 ,
"currency" : "INR" ,
"accept_partial" : true ,
"first_min_partial_amount" : 100 ,
"reference_id" : "#425" ,
"description" : "Payment for policy no #23456" ,
"customer" : map [string ]interface {}{
"name" : "Gaurav Kumar" ,
"contact" : "+919999999999" ,
"email" : "gaurav.kumar@example.com" ,
},
"notify" : map [string ]interface {}{
"sms" : true ,
"email" : true ,
},
"reminder_enable" : false
}
body, err := client.PaymentLink.Create(data, nil )
Copy {
"amount" : 340000 ,
"amount_due" : 340000 ,
"amount_paid" : 0 ,
"billing_end" : null ,
"billing_start" : null ,
"cancelled_at" : null ,
"comment" : null ,
"created_at" : 1592579126 ,
"currency" : "INR" ,
"currency_symbol" : "₹" ,
"customer_details" : {
"billing_address" : null ,
"contact" : "9900990099" ,
"customer_contact" : "9900990099" ,
"customer_email" : "gaurav.kumar@example.com" ,
"customer_name" : "Gaurav Kumar" ,
"email" : "gaurav.kumar@example.com" ,
"gstin" : null ,
"id" : "cust_F4WNtqj1xb0Duv" ,
"name" : "Gaurav Kumar" ,
"shipping_address" : null
} ,
"customer_id" : "cust_F4WNtqj1xb0Duv" ,
"date" : 1592579126 ,
"description" : "Salon at Home Service" ,
"email_status" : null ,
"entity" : "invoice" ,
"expire_by" : 1608390326 ,
"expired_at" : null ,
"first_payment_min_amount" : 0 ,
"gross_amount" : 340000 ,
"group_taxes_discounts" : false ,
"id" : "inv_F4WfpZLk1ct35b" ,
"invoice_number" : null ,
"issued_at" : 1592579126 ,
"line_items" : [ ] ,
"notes" : [ ] ,
"order_id" : "order_F4WfpxUzWmYOTl" ,
"paid_at" : null ,
"partial_payment" : false ,
"payment_id" : null ,
"receipt" : "5757" ,
"reminder_enable" : false ,
"short_url" : "https://rzp.io/i/vitLptM" ,
"sms_status" : null ,
"status" : "issued" ,
"tax_amount" : 0 ,
"taxable_amount" : 0 ,
"terms" : null ,
"type" : "link" ,
"user_id" : "" ,
"view_less" : true
}