Curl PHP Node.JS Python Go Response
Copy curl -u <YOUR_KEY_ID>:<YOUR_KEY_SECRET> \
-X GET https://api.razorpay.com/v1/payments/pay_1Aa00000000002
Copy $api = new Api($key_id , $secret );
$api ->payment->fetch($paymentId );
Copy var instance = new Razorpay ({ key_id : 'YOUR_KEY_ID' , key_secret : 'YOUR_SECRET' })
instance.payments .fetch (paymentId)
Copy client = razorpay.Client(auth=("YOUR_ID" , "YOUR_SECRET" ))
client.payment.fetch(paymentId)
Copy import ( razorpay "github.com/razorpay/razorpay-go" )
client := razorpay.NewClient("YOUR_KEY_ID" , "YOUR_SECRET" )
body, err := client.Payment.Fetch("<paymentId>" , nil , nil )
Copy {
"id" : "pay_FHfAzEJ51k8NLj" ,
"entity" : "payment" ,
"amount" : 100 ,
"currency" : "INR" ,
"status" : "captured" ,
"order_id" : "order_FHfANdTUYeP8lb" ,
"invoice_id" : null ,
"international" : false ,
"method" : "upi" ,
"amount_refunded" : 0 ,
"refund_status" : null ,
"captured" : true ,
"description" : null ,
"card_id" : null ,
"bank" : null ,
"wallet" : null ,
"vpa" : "gaurav.kumar@upi" ,
"email" : "gaurav.kumar@example.com" ,
"contact" : "+919876543210" ,
"customer_id" : "cust_DtHaBuooGHTuyZ" ,
"token_id" : "token_FHfAzGzREc1ug6" ,
"notes" : {
"note_key 1" : "Beam me up Scotty" ,
"note_key 2" : "Tea. Earl Gray. Hot."
} ,
"fee" : 0 ,
"tax" : 0 ,
"error_code" : null ,
"error_description" : null ,
"error_source" : null ,
"error_step" : null ,
"error_reason" : null ,
"acquirer_data" : {
"rrn" : "854977234911" ,
"upi_transaction_id" : "D0BED5A062ECDB3E9B3A1071C96BB273"
} ,
"created_at" : 1595447490
}