Payment Verification for Course
Checks a Razorpay checkout result after the learner pays, by verifying Razorpay's signature. Call it from your checkout page with the three values Razorpay returns, to confirm the payment is genuine before showing success.
POST
/razorpay/verifyPayment Verification for Course
curl --request POST \
--url 'https://<your-api-host>/nuSource/api/v1/razorpay/verify' \
--header 'APIKEY: <your-api-key>' \
--header 'ORGID: <your-org-id>' \
--form 'JSONString={"razorpay_payment_id":"pay_JWxtLSDiXiAsSv","razorpay_order_id":"order_JWxiUS9BUQ2UWE","razorpay_signature":"bff8c8fc89141489128511b7ec6efdb3d07cfd8b88b39e7b79a1efec0e803f78"}'{
"code": 200,
"message": "Success",
"part_id": 5667,
"payment_id": 4420,
"masterbatch": {
"master_batch_id": 1144,
"class_ids": "1872"
}
}Access: Public, no API key.
Request body: form-data with one field, JSONString, containing this JSON:
Body
JSONStringPayment ID from Razorpay checkout (
pay_...).Order ID from Razorpay checkout (
order_...), or the subscription ID (sub_...) for an auto-debit subscription.Signature from Razorpay checkout.
Response
codeinteger
Example:
200messagestring
Example:
Successpayment_idinteger
Example:
4420masterbatchobject
Show child attributesHide child attributes
masterbatch.master_batch_idinteger
Example:
1144Notes: The signature is checked with the Razorpay account of the organization that created the order. A wrong signature, or a payment ID Edmingle doesn't know, returns "Invalid Signature". This call only verifies; the payment itself is recorded from Razorpay's notification to Edmingle.