### Install Easebuzz CapacitorJS SDK Source: https://docs.easebuzz.in/docs/payment-gateway/9xm7b9we5tvl3-capacitor-js Execute this command to install the SDK into your Capacitor app. It dynamically packs the SDK and installs it. ```bash npm install $(npm pack /easebuzz-capacitorjs-sdk | tail -1) ``` ```bash npm install $(npm pack HomeDirectory/SDKfolder/easebuzz-capacitorjs-sdk | tail -1) ``` -------------------------------- ### Create Discount Response Example Source: https://docs.easebuzz.in/docs/feesbuzz/e9057a0f764ac-create-discount Example of a successful response when creating an installment discount. The 'status' field indicates success, and 'data' provides a confirmation message. ```json { "status": true, "data": "Discount created successfully." } ``` -------------------------------- ### List Installment Discounts Response Example Source: https://docs.easebuzz.in/docs/feesbuzz/beeaf78ca3e87-list-installment-discounts This is an example of a successful JSON response when retrieving installment discounts. It includes details such as discount ID, name, amounts, expiry date, and associated structure. ```json { "success": true, "data": [ { "id": 81, "discount_name": "discount 003", "actual_amount": 10, "payable_amount": 5, "expiry_date": "2021-12-30", "structure": { "id": 656 } } ] } ``` -------------------------------- ### Create Discount cURL Request Source: https://docs.easebuzz.in/docs/feesbuzz/e9057a0f764ac-create-discount Example cURL command to send a POST request to create an installment discount. Replace placeholder headers with your actual AUTHHASH and AUTHID. ```shell curl --request POST \ --url https://edu.easebuzz.in/api/fees/v1/installment_discount/ \ --header 'AUTHHASH: ' \ --header 'AUTHID: ' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ \ "discount_name": "Tuition Fee Discount", \ "actual_amount": 20, \ "payable_amount": 5, \ "expiry_date": "2021-12-30", \ "structure": 123, \ "description": "Tuition Fee Discount", \ "installments": [ \ 12345 \ ] \ }' ``` -------------------------------- ### Create Installment API Request (cURL) Source: https://docs.easebuzz.in/docs/feesbuzz/637ac6220cb31-create-installment Example cURL command to send a POST request to create a student installment. Remember to replace placeholder headers with your actual AUTHID and AUTHHASH. ```shell curl --request POST \ --url https://edu.easebuzz.in/api/fees/v1/student/installments/ \ --header 'AUTHHASH: ' \ --header 'AUTHID: ' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ \ "student_id": 12345, \ "start_date": "2020-05-20", \ "installment_amount": 200, \ "installment_name": "Installment 1", \ "note": "", \ "due_date": "2020-05-20", \ "expire_date": "2020-05-20", \ "penalty_frequency": "0", \ "penalty_amount": "0", \ "penalty_type": false, \ "is_optional": false, \ "split_bank_info_id": null, \ "is_mandatory": false, \ "group": null, \ "fee_structure_id": 123 \ }' ``` -------------------------------- ### Dashboard Summary Response Example Source: https://docs.easebuzz.in/docs/feesbuzz/5088d8aa2dd61-dashboard The API returns a JSON object containing financial metrics such as total, paid, and unpaid installment amounts. ```json 1 { 2 "status": true, 3 "total_installments_amount": "331370.00", 4 "installments_paid_amount": "26263.00", 5 "installments_unpaid_amount": "305107.00", 6 "online_collection": "21998.00", 7 "offline_collection": "4265.00" 8 } ``` -------------------------------- ### Optional Installments Response Example Source: https://docs.easebuzz.in/docs/feesbuzz/25bbdc5a40258-optional-installments-list Example JSON response for a successful retrieval of optional installment data. ```json { "success": true, "data": [ { "id": 45, "split_bank_info": null, "group": null, "installment_amount": 500, "installment_name": "Installment 1", "note": "", "start_date": "2020-06-03T00:00:00", "due_date": "2021-01-25T05:30:00", "expire_date": "2021-07-26T05:30:00", "penalty_frequency": 0, "penalty_type": false, "penalty_amount": 0, "is_mandatory": false, "unique_name": "Inst 1" } ] } ``` -------------------------------- ### Student Installment Response Example Source: https://docs.easebuzz.in/docs/feesbuzz/afa19f6c6455a-student-installment-list Example JSON response structure for a successful student installment list retrieval. Includes student details and installment information. ```json { "success": true, "data": [ { "id": 73, "student": { "id": 17, "prn": "111", "name": "john", "email": "john@gmail.com", "phone_number": "9958091819", "password": "719855e8f4ebd94341277b0b0d50b75c5187133f", "course_name": "testing", "batch_name": "test batch", "fees_structure": "Fees", "degree": null, "semester": null, "father_name": "Jim", "address": "Pune", "is_active": true }, "start_date": "2017-10-10T05:30:00+05:30", "amount_paid": null, "installment_amount": 1, "installment_name": "test sem1", "note": "test", "due_date": "2017-10-31T05:30:00+05:30", "expire_date": "2017-11-01T05:30:00+05:30", "penalty_frequency": 1, "penalty_amount": 1, "penalty_paid": null, "is_paid": false, "payment": null, "is_optional": false, "split_bank_info_id": null, "split_bank_info": null, "is_mandatory": false, "group": null } ] } ``` -------------------------------- ### Implement startPayment Method Source: https://docs.easebuzz.in/docs/payment-gateway/7pno7lhpkyt0f-flutter Define the startPayment() method to handle the payment initiation. This method parses payment arguments, creates an Intent for PWECouponsActivity, and starts the activity for payment. ```java private void startPayment(Object arguments) { try { Gson gson = new Gson(); JSONObject parameters = new JSONObject(gson.toJson(arguments)); Intent intentProceed = new Intent(getActivity(),PWECouponsActivity.class); intentProceed.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); Iterator keys = parameters.keys(); while(keys.hasNext() ) { String value = ""; String key = (String) keys.next(); value = parameters.optString(key); if (key.equals("amount")){ Double amount = new Double(parameters.optString("amount")); intentProceed.putExtra(key,amount); } else { intentProceed.putExtra(key,value); } } startActivityForResult(intentProceed,PWEStaticDataModel.PWE_REQUEST_CODE ); }catch (Exception e) { start_payment=true; Map error_map = new HashMap<>(); Map error_desc_map = new HashMap<>(); String error_desc = "exception occured:"+e.getMessage(); error_desc_map.put("error","Exception"); error_desc_map.put("error_msg", error_desc); error_map.put("result",PWEStaticDataModel.TXN_FAILED_CODE); error_map.put("payment_response",error_desc_map); channel_result.success(error_map); } } ``` -------------------------------- ### Initiate Payment with PWECouponsActivity Source: https://docs.easebuzz.in/docs/payment-gateway/64nm87cwe27sl-android Start the PWECouponsActivity using the pweActivityResultLauncher. Pass the 'access_key' and 'pay_mode' as extras. Ensure the FLAG_ACTIVITY_REORDER_TO_FRONT flag is set. ```java Intent intentProceed = new Intent(MerchantAppActivity.this, PWECouponsActivity.class); intentProceed.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); // This is mandatory flag intentProceed.putExtra("access_key","Access key generated by the Initiate Payment API"); intentProceed.putExtra("pay_mode","This will either be "test" or "production""); pweActivityResultLauncher.launch(intentProceed); ``` -------------------------------- ### Create Optional Installment cURL Request Source: https://docs.easebuzz.in/docs/feesbuzz/b870050831cc5-create-optional-installment Example cURL command to create an optional installment. ```bash curl --request POST \ --url https://edu.easebuzz.in/api/fees/v1/optional_installment/ \ --header 'AUTHHASH: {{AUTHHASH}}' \ --header 'AUTHID: {{AUTHID}}' \ --header 'Accept: application/json, application/xml' \ --header 'Content-Type: application/json' \ --data '{ "split_bank_info_id": "1", "group": null, "installment_amount": 500, "installment_name": "Installment 1", "note": "", "start_date": "2020-06-03T00:00:00+05:30", "due_date": "2021-01-25T05:30:00+05:30", "expire_date": "2021-07-26T05:30:00+05:30", "penalty_type": false, "penalty_frequency": "0", "penalty_amount": 0, "is_mandatory": false, "unique_name": "Inst 1" }' ``` -------------------------------- ### Retrieve API Response Example Source: https://docs.easebuzz.in/docs/payment-gateway/d333db79c5c82-retrieve-api A successful response example containing the status and split configuration details. ```json { "status": "success", "merchant_request_id": "UMRID1", "description": "Split Config Update Test", "error": null, "split_configuration": [ { "label": "hdfcaccount", "amount": 6.6 }, { "label": "axisaccount", "amount": 3.4 } ] } ``` -------------------------------- ### POST /course Source: https://docs.easebuzz.in/docs/feesbuzz/6e5d76015ccb3-course-ap-is Creates a new course in the system. ```APIDOC ## POST /course ### Description Creates a new course entry. ### Method POST ### Endpoint /course ``` -------------------------------- ### Create Optional Installment Response Source: https://docs.easebuzz.in/docs/feesbuzz/b870050831cc5-create-optional-installment Example JSON response returned upon successful creation of an installment. ```json { "status": true, "msg": "Installment Created Successfully" } ``` -------------------------------- ### cURL Request Example Source: https://docs.easebuzz.in/docs/payment-gateway/74a9134647b61-fetch-smart-pay-details Example command to fetch SmartPay details using the cURL utility. ```bash curl --request POST \ --url https://dashboard.easebuzz.in/smartpay/v1/get \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "key": "XXXX", "payment_url_suffix": "2753adb0f9xxxxxx505f5f470af906e", "hash": "a489b5f21a6cfa3a07825663737b813156fb05fca1e55e4173272aa9c4578ffd87488ffa2b881d7d6956127a96789ee4b0ccbef411948ab7067caadddf6e" }' ``` -------------------------------- ### Delete Installment cURL Request Source: https://docs.easebuzz.in/docs/feesbuzz/5c21cbe62bdf9-delete-installment Example cURL command to perform a DELETE request to the installment endpoint. ```shell curl --request DELETE \ --url https://edu.easebuzz.in/api/fees/v1/installment/{id}/ \ --header 'AUTHHASH: ' \ --header 'AUTHID: ' \ --header 'Accept: application/json' ``` -------------------------------- ### POST /api/fees/v1/course/ Source: https://docs.easebuzz.in/docs/feesbuzz/4668682f43b3d-create-course Creates a new course in the Easebuzz system. ```APIDOC ## POST /api/fees/v1/course/ ### Description Creates a new course record in the system. ### Method POST ### Endpoint https://edu.easebuzz.in/api/fees/v1/course/ ### Parameters #### Headers - **AUTHHASH** (string) - Required - SHA-512 hash of string in the format of “[AUTHID]|[key]”. - **AUTHID** (string) - Required - API key provided by Easebuzz. #### Request Body - **course_institute_id** (string) - Required - Unique name of the course. - **course_name** (string) - Required - Name of the course. - **course_short_name** (string) - Required - Short name of the course. - **course_type** (string) - Required - Course type (UG, PG, DP, SC, OT). - **course_status** (boolean) - Required - Status of the course. ### Request Example { "course_institute_id": "MBA01", "course_name": "Master of Business Administration", "course_short_name": "MBA", "course_type": "PG", "course_status": true } ### Response #### Success Response (200) - **status** (boolean) - Indicates if the operation was successful. #### Response Example { "status": true } ``` -------------------------------- ### Get Optional Installments List Source: https://docs.easebuzz.in/docs/feesbuzz/25bbdc5a40258-optional-installments-list Retrieves a list of optional installments. Requires AUTHHASH and AUTID headers for authentication. ```curl curl --request GET \ --url https://edu.easebuzz.in/api/fees/v1/optional_installment/ \ --header 'AUTHHASH: ' \ --header 'AUTHID: ' \ --header 'Accept: application/json' ``` -------------------------------- ### Initiate Payment with EaseCheckout Source: https://docs.easebuzz.in/docs/payment-gateway/7zfogdgdwb9c8-i-frame-integration-ease-checkout Use this script to initiate the EaseCheckout payment process. Ensure the 'access_key' is obtained from the Initiate Payment API. The 'onResponse' function handles the transaction status. ```html ``` -------------------------------- ### Update Installment Discount Response Source: https://docs.easebuzz.in/docs/feesbuzz/ce6f1a02f38fe-update-discount Example successful response after updating an installment discount. Indicates the status and a confirmation message. ```json { "status": true, "message": "Discount updated successfully." } ``` -------------------------------- ### Create Course cURL Request Source: https://docs.easebuzz.in/docs/feesbuzz/4668682f43b3d-create-course Example cURL command to perform the POST request, including necessary headers and the JSON body. ```bash curl --request POST \ --url https://edu.easebuzz.in/api/fees/v1/course/ \ --header 'AUTHHASH: {{AUTHHASH}}' \ --header 'AUTHID: {{AUTHID}}' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "course_institute_id": "MBA01", "course_name": "Master of Business Administration", "course_short_name": "MBA", "course_type": "PG", "course_status": true }' ``` -------------------------------- ### GET /optional-installment Source: https://docs.easebuzz.in/docs/feesbuzz/40lqwighxcv2w-optional-installments-ap-is Retrieves a list of all optional installments. ```APIDOC ## GET /optional-installment ### Description Fetches the list of all configured optional installments. ### Method GET ### Endpoint https://edu.easebuzz.in/api/fees/v1/optional-installment ``` -------------------------------- ### Update Installment cURL Request Source: https://docs.easebuzz.in/docs/feesbuzz/4b700238e4e25-update-installment Example cURL command to send a PUT request to update an installment. Replace `{id}` with the actual installment ID and provide valid AUTHHASH and AUTHID. ```shell curl --request PUT \ --url https://edu.easebuzz.in/api/fees/v1/installment/{id}/ \ --header 'AUTHHASH: ' \ --header 'AUTHID: ' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ \ "fee_structure_id": "123", \ "start_date": "2021-11-01", \ "installment_amount": 10, \ "installment_name": "Installment 1", \ "note": "", \ "due_date": "2021-11-30", \ "expire_date": "2021-12-31", \ "split_bank_info": 1, \ "penalty_type": false, \ "penalty_frequency": "0", \ "penalty_amount": 0, \ "is_mandatory": false, \ "group": [ \ "Installments" \ ] \ }' ``` -------------------------------- ### Initiate Payment Request in Swift Source: https://docs.easebuzz.in/docs/payment-gateway/7pno7lhpkyt0f-flutter Import the Easebuzz module and set up the delegate. Call `initiatePaymentAction` to start the payment process. Ensure the Flutter method channel name and method call name are not changed. ```swift import UIKit import Flutter import Easebuzz @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate,PayWithEasebuzzCallback { var payResult:FlutterResult! override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? ) -> Bool { self.initializeFlutterChannelMethod() return super.application(application, didFinishLaunchingWithOptions: launchOptions) } // Initialise flutter channel func initializeFlutterChannelMethod() { GeneratedPluginRegistrant.register(with: self) guard let controller = window?.rootViewController as? FlutterViewController else { fatalError("rootViewController is not type FlutterViewController") } let methodChannel = FlutterMethodChannel(name: "easebuzz", binaryMessenger: controller) methodChannel.setMethodCallHandler({ [weak self] (call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in guard call.method == "payWithEasebuzz" else { result(FlutterMethodNotImplemented) return } self?.payResult = result; self?.initiatePaymentAction(call: call); }) } // Initiate payment action and call payment gateway func initiatePaymentAction(call:FlutterMethodCall) { if let orderDetails = call.arguments as? [String:String]{ let payment = Payment.init(customerData: orderDetails) let paymentValid = payment.isValid().validity if !paymentValid { print("Invalid records") } else{ PayWithEasebuzz.setUp(pebCallback: self ) PayWithEasebuzz.invokePaymentOptionsView(paymentObj: payment, isFrom: self) } }else{ // handle error let dict = self.setErrorResponseDictError("Empty error", errorMessage: "Invalid validation", result: "Invalid request") self.payResult(dict) } } // payment call callback and handle response func PEBCallback(data: [String : AnyObject]) { if data.count > 0 { self.payResult(data) }else{ let dict = self.setErrorResponseDictError("Empty error", errorMessage: "Empty payment response", result: "payment_failed") self.payResult(dict) } } // Create error response dictionary that the time of something went wrong func setErrorResponseDictError(_ error: String?, errorMessage: String?, result: String?) -> [AnyHashable : Any]? { var dict: [AnyHashable : Any] = [:] var dictChild: [AnyHashable : Any] = [:] dictChild["error"] = "\(error ?? "")" dictChild["error_msg"] = "\(errorMessage ?? "")" dict["result"] = "\(result ?? "")" dict["payment_response"] = dictChild return dict } } ``` -------------------------------- ### Installments List Response Example Source: https://docs.easebuzz.in/docs/feesbuzz/ba2a21975951a-installments-list A successful response returns a JSON object containing a success status and an array of installment data. ```json 1 { 2 "success": true, 3 "data": [] 4 } ``` -------------------------------- ### Update Optional Installment cURL Request Source: https://docs.easebuzz.in/docs/feesbuzz/71a96aadb5803-update-optional-installment Example cURL command to perform a PUT request to the update optional installment endpoint. ```bash curl --request PUT \ --url https://edu.easebuzz.in/api/fees/v1/optional_installment/{id}/ \ --header 'AUTHHASH: ' \ --header 'AUTHID: ' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "group": null, "split_bank_info": null, "installment_amount": 500, "installment_name": "Installment 1", "note": "", "start_date": "2020-06-03T00:00:00+05:30", "due_date": "2021-01-25T05:30:00+05:30", "expire_date": "2021-07-26T05:30:00+05:30", "penalty_type": false, "penalty_frequency": "0", "penalty_amount": 0, "is_mandatory": false, "unique_name": "Inst 1" }' ``` -------------------------------- ### Initiate Payment with Easebuzz SDK Source: https://docs.easebuzz.in/docs/payment-gateway/9xm7b9we5tvl3-capacitor-js Call the `proceedToPayment` method with payment options including access key and pay mode. This method handles the payment process and returns the result. ```typescript async load_paymentgateway() { const option = { access_key: ' Access key generated by the Initiate Payment API', pay_mode : ' This will either be “test” or “production " } let data = await EasebuzzCheckout.proceedToPayment({ option }); console.log(data['result']); console.log(data['payment_response']); } ``` -------------------------------- ### GET /api/fees/v1/optional_installment/ Source: https://docs.easebuzz.in/docs/feesbuzz/25bbdc5a40258-optional-installments-list Retrieves a list of optional installments for the merchant. ```APIDOC ## GET /api/fees/v1/optional_installment/ ### Description Retrieves a list of optional installments configured for the merchant. ### Method GET ### Endpoint https://edu.easebuzz.in/api/fees/v1/optional_installment/ ### Parameters #### Headers - **AUTHHASH** (string) - Required - SHA-512 hash of string in the format of “[AUTHID]|[key]”. - **AUTHID** (string) - Required - API key provided by Easebuzz. ### Request Example ```bash curl --request GET \ --url https://edu.easebuzz.in/api/fees/v1/optional_installment/ \ --header 'AUTHHASH: ' \ --header 'AUTHID: ' \ --header 'Accept: application/json' ``` ### Response #### Success Response (200) - **success** (boolean) - Status of the request. - **data** (array[object]) - List of installment objects. - **id** (integer) - Unique identifier. - **split_bank_info** (null) - Bank split information. - **group** (null) - Group identifier. - **installment_amount** (integer) - Amount of the installment. - **installment_name** (string) - Name of the installment. - **note** (string) - Additional notes. - **start_date** (string) - Start date of the installment. - **due_date** (string) - Due date of the installment. - **expire_date** (string) - Expiration date of the installment. - **penalty_frequency** (integer) - Frequency of penalty. - **penalty_type** (boolean) - Type of penalty. - **penalty_amount** (integer) - Amount of penalty. - **is_mandatory** (boolean) - Whether the installment is mandatory. - **unique_name** (string) - Unique name identifier. #### Response Example { "success": true, "data": [ { "id": 45, "split_bank_info": null, "group": null, "installment_amount": 500, "installment_name": "Installment 1", "note": "", "start_date": "2020-06-03T00:00:00", "due_date": "2021-01-25T05:30:00", "expire_date": "2021-07-26T05:30:00", "penalty_frequency": 0, "penalty_type": false, "penalty_amount": 0, "is_mandatory": false, "unique_name": "Inst 1" } ] } ``` -------------------------------- ### Magento 2.3.x Installation Commands Source: https://docs.easebuzz.in/docs/payment-gateway/249mrgk0rnjkq-magento-2-3-x Run these commands in your Magento project root after placing the plugin files to update the system and compile dependency injection. ```bash php bin/magento setup:upgrade ``` ```bash php bin/magento setup:di:compile ``` -------------------------------- ### Get Student Installments Source: https://docs.easebuzz.in/docs/feesbuzz/afa19f6c6455a-student-installment-list Use this endpoint to retrieve a list of all installments for a specific student. Requires student ID, AUTHHASH, and AUTHID in the headers. ```curl curl --request GET \ --url https://edu.easebuzz.in/api/fees/v1/student/installments/{student_id}/ \ --header 'AUTHHASH: ' \ --header 'AUTHID: ' \ --header 'Accept: application/json' ``` -------------------------------- ### List Students by Batch ID Response Example Source: https://docs.easebuzz.in/docs/feesbuzz/967853969e275-list-students-by-batch-id Example JSON response when successfully retrieving a list of students by batch ID. The response includes success status and an array of student data. ```json { "success": true, "data": [ { "id": "2874", "prn": "11234", "name": "john", "email": "john@gmail.com", "phone_number": "1234567890", "password": "6336f3ebea5080095efa37752697a34f7d45011f", "course_name": "testing", "batch_name": "Computer", "fees_structure": "IndianStudents", "degree": "null", "semester": "null", "father_name": "Samir", "address": "Pune", "is_active": "true" } ] } ``` -------------------------------- ### Initiate Payment Link Request Source: https://docs.easebuzz.in/docs/payment-gateway/2a202bb573d78-auto-debit-api-authorization Use this cURL command to initiate a payment link via the Easebuzz sandbox environment. ```shell curl --request POST \ --url https://testpay.easebuzz.in/payment/initiateLink \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode key= \ --data-urlencode txnid= \ --data-urlencode amount= \ --data-urlencode productinfo= \ --data-urlencode firstname= \ --data-urlencode phone= \ --data-urlencode email= \ --data-urlencode surl= \ --data-urlencode furl= \ --data-urlencode hash= \ --data-urlencode udf1= \ --data-urlencode udf2= \ --data-urlencode udf3= \ --data-urlencode udf4= \ --data-urlencode udf5= \ --data-urlencode udf6= \ --data-urlencode udf7= \ --data-urlencode address1= \ --data-urlencode address2= \ --data-urlencode city= \ --data-urlencode state= \ --data-urlencode country= \ --data-urlencode zipcode= \ --data-urlencode customer_authentication_id= \ --data-urlencode show_payment_mode= \ --data-urlencode sub_merchant_id= \ --data-urlencode request_flow= \ --data-urlencode final_collection_date= ``` -------------------------------- ### GET /api/fees/v1/student/installments/{student_id}/ Source: https://docs.easebuzz.in/docs/feesbuzz/afa19f6c6455a-student-installment-list Retrieves a list of installments for a specific student. ```APIDOC ## GET /api/fees/v1/student/installments/{student_id}/ ### Description Retrieves a list of installments for a specific student, including payment details and due dates. ### Method GET ### Endpoint https://edu.easebuzz.in/api/fees/v1/student/installments/{student_id}/ ### Parameters #### Path Parameters - **student_id** (string) - Required - The unique identifier for the student. #### Headers - **AUTHHASH** (string) - Required - SHA-512 hash of string in the format of '[AUTHID]|[key]'. Key is a merchant key provided by Easebuzz. Example: 3fd65d77e59443a940a44c6b1fafecfb637f960w - **AUTHID** (string) - Required - API key provided by Easebuzz. Example: ABC ### Request Example ```json { "example": "curl --request GET \ --url https://edu.easebuzz.in/api/fees/v1/student/installments/{student_id}/ \ --header 'AUTHHASH: ' \ --header 'AUTHID: ' \ --header 'Accept: application/json'" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **data** (array[object]) - An array of installment objects. - **id** (integer) - The unique identifier for the installment. - **student** (object) - Information about the student. - **id** (integer) - The student's unique identifier. - **prn** (string) - Student's PRN. - **name** (string) - Student's name. - **email** (string) - Student's email address. - **phone_number** (string) - Student's phone number. - **password** (string) - Student's password hash. - **course_name** (string) - The name of the student's course. - **batch_name** (string) - The name of the student's batch. - **fees_structure** (string) - The student's fees structure. - **degree** (string) - The student's degree (can be null). - **semester** (string) - The student's semester (can be null). - **father_name** (string) - The student's father's name. - **address** (string) - The student's address. - **is_active** (boolean) - Indicates if the student account is active. - **start_date** (string) - The start date of the installment period (ISO 8601 format). - **amount_paid** (integer) - The amount already paid for this installment (can be null). - **installment_amount** (integer) - The total amount for this installment. - **installment_name** (string) - The name or description of the installment. - **note** (string) - Any additional notes for the installment. - **due_date** (string) - The due date for the installment (ISO 8601 format). - **expire_date** (string) - The expiry date for the installment (ISO 8601 format). - **penalty_frequency** (integer) - The frequency of penalty application. - **penalty_amount** (integer) - The amount of penalty. - **penalty_paid** (integer) - The amount of penalty already paid (can be null). - **is_paid** (boolean) - Indicates if the installment has been paid. - **payment** (integer) - Payment identifier (can be null). - **is_optional** (boolean) - Indicates if the installment is optional. - **split_bank_info_id** (string) - Identifier for split bank information (can be null). - **split_bank_info** (string) - Details of split bank information (can be null). - **is_mandatory** (boolean) - Indicates if the installment is mandatory. - **group** (string) - Grouping information for the installment (can be null). #### Response Example ```json { "success": true, "data": [ { "id": 73, "student": { "id": 17, "prn": "111", "name": "john", "email": "john@gmail.com", "phone_number": "9958091819", "password": "719855e8f4ebd94341277b0b0d50b75c5187133f", "course_name": "testing", "batch_name": "test batch", "fees_structure": "Fees", "degree": null, "semester": null, "father_name": "Jim", "address": "Pune", "is_active": true }, "start_date": "2017-10-10T05:30:00+05:30", "amount_paid": null, "installment_amount": 1, "installment_name": "test sem1", "note": "test", "due_date": "2017-10-31T05:30:00+05:30", "expire_date": "2017-11-01T05:30:00+05:30", "penalty_frequency": 1, "penalty_amount": 1, "penalty_paid": null, "is_paid": false, "payment": null, "is_optional": false, "split_bank_info_id": null, "split_bank_info": null, "is_mandatory": false, "group": null } ] } ``` ``` -------------------------------- ### cURL Request Example Source: https://docs.easebuzz.in/docs/payment-gateway/zxhpbfxyfxpfz-easy-collect-list-api Command to execute the list API request using cURL. ```bash curl --request POST \ --url https://testdashboard.easebuzz.in/easycollect/v1/list \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "key": "4DXXXXXXXX", "hash": "bd728xxxxxxxxxxxxxxxxxxxxxxxxxxx", "date_range": { "start_date": "2023-04-17", "end_date": "2023-04-20" }, "payment_range": { "start_date": "2023-04-17", "end_date": "2023-04-20" }, "status": "Unpaid", "search_for": "amount", "search_value": "", "additional_data": "sms_count,quick_pay_transaction_date" }' ``` -------------------------------- ### Create Split Configuration cURL Request Example Source: https://docs.easebuzz.in/docs/payment-gateway/e383e3fb60ce3-create-api This cURL command demonstrates how to send a POST request to the Easebuzz API to create or update a post-transaction split configuration. It includes necessary headers like Accept and Content-Type, and the JSON payload in the data argument. ```curl curl --request POST \ --url https://dashboard.easebuzz.in/post-split/v1/create/ \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ \ "key": "N8XXXXXXXX", \ "merchant_request_id": "UMRID1", \ "easebuzz_id": "E250XXXXXXXXXX", \ "amount": "10.0", \ "description": "Split Config Update Test", \ "configuration": [ \ { \ "label": "axisaccount", \ "amount": "6.6" \ }, \ { \ "label": "hdfcaccount", \ "amount": "3.4" \ } \ ], \ "hash": "xxxxxxxxxxxxx" \ }' ``` -------------------------------- ### Create Installment API Response Source: https://docs.easebuzz.in/docs/feesbuzz/637ac6220cb31-create-installment Example successful response from the create installment API. The 'status' field indicates success, and 'data' provides a confirmation message. ```json { "status": true, "data": "Installment Created" } ``` -------------------------------- ### List Installment Discounts Request Source: https://docs.easebuzz.in/docs/feesbuzz/beeaf78ca3e87-list-installment-discounts Use this cURL command to make a GET request to the installment discount API. Ensure you replace placeholder values for AUTHHASH and AUTHID with your actual credentials. ```curl curl --request GET \ --url https://edu.easebuzz.in/api/fees/v1/installment_discount/{fee_structure_id} \ --header 'AUTHHASH: ' \ --header 'AUTHID: ' \ --header 'Accept: application/json' ``` -------------------------------- ### Successful API Response Example Source: https://docs.easebuzz.in/docs/neobanking/16b72f60b2482-add-beneficiary-account Example JSON response returned upon successful creation of a beneficiary. ```json 1 { 2 "success": true, 3 "data": { 4 "beneficiary": { 5 "id": "beneb2b7e7c04e909b8bb931fe1bbf0e", 6 "contact": { 7 "id": "cont9da436ef46cea89bc913767c539b", 8 "status": "Active", 9 "created_at": "2022-01-31T10:55:56.391971+05:30", 10 "deleted_at": null, 11 "name": "Dev D", 12 "email": "demo@test.in", 13 "phone": "6792040000", 14 "created_by": null 15 }, 16 "created_at": "2022-02-01T15:50:06.304942+05:30", 17 "deleted_at": null, 18 "beneficiary_type": "upi", 19 "bank_name": "NA", 20 "account_name": "Dev D", 21 "account_number": null, 22 "account_ifsc": null, 23 "upi_handle": "demo@okhdfcbank", 24 "is_active": true, 25 "is_primary": false, 26 "created_by": null 27 } 28 } 29 } ``` -------------------------------- ### Update Installment Discount cURL Request Source: https://docs.easebuzz.in/docs/feesbuzz/ce6f1a02f38fe-update-discount Example cURL command to update an installment discount. Replace placeholders with actual values. Ensure correct headers and content type are set. ```shell curl --request PUT \ --url https://edu.easebuzz.in/api/fees/v1/installment_discount/{id}/ \ --header 'AUTHHASH: ' \ --header 'AUTHID: ' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ \ "discount_name": "Hostel Fee Discount", \ "actual_amount": 20, \ "payable_amount": 5, \ "expiry_date": "2021-12-30", \ "structure": 123, \ "description": "Hostel Fee Discount (general discount)", \ "installments": [ \ 12345 \ ] \ }' ``` -------------------------------- ### Initiate Payment Action in Swift Source: https://docs.easebuzz.in/docs/payment-gateway/126jq0cu4yjct-ios Call this method when the user clicks the pay button. Ensure the access key is generated via the Initiate Payment API before execution. ```Swift import Easebuzz func initiatePaymentAction() { let orderDetails = [ "access_key": "Pass access key generated in Initiate Payment API", "pay_mode": "This will either be “test” or “production" ] as [String:String] let payment = Payment.init(customerData: orderDetails) let paymentValid = payment.isValid().validity if !paymentValid { print("Invalid records") }else{ PayWithEasebuzz.setUp(pebCallback: self ) PayWithEasebuzz.invokePaymentOptionsView(paymentObj: payment, isFrom: self) } } ``` -------------------------------- ### Import Necessary Packages Source: https://docs.easebuzz.in/docs/payment-gateway/64nm87cwe27sl-android Import these packages at the beginning of your file to use Easebuzz SDK functionalities. ```java import com.easebuzz.payment.kit.PWECouponsActivity; import datamodels.PWEStaticDataModel; ``` -------------------------------- ### Get Easycollect Link Response Example Source: https://docs.easebuzz.in/docs/payment-gateway/52393c651d9d1-get-easycollect-link The API returns a JSON object containing transaction details and payment status. ```json 1 { 2 "status": true, 3 "data": { 4 "id": 252, 5 "name": "Ank", 6 "email": "demo@demo.com", 7 "amount": "1.00", 8 "merchant_txn": "ECRSXVLHKV", 9 "phone": "9191919191", 10 "payment_made": 0, 11 "state": "active", 12 "sms_count": 4, 13 "email_count": 7, 14 "message": "XXXXX", 15 "udf1": "1", 16 "udf2": "2", 17 "udf3": "3", 18 "udf4": "3", 19 "udf5": "4", 20 "expiry_date": "01-12-2019 23:59:59", 21 "pay_hash_url": "https://pay.easebuzz.in/quick_pay/910757b06127401cb893fd7f0579ac7f", 22 "quick_pay_transaction_date": "01-12-2019 23:59:59", 23 "offline_payment_id": "null", 24 "offline_payment_desc": "null", 25 "offline_payment_mode": "null", 26 "created_date": "2019-11-26T11:57:49+05:30", 27 "updated_date": "2019-11-26T11:57:49+05:30", 28 "min_amount": "0.00", 29 "max_amount": "0.00" 30 } 31 } ``` -------------------------------- ### Initiate Settlement Webhook Example Source: https://docs.easebuzz.in/docs/neobanking/6vsqc26rscmiw-insta-collect-disbursement-webhooks This webhook is triggered when a settlement is initiated from the Easebuzz system. It contains details about the settlement transaction. Consult the Authorization Parameter & Hash Generation section for hash generation guidelines. ```json { "event": "SETTLEMENT_INITIATED", "data": { "id": "disb8848299f46e2aa2c1372a4edf4e6", "created_at": "2022-11-09T19:23:50.094099+05:30", "disbursement_type": "settlement", "beneficiary_bank_name": "State Bank of India", "beneficiary_account_name": "Easebuzz PVT LTD", "beneficiary_account_number": "302319xxxxx", "beneficiary_account_ifsc": "SBIN0000001", "beneficiary_upi_handle": "", "unique_transaction_reference": null, "payment_mode": "IMPS", "currency": "INR", "amount": 1, "service_charge": 0, "gst_amount": 0, "service_charge_with_gst": 0, "narration": "MANUAL SETTLEMENT", "status": "in_process", "failure_reason": "", "disbursement_date": "2022-11-09T19:23:50.102504+05:30", "Authorization": "96bf2db7f1a6fbb22374622d7204cf4a8440cb9075f582b3949418e36829638bbd032346c2385249518187f03566f383d921312775d2e2cd8c62e837f24f8bb1" } } ``` -------------------------------- ### Initiate Refund Webhook Example Source: https://docs.easebuzz.in/docs/neobanking/6vsqc26rscmiw-insta-collect-disbursement-webhooks This webhook is triggered when a refund is initiated. It includes details like the refund amount, beneficiary information, and payment mode. Check the Authorization Parameter & Hash Generation section for hash generation details. ```json { "event": "REFUND_INITIATED", "data": { "id": "disb15e9eb744337957c41e8e8d51851", "created_at": "2022-11-09T19:22:55.829080+05:30", "disbursement_type": "refund", "beneficiary_bank_name": "", "beneficiary_account_name": "John Doe", "beneficiary_account_number": "XXXXXX2471", "beneficiary_account_ifsc": "TJSB0000059", "beneficiary_upi_handle": "test@ybl", "unique_transaction_reference": "231300248XXX", "payment_mode": "IMPS", "currency": "INR", "amount": 1, "service_charge": 0, "gst_amount": 0, "service_charge_with_gst": 0, "narration": "REFUND AGAINST {Original transaction UTR}", "status": "in_process", "failure_reason": "Transaction success", "disbursement_date": "2022-11-09T19:22:55.839719+05:30", "Authorization": "34491869ca9beaaad92423921b6cf85eef510b88506b9e16f79c09fbd051ae2de53027af22e412b54f5207463da274e501004dc0a9bab5adebb37f120dd642c2" } } ```