### C# Client Example for BatchFileUpload Source: https://api.netcash.co.za/inbound-payments/dc/debi-check-2 Example C# code demonstrating how to use the BatchFileUpload method with the Netcash web service client. ```C# public string BatchFileUpload(string ServiceKey, string File) { // initialise client NIWS_NIF.NIWS_NIFClient client = new NIWS_NIF.NIWS_NIFClient(); // call the BatchFileUpload method equal to a string variable string Request = client.BatchFileUpload(ServiceKey, File); // close client after response is received client.Close(); switch (Request) { case "100": // Authentication failure break; case "102": // Parameter error break; case "200": // General code exception. break; default: // successful return Request; } // use response to call RequestFileUploadReport method return Request; } ``` -------------------------------- ### Key Record Example Source: https://api.netcash.co.za/inbound-payments/pay-now/billing Example of a Key record (K) which defines the content, order, and length of the transaction records that follow in the batch file. ```text K 138 162 165 201 253 254 301 302 303 304 ``` -------------------------------- ### Key Record Example Source: https://api.netcash.co.za/inbound-payments/emandate/update-masterfile Example of a Key record. This record defines the content, order, and length of the subsequent transaction records. ```plaintext K 101 ``` -------------------------------- ### Example Input File Format Source: https://api.netcash.co.za/inbound-payments/pay-now/billing This is an example of the plain text format for input files used in the BatchFileUpload method. It includes header, transaction, and footer records. ```plaintext H C74EXXX5-5499-4663-85FB-2A6XXXXFB9EF 1 Invoice March 20150204 24ade73c-98cf-XXXX-XXXX-cc7b867b3080 K 253 254 162 138 301 302 303 201 T AB001123456 Serial no 56789012 150000 Y Jones March Inv123456 ajones@mweb.co.za T CD001123457 Serial no 23568901 155090 N Brown March Inv123457 sbrown@gmail.com F 2 170090 9999 ``` -------------------------------- ### Full Input File Example Source: https://api.netcash.co.za/inbound-payments/dc/debi-check-2 An example of a complete inbound payment file, including header, key, transaction, and footer records. This format is used for submitting debit order information. ```plaintext H C74EXXX5-5499-4663-85FB-2A6XXXXFB9EF 1 DebiCheck My Test Batch 20131204 24ade73c-98cf-XXXX-XXXX-cc7b867b3080 K 101 162 232 249 301 302 303 T AB001123456 150000 9 NC00000021 Jones Sept Inv123456 T CD001123457 17500 3 NC00000134 Brown Sept Inv123457 F 2 167500 9999 ``` ```plaintext H C74EXXX5-5499-4663-85FB-2A6XXXXFB9EF 1 DebiCheck My Test Batch 20131204 24ade73c-98cf-XXXX-XXXX-cc7b867b3080 K 101 162 232 249 301 302 303 T AB001123456 150000 9 NC00000021 Jones Sept Inv123456 T CD001123457 17500 3 NC00000134 Brown Sept Inv123457 F 2 167500 9999 ``` -------------------------------- ### Header Record Example Source: https://api.netcash.co.za/inbound-payments/emandate/emandate-download-mandate-data-pdf An example of a Header record for the eMandate file upload. It includes the Service Key, version, instruction, batch name, action date, and software vendor code. ```text H C74EF975-5429-4663-85FB-2A64CA0FB9EF 1 RequestMandatePDF My Test Batch 20201030 24ade73c-98cf-47b3-99be-cc7b867b3080 ``` -------------------------------- ### Footer Record Example Source: https://api.netcash.co.za/inbound-payments/emandate/update-masterfile This is an example of a footer record for a payment file. It indicates the end of the file and includes counts and sums. ```plaintext F 2 0 9999 ``` -------------------------------- ### Header Record Example Source: https://api.netcash.co.za/inbound-payments/pay-now/billing Example of a Header record (H) for a batch upload file. It includes the Service Key, Version, Instruction, Batch name, Action date, and Software vendor key. ```text H C74EXXX5-5499-4663-85FB-2A6XXXXFB9EF 1 Invoice My Test Batch 20100331 24ade73c-98cf-47b3-99be-cc7b867b3080 ``` -------------------------------- ### Header Record Example Source: https://api.netcash.co.za/inbound-payments/emandate/update-masterfile An example of a Header record for the mandate update file. Ensure the Service Key, Instruction, and Action Date are correctly formatted. ```plaintext H C74EF975-5429-4663-85FB-2A64CA0FB9EF 1 MandateToMasterfile My Test Batch 20100331 24ade73c-98cf-47b3-99be-cc7b867b3080 ``` -------------------------------- ### Successful Upload Report Example Source: https://api.netcash.co.za/inbound-payments/dc/debi-check-2 This is an example of a successful upload report, indicating no errors were found during the file processing. ```plaintext ###BEGIN MY TEST BATCH SUCCESSFUL 01:59 PM R1.00 20160410 ###END 01:59 PM ``` -------------------------------- ### Upload Report Example (Successful with Errors) Source: https://api.netcash.co.za/inbound-payments/dc/debi-check-2 This example shows the expected output format for a successful report upload that contains errors. It details specific line items with validation issues. ```plaintext ###BEGIN MY TEST BATCH SUCCESSFUL WITH ERRORS 01:29 PM R1.00 20160410 Acc Ref :XI5 Line :3 Account details could not be validated. Please check the fields Bank account type, Branch code and Account number. Acc Ref :XI5 Line :3 Bank account number has incorrect length (min 4, max 11 characters) Acc Ref :HCOS1 Line :5 Beneficiary statement reference has incorrect length (min 4, max 20 characters) Acc Ref :HCOZ1 Line :6 Beneficiary statement reference has incorrect length (min 4, max 20 characters) ###END 01:29 PM ``` -------------------------------- ### Upload Report Example (Unsuccessful) Source: https://api.netcash.co.za/inbound-payments/dc/debi-check-2 This example demonstrates the output for an unsuccessful report upload, indicating a system error that requires contacting Netcash support. ```plaintext ###BEGIN MY TEST BATCH UNSUCCESSFUL 01:23 PM R1.00 20160410 ###ERROR: A system error occurred. Please contact Netcash R0.00 20160410 ###END 01:23 PM ``` -------------------------------- ### Signed Mandate PDF URL Example Source: https://api.netcash.co.za/inbound-payments/emandate/emandate-download-mandate-data-pdf Example URL format for accessing a signed mandate PDF. Requires your Debit Order service key. ```url https://short.surf/SPDxxx?PKey=3a9be0d4-9999-8888-7777-05bf64cac464 ``` -------------------------------- ### Key Record Example Source: https://api.netcash.co.za/inbound-payments/dc/debi-check-2 The key record (K) is mandatory and defines the content, order, and length of the transaction records that follow. It acts like column headings in a spreadsheet. ```text K 101 162 232 249 301 302 303 ``` -------------------------------- ### Transaction Record Example Source: https://api.netcash.co.za/inbound-payments/dc/debi-check-2 Transaction records (T) must conform to the order and number of fields defined in the key record. Empty fields should be represented by a blank tab or a default value. ```text T Acc001 AccName001 1 BankAccountName001 1 470010 0 25000000000 100 ``` -------------------------------- ### DebiCheck Trace API Response Example Source: https://api.netcash.co.za/inbound-payments/dc/dctrace This XML snippet shows a sample response from the DebiCheckAuthenticationCurrentStatus web service method, indicating the status of a DebiCheck authentication. ```xml NC000000004724 Rejected 20230116 000 ``` -------------------------------- ### Header Record Example Source: https://api.netcash.co.za/inbound-payments/dc/debi-check-2 The header record (H) is mandatory and must be the first record in the file. It identifies the upload and provides instructions to the Netcash server. ```text H C74EXXX5-5499-4663-85FB-2A6XXXXFB9EF 1 DebiCheck My Test Batch 20100331 24ade73c-98cf-47b3-99be-cc7b867b3080 ``` -------------------------------- ### Successful Request Mandate Data Response Source: https://api.netcash.co.za/inbound-payments/emandate/emandate-download-mandate-data Example of a successful response from the RequestMandateData method, returning a file token. ```text 20000000.2550236530.0483.2.2 ``` -------------------------------- ### Call BatchFileUpload Method Source: https://api.netcash.co.za/inbound-payments/dc/debi-check-2 This C# method demonstrates how to call the BatchFileUpload web service. It initializes the client, sends the ServiceKey and File, and handles potential responses. ```csharp public string BatchFileUpload(string ServiceKey, string File) { // initialise client NIWS_NIF.NIWS_NIFClient client = new NIWS_NIF.NIWS_NIFClient(); // call the BatchFileUpload method equal to a string variable string Request = client.BatchFileUpload(ServiceKey, File); // close client after response is received client.Close(); switch (Request) { case "100": // Authentication failure break; case "102": // Parameter error break; case "200": // General code exception. break; default: // successful return Request; } // use response to call RequestFileUploadReport method return Request; } ``` -------------------------------- ### Request File Upload Report in C# Source: https://api.netcash.co.za/inbound-payments/dc/debi-check-2 Initializes a client, calls the RequestFileUploadReport method, and returns the response. Ensure the same service key used for batch file upload is provided. ```csharp public string RequestFileUploadReport(string ServiceKey, string FileToken) { // initialise client NIWS_NIF.NIWS_NIFClient client = new NIWS_NIF.NIWS_NIFClient(); // call the RequestFileUploadReport method equal to a string variable // the same service key used for the bactch file upload string Request = client.RequestFileUploadReport(ServiceKey, FileToken); // close client after response is received client.Close(); // use response to output to UI // service will respond with the result of the file uploaded return Request; } ``` -------------------------------- ### Request File Upload Report Source: https://api.netcash.co.za/inbound-payments/emandate Initializes a client, calls the RequestFileUploadReport method, and returns the result. Ensure the same service key used for batch file upload is used here. The client should be closed after the response is received. ```csharp public string RequestFileUploadReport(string ServiceKey, string FileToken) { // initialise client NIWS_NIF.NIWS_NIFClient client = new NIWS_NIF.NIWS_NIFClient(); // call the RequestFileUploadReport method equal to a string variable // the same service key used for the bactch file upload string Request = client.RequestFileUploadReport(ServiceKey, FileToken); // close client after response is received client.Close(); // use response to output to UI // service will respond with the result of the file uploaded return Request; } ``` ```csharp public string RequestFileUploadReport(string ServiceKey, string FileToken) { // initialise client NIWS_NIF.NIWS_NIFClient client = new NIWS_NIF.NIWS_NIFClient(); // call the RequestFileUploadReport method equal to a string variable // the same service key used for the bactch file upload string Request = client.RequestFileUploadReport(ServiceKey, FileToken); // close client after response is received client.Close(); // use response to output to UI // service will respond with the result of the file uploaded return Request; } ``` ```csharp public string RequestFileUploadReport(string ServiceKey, string FileToken) { // initialise client NIWS_NIF.NIWS_NIFClient client = new NIWS_NIF.NIWS_NIFClient(); // call the RequestFileUploadReport method equal to a string variable // the same service key used for the bactch file upload string Request = client.RequestFileUploadReport(ServiceKey, FileToken); // close client after response is received client.Close(); // use response to output to UI // service will respond with the result of the file uploaded return Request; } ``` -------------------------------- ### Load Report Header Structure Source: https://api.netcash.co.za/inbound-payments/pay-now/billing Defines the structure of the load report header, which appears once at the start of each report. It includes fields for record identifier, batch name, upload result, and report start time. ```plaintext ###BEGIN {your batch name} SUCCESSFUL / UNSUCCESSFUL / SUCCESSFUL WITH ERRORS HH:MM AM/PM ``` -------------------------------- ### POST /PayNow/PayNow.svc - Create Invoice Source: https://api.netcash.co.za/inbound-payments/pay-now/billing This web service allows an external system to request an invoice reference for payment and receive an immediate response. It permits only a single request per web service call. ```APIDOC ## POST /PayNow/PayNow.svc - Create Invoice ### Description This endpoint creates a payment request for a single invoice, returning a reference that can be used for payment. ### Method POST ### Endpoint https://ws.Netcash.co.za/PayNow/PayNow.svc ### Parameters #### Request Body - **M1** (string) - Required - Your merchant Service Key - **M2** (string) - Required - Software Vendor Code - **Amount xx** (decimal) - Required - The amount of the invoice - **P2** (string) - Required - Unique reference for this invoice - **P3** (string) - Required - Invoice Description - **M4** (string) - Optional - Extra data field 1 - **M5** (string) - Optional - Extra data field 2 - **M6** (string) - Optional - Extra data field 3 - **M9** (string) - Optional - Email of the person you are invoicing - **M10** (string) - Optional - Additional return string data - **IgnoreAmount** (boolean) - Optional - If True, the amount in the barcode is used; otherwise, the provided Amount xx is used. Default is False. - **M11** (string) - Optional - Mobile number. Compulsory if M12 is True. - **M12** (boolean) - Optional - Send SMS. M11 must contain valid data if this field is set to true. - **M13** (boolean) - Optional - Send eMail. M9 must contain valid data if this field is set to true. - **M14** (boolean) - Optional - Request credit card token for subscription cards. Default = false ### Request Example ```json { "M1": "YOUR_SERVICE_KEY", "M2": "YOUR_VENDOR_CODE", "Amount xx": 100.50, "P2": "INV-12345", "P3": "Invoice for services rendered", "M9": "customer@example.com", "M11": "0712345678", "M12": true, "M13": true } ``` ### Response #### Success Response (200) An XML string response with the necessary data to populate your invoice. The structure adheres to the XSD at https://www.netcash.co.za/netcash/xsd/invoices.xsd. The response will only include payment types activated in the back office. #### Error Response - **100** - Authentication failed - **103** - Invalid software vendor key - **200** - Web service error contact support@Netcash.co.za - **301** - Non unique reference provided - **310** - Payment request not activated for this account. Contact support@netcash.co.za ### Response Example (XML structure as per XSD: https://www.netcash.co.za/netcash/xsd/invoices.xsd) ### Retail Barcode - **Barcode standard:** Code128C - **Image type:** SVG_VML - **Image width:** 400px - **Image height:** 50px ``` -------------------------------- ### Configure web.config for Cross-Site Scripting Source: https://api.netcash.co.za/inbound-payments/dc/debi-check-2 Add these headers to your _web.config_ file to resolve cross-site scripting errors in Safari when using iFrames. Ensure these settings are correctly placed within the system.webServer section. ```xml ``` -------------------------------- ### Netcash Payment Form Example Source: https://api.netcash.co.za/inbound-payments/pay-now/pay-now-ecommerce-backup This HTML form is used to submit payment details to the Netcash Pay Now service. Ensure all required fields like service key, vendor key, transaction ID, amount, and budget indicator are correctly populated. ```html
``` ```html
``` ```html
``` -------------------------------- ### Input File Structure Source: https://api.netcash.co.za/inbound-payments/pay-now/billing Details the mandatory record types (Header, Key, Transaction, Footer) and their structure for batch file uploads. ```APIDOC ## Input File Structure Each batch file must contain the following mandatory records in order: 1. **Header record (H)**: Identifies the upload and provides instructions to the Netcash server. 2. **Key record (K)**: Describes the transaction records that follow, defining their content, order, and length. 3. **Transaction records (T)**: Contain the actual data for each transaction, conforming to the layout defined in the Key record. 4. **Footer record (F)**: The last record in the file, confirming its completion. ### Header Record (H) - **Field 1**: Record Identifier (AN) - Value: 'H' - **Field 2**: Service Key (AN) - Your Pay Now Service Key. - **Field 3**: Version (AN) - Value: '1' (Netcash file specification version). - **Field 4**: Instruction (AN) - Purpose of the file (e.g., 'Invoice'). - **Field 5**: Batch name (AN) - Your identifier for the batch. - **Field 6**: Action date (N) - Date in CCYYMMDD format. - **Field 7**: Software vendor key (AN) - Netcash-issued key for software origin (default: '24ade73c-98cf-47b3-99be-cc7b867b3080' for non-ISVs). **Example Header Record:** ``` H|C74EXXX5-5499-4663-85FB-2A6XXXXFB9EF|1|Invoice|My Test Batch|20100331|24ade73c-98cf-47b3-99be-cc7b867b3080 ``` ### Key Record (K) - The Key record is mandatory and must appear after the Header record. - It defines the content, order, and length of the Transaction records. - All possible fields for Transaction records should be listed, even if not used in every record. - Listing keys in ascending order is recommended for debugging. **Example Key Record:** ``` K|138|162|165|201|253|254|301|302|303|304 ``` ``` -------------------------------- ### POST /niws/niws_nif.svc - BatchFileUpload Source: https://api.netcash.co.za/inbound-payments/emandate/update-masterfile This method allows an external system to upload a batch file of mandate requests to update the Debit order Master file. ```APIDOC ## POST /niws/niws_nif.svc - BatchFileUpload ### Description Uploads a batch file containing eMandate requests to update the Debit order Master file. ### Method POST ### Endpoint https://ws.netcash.co.za/niws/niws_nif.svc ### Parameters #### Query Parameters - **ServiceKey** (string) - Required - The Debit order service key. - **File** (string) - Required - The content of the batch file. ### Request Example ``` public string BatchFileUpload(string ServiceKey, string File) ``` ### Response #### Success Response (200) Returns a file token used to retrieve the load report upon successful processing. - **File Token** (string) - Example: `20000000.2550236530.0483.2.2` #### Error Response - **100** (string) - Authentication failure. Ensure that the service key in the method call is correct. - **102** (string) - Parameter error. One or more of the parameters in the string is incorrect. - **200** (string) - General code exception. Please contact Sage Pay Technical Support. ### Input File Structure The input file must contain the following records in order: - **H – Header record**: Identifies the upload and its purpose. - **K – Key record**: Describes the transaction records that follow. - **T – Transaction records**: Contain the actual mandate data. - **F – Footer record**: Confirms the file is complete. #### Header Record (H) **Record Structure** - **Field 1**: Record Identifier (AN) - Value: `H` - **Field 2**: Service Key (AN) - Value: Service GUID - **Field 3**: Version (AN) - Value: `1` - **Field 4**: Instruction (AN) - Value: `MandateToMasterfile` - **Field 5**: Batch name (AN) - Value: Your identifier - **Field 6**: Action date (N) - Value: CCYYMMDD (Current date) - **Field 7**: Software vendor code (AN) - Value: Your software vendor code **Example Header Record** ``` H C74EF975-5429-4663-85FB-2A64CA0FB9EF 1 MandateToMasterfile My Test Batch 20100331 24ade73c-98cf-47b3-99be-cc7b867b3080 ``` #### Key Record (K) - The Key record is mandatory and must appear after the Header record. - It defines the content, order, and length of the subsequent Transaction records. **Example Key Record** ``` K 101 ``` #### Transaction Record (T) - At least one Transaction record must be present. - Fields must conform to the order described in the Key record. - Only the account reference of the mandate is required in the T record. ``` -------------------------------- ### POST /NIWS/niws_nif.svc - BatchFileUpload Source: https://api.netcash.co.za/inbound-payments/pay-now/billing The BatchFileUpload method allows an external system to upload a batch file of invoices asynchronously. The web service processes the file and returns a file token for retrieving the load report. ```APIDOC ## POST /NIWS/niws_nif.svc - BatchFileUpload ### Description This endpoint allows for the asynchronous upload of a batch file containing invoices. Upon successful processing, a file token is returned, which can be used to retrieve the load report. ### Method POST ### Endpoint https://ws.netcash.co.za/NIWS/niws_nif.svc ### Parameters #### Request Body - **ServiceKey** (string) - Required - Your Netcash Pay Now service key. - **File** (string) - Required - The content of the batch file, formatted according to the specified record structure (Header, Key, Transaction, Footer). ### Request Example ```json { "ServiceKey": "YOUR_SERVICE_KEY", "File": "H|C74EXXX5-5499-4663-85FB-2A6XXXXFB9EF|1|Invoice|My Test Batch|20231027|24ade73c-98cf-47b3-99be-cc7b867b3080\nK|138|162|165|201|253|254|301|302|303|304\nT|...\nF|..." } ``` ### Response #### Success Response (200) - **fileToken** (string) - A token representing the uploaded file, used for retrieving the load report. #### Response Example ```json { "fileToken": "20000000.2550236530.0483.2.2" } ``` #### Error Response - **100** (string) - Authentication failure. Ensure that the service key in the method call is correct. - **102** (string) - Parameter error. One or more of the parameters in the string is incorrect. - **200** (string) - General code exception. Please contact Netcash Technical Support. ``` -------------------------------- ### eMandate BatchFileUpload API Source: https://api.netcash.co.za/inbound-payments/emandate The BatchFileUpload method allows remote systems to send batched electronic requests for electronic debit order mandates to account holders for authorization. ```APIDOC ## POST /niws/niws_nif.svc ### Description This endpoint facilitates the batch upload of electronic debit order mandate requests. ### Method POST ### Endpoint https://ws.netcash.co.za/niws/niws_nif.svc ### Parameters #### Request Body - **ServiceKey** (string) - Required - The unique service key for authentication. - **File** (string) - Required - The file content containing the mandate requests in a specific format (Header, Key, Transaction, Footer records). ### Request Example ```json { "ServiceKey": "YOUR_SERVICE_KEY", "File": "H...K...T...F..." } ``` ### Response #### Success Response (200) - **fileToken** (string) - A token used to retrieve the load report for the uploaded file. #### Response Example ``` 20000000.2550236530.0483.2.2 ``` #### Error Response - **100** (string) - Authentication failure. Ensure that the service key in the method call is correct. - **102** (string) - Parameter error. One or more of the parameters in the string is incorrect. - **200** (string) - General code exception. Please contact Netcash Technical Support. ``` -------------------------------- ### eMandate – Download Mandate Data – .pdf format Source: https://api.netcash.co.za/inbound-payments/emandate/emandate-download-mandate-data-pdf This section describes the process of requesting signed mandate PDFs using the NIWS_NIF web service. It covers the BatchFileUpload method, input file structure, and expected outputs. ```APIDOC ## POST /niws/niws_nif.svc ### Description This endpoint allows for the uploading of a batch file containing mandate account references to retrieve electronically signed mandates. ### Method POST ### Endpoint https://ws.netcash.co.za/niws/niws_nif.svc ### Parameters #### Request Body - **ServiceKey** (string) - Required - Your debit order service key. - **File** (string) - Required - The file content containing mandate request records. ### Request Example ``` public string BatchFileUpload(string ServiceKey, string File) ``` ### Response #### Success Response (200) - **File Token** (string) - A token used to retrieve the load report upon successful file processing. #### Response Example ``` 20000000.2550236530.0483.2.2 ``` #### Error Response - **Code** (integer) - Error code. - **Description** (string) - Description of the error. **Error Codes:** - 100: Authentication failure. Ensure that the service key in the method call is correct. - 102: Parameter error. One or more of the parameters in the string is incorrect. - 200: General code exception. Please contact Netcash Technical Support. ### Input File Structure The input file must adhere to a specific record structure: **H – Header record:** Identifies the upload and specifies the file's purpose. **K – Key record:** Describes the transaction records that follow and defines their format. **T – Transaction records:** Contain the actual mandate request data. **F – Footer record:** Marks the end of the file. #### Header Record (H) **Record Structure:** - **Field 1:** Record Identifier (AN) - Value: "H" - **Field 2:** Service Key (AN) - Value: GUID (Debit order service key) - **Field 3:** Version (AN) - Value: 1 - **Field 4:** Instruction (AN) - Value: "RequestMandatePDF" - **Field 5:** Batch name (AN) - Value: Your batch identifier - **Field 6:** Action date (N) - Value: CCYYMMDD (Current date) - **Field 7:** Software vendor code (AN) - Value: Your software vendor code issued by Netcash. **Example:** ``` H C74EF975-5429-4663-85FB-2A64CA0FB9EF 1 RequestMandatePDF My Test Batch 20201030 24ade73c-98cf-47b3-99be-cc7b867b3080 ``` #### Key Record (K) For RequestMandatePDF, only key 101 (Mandate reference) is required. **Example:** ``` K 101 ``` #### Transaction Record (T) Each transaction record must conform to the fields described in the key record. For key 101, only the account reference is required. **Record Structure:** - **Field 101:** Account reference (AN22) - The unique reference for the mandate (min 2, max 22 characters). #### Footer Record (F) Indicates the complete file has been received. Must be the last record in the file. ``` -------------------------------- ### eMandate - RequestMandateData Source: https://api.netcash.co.za/inbound-payments/emandate/emandate-download-mandate-data Initiates the process of requesting mandate data by returning a file token. This is the first step in the asynchronous data retrieval process. ```APIDOC ## POST /niws/niws_nif.svc ### Description Requests a file token for downloading mandate data. This is an asynchronous operation. ### Method POST ### Endpoint https://ws.netcash.co.za/niws/niws_nif.svc ### Parameters #### Query Parameters - **ServiceKey** (string) - Required - The service key for authentication. ### Request Example ``` public string RequestMandateData(string ServiceKey) ``` ### Response #### Success Response (200) - **File Token** (string) - A token used to retrieve the mandate data file. #### Response Example ``` 20000000.2550236530.0483.2.2 ``` #### Error Handling - **100**: Authentication failure. Ensure that the service key in the method call is correct. - **200**: General code exception. Please contact Netcash Technical Support. ``` -------------------------------- ### BatchFileUpload Web Service Method Signature Source: https://api.netcash.co.za/inbound-payments/emandate/update-masterfile The signature for the BatchFileUpload web service method. Use this to upload a batch file of mandate requests. ```csharp public string BatchFileUpload(string ServiceKey, string File) ``` -------------------------------- ### Batch File Upload API Source: https://api.netcash.co.za/inbound-payments/dc/debi-check-2 This endpoint allows external systems to submit a batch file of DebiCheck Debit Orders for processing. It requires a ServiceKey for authentication and the batch file itself. ```APIDOC ## POST /NIWS/niws_nif.svc ### Description Submits a batch file of DebiCheck Debit Orders for processing. ### Method POST ### Endpoint https://ws.netcash.co.za/NIWS/niws_nif.svc ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **ServiceKey** (string) - Required - The debit order service key for authentication. - **File** (string) - Required - The batch file containing the debit order instructions. ### Request Example ```json { "ServiceKey": "your_service_key", "File": "batch_file_content" } ``` ### Response #### Success Response (200) - **string** - A response string indicating the status of the file upload. '100' for authentication failure, '102' for parameter error, '200' for general exception, and other values for successful processing. #### Response Example ``` 200 ``` ```