Transaction Process

Use this API to capture payment details and enroll user in a course.

 

HTTP REQUEST

POST /transaction/process

REQUEST BODY PARAMETER

Field Type Description
orderType
required
integer 1-course,
2-learning object,
3-learning-path etc.
orderData
required
JSON Array Filter Parameter:
1. user ID
2. Course ID
3. CurrencyCode
4. Price
5. paymentProvider will be 1
6. transactionRefNo
{
   "userId": [8],
   "courseId": 1124,
   "currencyCode": "INR",
   "price": "1",
   "transactionRefNo": "pay_Izj2XMQ5LxuJip",
   "paymentProvider": 1
}
{
    "success": true,
    "data": {
        "response": {
            "acknowledgement": "Success",
            "data": 14634,
            "error": {
                "code": "",
                "internal_message": "",
                "moreInfo": []
            }
        }
    }
}
Field Type Description
acknowledgement string Sucess/Failure
data integer enrollment ID
Code Description
1001 ‘Missing orderType’
1002 ‘Invalid orderType’
1003 ‘Missing orderData’
1004 ‘Invalid orderData’
1005 ‘Missing userId’
1006 ‘Invalid userId’
1007 ‘Missing courseId’
1008 ‘Invalid courseId’
1009 ‘Missing transactionRefNo’
1010 ‘Invalid transactionRefNo’
1011 ‘Missing paymentProvider’
1012 ‘Invalid paymentProvider’
1013 ‘Not eligible for enrollment – Already enrolled’
1014 ‘Razorepay not configured / Record not found’
1015 ‘TransactionRefNo is already proceed’
1016 ‘Transaction status is not allow for enrollment’
1017 ‘Missing emailNotification’
1018 ‘Invalid emailNotification’
1019 ‘Course enrollment email template was not found’
1020 ‘Course is not eligible for sale. Missing currency/show frontEnd setting’
1021 ‘Missing currencyCode’
1022 ‘Invalid currencyCode’
1023 ‘Missing price’
1024 ‘Invalid price’
1025 ‘currencyCode not configured’
1026 ‘Amount mismatch’

For general error details, click here.