Transaction
Generate Order
Use this API to generate Order ID.
POST /transaction/generate-order
Request body parameters
Field | Type | Description |
---|---|---|
paymentProvider required | integer | 1-RazorPay |
orderData required | JSON Array | Filter Parameter:
|
{
"userId":8,
"courseId":1221,
"startDate":"2023-01-01",
"endDate":"2023-02-01",
"currencyCode":"INR",
"price":"1200"
}
- Response
- Schema
- Error Codes
{
"success": true,
"data": {
"response": {
"acknowledgement": "Success",
"data":
"orderId": [
{abc123xyz},
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}
Field | Type | Description |
---|---|---|
acknowledgement | string | Sucess/Failure |
data | integer | enrollment ID |
Code | Description |
---|---|
1003 | "Missing orderData" |
1004 | "Invalid orderData" |
1021 | "Missing currencyCode" |
1022 | "Invalid currencyCode" |
1023 | "Missing price" |
1024 | "Invalid price" |
1025 | "currencyCode not configured" |
1026 | "Amount mismatch" |
1027 | "Missing orderId" |
1028 | "Invalid orderId" |
1029 | "Razorepay – orderId not found" |
For general error details, click here.
Validate Details
Use this API to validate user and course details.
POST /transaction/validate
Request body parameters
Field | Type | Description |
---|---|---|
orderType required | integer | 1-course, 2-learning object, 3-learning-path etc. |
orderData required | JSON Array | Filter Parameter:
|
{
"userId": [8],
"courseId": 1124,
"currencyCode": "INR",
"price": "1200",
"paymentProvider": 1
}
- Response
- Schema
- Error Codes
{
"success": true,
"data": {
"response": {
"acknowledgement": "Success",
"data": null,
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}
Field | Type | Description |
---|---|---|
acknowledgement | string | Sucess/Failure |
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" |
1017 | "Missing emailNotification" |
1018 | "Invalid emailNotification" |
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.
Transaction Process
Use this API to capture payment details and enroll user to a course.
POST /transaction/process
Request body parameters
Field | Type | Description |
---|---|---|
orderType required | integer | 1-course, 2-learning object, 3-learning-path etc. |
orderData required | JSON Array | Filter Parameter:
|
{
"userId": [8],
"courseId": 1124,
"currencyCode": "INR",
"price": "1200",
"transactionRefNo": "pay_Izj2XMQ5LxuJip",
"paymentProvider": 1
}
- Response
- Schema
- Error Codes
{
"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.
Transaction List
Use this API to get your Orders/Transaction List.
GET /transaction/list
Query string parameters
Field | Type | Description |
---|---|---|
firstRecord required | integer | First record to return. Default: 1 |
count required | integer | Number of records to be returned starting from the first record Default: 20, Max count limit: 50 |
- Response
- Schema
- Error Codes
{
"success": true,
"data": {
"response": {
"acknowledgement": "Success",
"data": {
"transactionList": [
{
"transactionId": 300,
"date": "2023-02-17 12:28:15",
"courseTitle": "Effective Hiring Practices",
"courseCode": "50027",
"transactionRefNo": "pay_LHVlnmMprpLTF0",
"orderID": "1396465863",
"amount": "449",
"currency": "INR"
}
],
"totalRecords": 1
},
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}
Field | Type | Description |
---|---|---|
transactionId | int | Transacton ID |
date | string | Date of transaction |
courseTitle | string | Course name |
courseCode | string | Course code |
transactionRefNo | string | Reference code |
orderID | string | Order ID |
amount | string | Amount Paid |
INR | string | Currency Paid |
Code | Description |
---|---|
1034 | "Invalid firstRecord" |
1035 | "Invalid count" |
For general error details, click here.
Transaction Details
Use this API to get your Order/Transaction details.
GET /transaction/{transactionId}/detail
Path parameters
Field | Type | Description |
---|---|---|
transactionId required | integer | Transaction ID |
- Response
- Schema
- Error Codes
{
"success": true,
"data": {
"response": {
"acknowledgement": "Success",
"data": {
"transactionDetail": {
"transactionId": 300,
"date": "2023-02-17 12:28:15",
"transactionRefNo": "pay_LHVlnmMprpLTF0",
"amount": "449",
"orderID": "1396465863",
"currency": "INR",
"courseTitle": "Effective Hiring Practices",
"courseCode": "50027"
}
},
"error": {
"code": "",
"internal_message": "",
"moreInfo": []
}
}
}
}
Field | Type | Description |
---|---|---|
transactionId | int | Transacton ID |
date | string | Date of transaction |
courseTitle | string | Course name |
courseCode | string | Course code |
transactionRefNo | string | Reference code |
orderID | string | Order ID |
amount | string | Amount Paid |
INR | string | Currency Paid |
Code | Description |
---|---|
1036 | "Missing transactionId" |
1037 | "Invalid transactionId" |
For general error details, click here.