{"_id":"5632a5e949e16d0d0012247d","user":"55b932ba8fd1a02b00f496c8","category":{"_id":"5632a5e749e16d0d00122447","__v":1,"pages":["5632a5e949e16d0d0012247d","5632a5e949e16d0d0012247e","5632a5e949e16d0d0012247f","5632a5e949e16d0d00122480"],"project":"55b933b3146ef121002158d3","version":"5632a5e549e16d0d00122443","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-08-03T18:03:20.852Z","from_sync":false,"order":5,"slug":"bulk-transaction-uploads","title":"Bulk Transaction Uploads"},"project":"55b933b3146ef121002158d3","version":{"_id":"5632a5e549e16d0d00122443","__v":6,"project":"55b933b3146ef121002158d3","createdAt":"2015-10-29T23:04:05.701Z","releaseDate":"2015-10-29T23:04:05.701Z","categories":["5632a5e749e16d0d00122444","5632a5e749e16d0d00122445","5632a5e749e16d0d00122446","5632a5e749e16d0d00122447","5632a5e749e16d0d00122448","5632a5e749e16d0d00122449","5632a5e749e16d0d0012244a","5632a5e749e16d0d0012244b","5632a5e749e16d0d0012244c","5632a5e749e16d0d0012244d","5632a5e749e16d0d0012244e","5632a5e749e16d0d0012244f","5632a5e749e16d0d00122450","5632b179df556c0d00cd095b","564e13053b2b4a19000cd69b","59caa9df65accc001a489c95","59cab50965accc001a489d28","59cadd464ab7b70024378e74"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.1.0","version":"1.1"},"githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-08-03T18:09:10.479Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Post a new batch of transactions to the gateway for processing.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Description\"\n}\n[/block]\nThis method implements the same batch upload functionality as the Batch Upload screens in the merchant console. Batches uploaded via this method will be visible in the Upload Manager screen.\nOnce a batch has been sent to the gateway for processing, it is possible to pause the batch using the [pauseBatchUpload](/docs/pausebatchupload) method, and resume the upload later using the [runBatchUpload](/docs/runbatchupload) method.\nThe following fields are available for upload:\n  * command\n  * source\n  * invoice\n  * cardholder\n  * ccnum\n  * ccexp\n  * avsstreet\n  * avszip\n  * cvc\n  * amount\n  * tax\n  * description\n  * ponum\n  * orderid\n  * custid\n  * billing_company\n  * billing_fname\n  * billing_lname\n  * billing_street\n  * billing_street2\n  * billing_city\n  * billing_state\n  * billing_country\n  * billing_zip\n  * billing_phone\n  * shipping_company\n  * shipping_fname\n  * shipping_lname\n  * shipping_street\n  * shipping_street2\n  * shipping_city\n  * shipping_state\n  * shipping_zip\n  * shipping_country\n  * shipping_phone\n  * email\n  * checknum\n  * vcrouting\n  * vcaccount\n  * vcssn\n  * vcdl\n  * vcdlstate \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Syntax\"\n}\n[/block]\nBatchUploadStatus **createBatchUpload** ( [ueSecurityToken](/docs/uesecuritytoken) Token, string FileName, boolean AutoStart, string Format, string Encoding, string Fields, string Data, boolean OverrideDuplicates )\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Arguments\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Type\",\n    \"h-1\": \"Name\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"[ueSecurityToken](/docs/uesecuritytoken)\",\n    \"0-1\": \"Token\",\n    \"0-2\": \"Merchant security token: used to identify merchant and validate transaction.\",\n    \"1-0\": \"string\",\n    \"1-1\": \"FileName\",\n    \"1-2\": \"Name of upload file. Can also be used to store a reference ID.\",\n    \"2-0\": \"boolean\",\n    \"2-1\": \"AutoStart\",\n    \"2-2\": \"If true, the batch will start running automatically. Otherwise the batch must be started manually, either using the runBatchUpload method or via the Merchant Console.\",\n    \"3-0\": \"string\",\n    \"3-1\": \"Format\",\n    \"3-2\": \"The format of the data upload. Currently supported data formats are: csv, tab and xml.\",\n    \"4-0\": \"string\",\n    \"4-1\": \"Encoding\",\n    \"4-2\": \"Data encoding method used. Supported methods include: 7bit, base64 and uuencode.\",\n    \"5-0\": \"string\",\n    \"5-1\": \"Fields\",\n    \"5-2\": \"Fields being uploaded. These fields must be listed in the same order they appear in the data\",\n    \"6-0\": \"string\",\n    \"6-1\": \"Data\",\n    \"6-2\": \"Transaction data being uploaded.\",\n    \"7-0\": \"boolean\",\n    \"7-1\": \"OverrideDuplicates\",\n    \"7-2\": \"By default, a batch will be rejected if a certain percentage of the transactions have been uploaded before. Setting this option to true will override the duplicate check.\"\n  },\n  \"cols\": 3,\n  \"rows\": 8\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Return Value\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"[BatchUploadStatus](/docs/batchuploadstatus)\",\n    \"0-1\": \"Returns the result of the batch upload.\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Examples\"\n}\n[/block]\n## PHP \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\ntry {\\n $filename=date(\\\"ymd\\\") . \\\".csv\\\";\\n $autostart=true;\\n $format=\\\"csv\\\";\\n $encoding=\\\"base64\\\";\\n $fields=array('invoice','cardholder','avsstreet','avszip','ccnum', \\\"ccexp\\\", \\\"amount\\\");\\n $data=base64_encode(file_get_contents(\\\"./upload-mini.csv\\\"));\\n $dupess=false;\\n print_r($client->createBatchUpload($token,$filename,$autostart, $format, $encoding,$fields, $data, $dupes));\\n}\\ncatch(SoapFault $e) {\\n echo $e->getMessage();\\n echo \\\"\\\\n\\\\nRequest: \\\" . $tran->__getLastRequest();\\n echo \\\"\\\\n\\\\nResponse: \\\" . $tran->__getLastResponse();\\n}\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]\n## Visual Basic (.Net) \nThis example is using Me.getSecurityToken() to build the token object. The source for this function can be found on the [ueSecurityToken](/docs/uesecuritytoken) page.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Dim service As ebizcharge.ebizchargeService = _\\n  New ebizcharge.ebizchargeService\\nDim uploaddata As String\\nuploaddata = \\\"1234,4444555566667779,0909,1.56,tester joens\\\" & _\\n  vbLf & \\\"1235,4444555566667779,0909,2.22,bob hope\\\"\\nDim res As ebizcharge.BatchUploadStatus = New ebizcharge.BatchUploadStatus\\nres = service.createBatchUpload(Me.getSecurityToken(), _\\n  \\\"test.csv\\\", _\\n  True, _\\n  \\\"csv\\\", _\\n  \\\"base64\\\", _\\n  \\\"invoice,ccnum,ccexp,amount,cardholder\\\", _\\n  Convert.ToBase64String(Encoding.Default.GetBytes(uploaddata)), _\\n  False)\\nMsgBox(\\\"New Batch #\\\" & res.UploadRefNum & \\\"  trans: \\\" & res.Remaining)\",\n      \"language\": \"c\"\n    }\n  ]\n}\n[/block]\n## C Sharp (.Net)\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"ebizcharge.BatchUploadStatus res = new ebizcharge.BatchUploadStatus();\\n           string[] fields = new string[11];\\n           fields[0] = \\\"command\\\";\\n           fields[1] = \\\"vcrouting\\\";\\n           fields[2] = \\\"vcaccount\\\";\\n           fields[3] = \\\"amount\\\";\\n           fields[4] = \\\"invoice\\\";\\n           fields[5] = \\\"cardholder\\\";\\n           fields[6] = \\\"avsstreet\\\";\\n           fields[7] = \\\"avszip\\\";\\n           fields[8] = \\\"description\\\";\\n           fields[9] = \\\"vcdl\\\";\\n           fields[10] = \\\"vcdlstate\\\";\\n           String fileContents;\\n           fileContents = System.IO.File.ReadAllText(:::at:::\\\"C:\\\\checkexample.csv\\\");\\n           try\\n           {\\n               res = client.createBatchUpload(token, \\\"checkexample.csv\\\", true, \\\"csv\\\", \\\"base64\\\", fields,\\n               Convert.ToBase64String(Encoding.Default.GetBytes(fileContents)), false);\\n               MessageBox.Show(string.Concat(\\\"New Batch #\\\", res.UploadRefNum, \\\" trans:\\\", res.Remaining));\\n           }\\n           catch (Exception err)\\n           {\\n               MessageBox.Show(err.Message);\\n           }\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n## XML \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<SOAP-ENV:Envelope xmlns:SOAP-ENV=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\"\\nxmlns:ns1=\\\"urn:ebizcharge\\\" xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\"\\nxmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\"\\nxmlns:SOAP-ENC=\\\"http://schemas.xmlsoap.org/soap/encoding/\\\"\\nSOAP-ENV:encodingStyle=\\\"http://schemas.xmlsoap.org/soap/encoding/\\\">\\n<SOAP-ENV:Body>\\n<ns1:createBatchUpload>\\n<Token xsi:type=\\\"ns1:ueSecurityToken\\\">\\n<ClientIP xsi:type=\\\"xsd:string\\\">192.168.0.1</ClientIP>\\n<PinHash xsi:type=\\\"ns1:ueHash\\\">\\n<HashValue xsi:type=\\\"xsd:string\\\">093edf9686a2ce4a7105b93610eed9d870520c36</HashValue>\\n<Seed xsi:type=\\\"xsd:string\\\">1193776851129041913</Seed>\\n<Type xsi:type=\\\"xsd:string\\\">sha1</Type>\\n</PinHash>\\n<SourceKey xsi:type=\\\"xsd:string\\\">HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey>\\n</Token>\\n<FileName xsi:type=\\\"xsd:string\\\">071030.csv</FileName>\\n<AutoStart xsi:type=\\\"xsd:boolean\\\">true</AutoStart>\\n<Format xsi:type=\\\"xsd:string\\\">csv</Format>\\n<Encoding xsi:type=\\\"xsd:string\\\">base64</Encoding>\\n<Fields SOAP-ENC:arrayType=\\\"xsd:string[7]\\\" xsi:type=\\\"ns1:stringArray\\\">\\n<item xsi:type=\\\"xsd:string\\\">invoice</item>\\n<item xsi:type=\\\"xsd:string\\\">cardholder</item>\\n<item xsi:type=\\\"xsd:string\\\">avsstreet</item>\\n<item xsi:type=\\\"xsd:string\\\">avszip</item>\\n<item xsi:type=\\\"xsd:string\\\">ccnum</item>\\n<item xsi:type=\\\"xsd:string\\\">ccexp</item>\\n<item xsi:type=\\\"xsd:string\\\">amount</item>\\n</Fields>\\n<Data xsi:type=\\\"xsd:string\\\">MjEwOTUsR3JlZyBBZGFtcywxODU5IEVsbSBTdCw3NjQwNyw0MzY1MzI3Mz\\nk3NzM3MzM3LDA5MTAsNDUuNTgNCjIxMDk2LEtyaXMgV2FzaGluZ3RvbiwzMjY4IENsaW50b24gQXZlLD\\nU0MjYyLDQ0MDgwMTEwODQ3NDg5MjcsMDMxOSwyLjkyDQoyMTA5NyxCb2IgSmFja3NvbiwyMzMyIDEwdG\\nggU3QsNTcxMzgsNDUwMTU2NTQxOTU5MDYwNywwMjE0LDU3Ljg0DQoyMTA5OCxBZGFtIEJ1c2gsNjU2MCB\\nQaW5lIFN0LDYwODI5LDQ3MjQ5MTc1NjM2NzgyMjgsMDUxMiwyMC44OQ0KMjEwOTksQ2F0aHkgSm9uZXMs\\nNDY2MyBXaWxzaGlyZSw0MjY1NSw0MTAyMTQwNDk3NzQ3ODI3LDA0MTMsNjIuOTcNCg==</Data>\\n<OverrideDuplicates xsi:nil=\\\"true\\\"/></ns1:createBatchUpload>\\n</SOAP-ENV:Body>\\n</SOAP-ENV:Envelope>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n## Java \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"try {\\n       // Create request object\\n       String FileName = \\\"ExampleFile.csv\\\";\\n       String Format = \\\"csv\\\";\\n       String Encoding = \\\"base64\\\";\\n       StringArray Fields = new StringArray();\\n               Fields.add(\\\"invoice\\\");\\n               Fields.add(\\\"cardholder\\\");\\n               Fields.add(\\\"avsstreet\\\");\\n               Fields.add(\\\"avszip\\\");\\n               Fields.add(\\\"ccnum\\\");\\n               Fields.add(\\\"ccexp\\\");\\n               Fields.add(\\\"amount\\\");\\n       String RawData = \\\"12345,John Doe,1234 Test St,54321,4000100011112224,1012,1.23\\\\n54321,Joe Test,4321 Example St,12345,4000100111112223,0313,12.34\\\";\\n       BASE64Encoder encoder = new BASE64Encoder();\\n       String Data = encoder.encodeBuffer(RawData.getBytes());    \\n       boolean AutoStart = true;\\n       boolean OverrideDuplicates = true;\\n       // Create response object\\n       BatchUploadStatus response;\\nresponse = client.createBatchUpload(token, FileName,AutoStart,Format,Encoding,Fields,Data,OverrideDuplicates);\\n       } catch (Exception e) {\\n           System.out.println(\\\"Soap Exception: \\\" + e.getMessage());\\n       }\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"createbatchupload","type":"basic","title":"createBatchUpload"}
Post a new batch of transactions to the gateway for processing. [block:api-header] { "type": "basic", "title": "Description" } [/block] This method implements the same batch upload functionality as the Batch Upload screens in the merchant console. Batches uploaded via this method will be visible in the Upload Manager screen. Once a batch has been sent to the gateway for processing, it is possible to pause the batch using the [pauseBatchUpload](/docs/pausebatchupload) method, and resume the upload later using the [runBatchUpload](/docs/runbatchupload) method. The following fields are available for upload: * command * source * invoice * cardholder * ccnum * ccexp * avsstreet * avszip * cvc * amount * tax * description * ponum * orderid * custid * billing_company * billing_fname * billing_lname * billing_street * billing_street2 * billing_city * billing_state * billing_country * billing_zip * billing_phone * shipping_company * shipping_fname * shipping_lname * shipping_street * shipping_street2 * shipping_city * shipping_state * shipping_zip * shipping_country * shipping_phone * email * checknum * vcrouting * vcaccount * vcssn * vcdl * vcdlstate [block:api-header] { "type": "basic", "title": "Syntax" } [/block] BatchUploadStatus **createBatchUpload** ( [ueSecurityToken](/docs/uesecuritytoken) Token, string FileName, boolean AutoStart, string Format, string Encoding, string Fields, string Data, boolean OverrideDuplicates ) [block:api-header] { "type": "basic", "title": "Arguments" } [/block] [block:parameters] { "data": { "h-0": "Type", "h-1": "Name", "h-2": "Description", "0-0": "[ueSecurityToken](/docs/uesecuritytoken)", "0-1": "Token", "0-2": "Merchant security token: used to identify merchant and validate transaction.", "1-0": "string", "1-1": "FileName", "1-2": "Name of upload file. Can also be used to store a reference ID.", "2-0": "boolean", "2-1": "AutoStart", "2-2": "If true, the batch will start running automatically. Otherwise the batch must be started manually, either using the runBatchUpload method or via the Merchant Console.", "3-0": "string", "3-1": "Format", "3-2": "The format of the data upload. Currently supported data formats are: csv, tab and xml.", "4-0": "string", "4-1": "Encoding", "4-2": "Data encoding method used. Supported methods include: 7bit, base64 and uuencode.", "5-0": "string", "5-1": "Fields", "5-2": "Fields being uploaded. These fields must be listed in the same order they appear in the data", "6-0": "string", "6-1": "Data", "6-2": "Transaction data being uploaded.", "7-0": "boolean", "7-1": "OverrideDuplicates", "7-2": "By default, a batch will be rejected if a certain percentage of the transactions have been uploaded before. Setting this option to true will override the duplicate check." }, "cols": 3, "rows": 8 } [/block] [block:api-header] { "type": "basic", "title": "Return Value" } [/block] [block:parameters] { "data": { "0-0": "[BatchUploadStatus](/docs/batchuploadstatus)", "0-1": "Returns the result of the batch upload." }, "cols": 2, "rows": 1 } [/block] [block:api-header] { "type": "basic", "title": "Examples" } [/block] ## PHP [block:code] { "codes": [ { "code": "<?php\ntry {\n $filename=date(\"ymd\") . \".csv\";\n $autostart=true;\n $format=\"csv\";\n $encoding=\"base64\";\n $fields=array('invoice','cardholder','avsstreet','avszip','ccnum', \"ccexp\", \"amount\");\n $data=base64_encode(file_get_contents(\"./upload-mini.csv\"));\n $dupess=false;\n print_r($client->createBatchUpload($token,$filename,$autostart, $format, $encoding,$fields, $data, $dupes));\n}\ncatch(SoapFault $e) {\n echo $e->getMessage();\n echo \"\\n\\nRequest: \" . $tran->__getLastRequest();\n echo \"\\n\\nResponse: \" . $tran->__getLastResponse();\n}\n?>", "language": "php" } ] } [/block] ## Visual Basic (.Net) This example is using Me.getSecurityToken() to build the token object. The source for this function can be found on the [ueSecurityToken](/docs/uesecuritytoken) page. [block:code] { "codes": [ { "code": "Dim service As ebizcharge.ebizchargeService = _\n New ebizcharge.ebizchargeService\nDim uploaddata As String\nuploaddata = \"1234,4444555566667779,0909,1.56,tester joens\" & _\n vbLf & \"1235,4444555566667779,0909,2.22,bob hope\"\nDim res As ebizcharge.BatchUploadStatus = New ebizcharge.BatchUploadStatus\nres = service.createBatchUpload(Me.getSecurityToken(), _\n \"test.csv\", _\n True, _\n \"csv\", _\n \"base64\", _\n \"invoice,ccnum,ccexp,amount,cardholder\", _\n Convert.ToBase64String(Encoding.Default.GetBytes(uploaddata)), _\n False)\nMsgBox(\"New Batch #\" & res.UploadRefNum & \" trans: \" & res.Remaining)", "language": "c" } ] } [/block] ## C Sharp (.Net) [block:code] { "codes": [ { "code": "ebizcharge.BatchUploadStatus res = new ebizcharge.BatchUploadStatus();\n string[] fields = new string[11];\n fields[0] = \"command\";\n fields[1] = \"vcrouting\";\n fields[2] = \"vcaccount\";\n fields[3] = \"amount\";\n fields[4] = \"invoice\";\n fields[5] = \"cardholder\";\n fields[6] = \"avsstreet\";\n fields[7] = \"avszip\";\n fields[8] = \"description\";\n fields[9] = \"vcdl\";\n fields[10] = \"vcdlstate\";\n String fileContents;\n fileContents = System.IO.File.ReadAllText(@\"C:\\checkexample.csv\");\n try\n {\n res = client.createBatchUpload(token, \"checkexample.csv\", true, \"csv\", \"base64\", fields,\n Convert.ToBase64String(Encoding.Default.GetBytes(fileContents)), false);\n MessageBox.Show(string.Concat(\"New Batch #\", res.UploadRefNum, \" trans:\", res.Remaining));\n }\n catch (Exception err)\n {\n MessageBox.Show(err.Message);\n }", "language": "csharp" } ] } [/block] ## XML [block:code] { "codes": [ { "code": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"\nxmlns:ns1=\"urn:ebizcharge\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\nxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\nxmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\"\nSOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n<SOAP-ENV:Body>\n<ns1:createBatchUpload>\n<Token xsi:type=\"ns1:ueSecurityToken\">\n<ClientIP xsi:type=\"xsd:string\">192.168.0.1</ClientIP>\n<PinHash xsi:type=\"ns1:ueHash\">\n<HashValue xsi:type=\"xsd:string\">093edf9686a2ce4a7105b93610eed9d870520c36</HashValue>\n<Seed xsi:type=\"xsd:string\">1193776851129041913</Seed>\n<Type xsi:type=\"xsd:string\">sha1</Type>\n</PinHash>\n<SourceKey xsi:type=\"xsd:string\">HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey>\n</Token>\n<FileName xsi:type=\"xsd:string\">071030.csv</FileName>\n<AutoStart xsi:type=\"xsd:boolean\">true</AutoStart>\n<Format xsi:type=\"xsd:string\">csv</Format>\n<Encoding xsi:type=\"xsd:string\">base64</Encoding>\n<Fields SOAP-ENC:arrayType=\"xsd:string[7]\" xsi:type=\"ns1:stringArray\">\n<item xsi:type=\"xsd:string\">invoice</item>\n<item xsi:type=\"xsd:string\">cardholder</item>\n<item xsi:type=\"xsd:string\">avsstreet</item>\n<item xsi:type=\"xsd:string\">avszip</item>\n<item xsi:type=\"xsd:string\">ccnum</item>\n<item xsi:type=\"xsd:string\">ccexp</item>\n<item xsi:type=\"xsd:string\">amount</item>\n</Fields>\n<Data xsi:type=\"xsd:string\">MjEwOTUsR3JlZyBBZGFtcywxODU5IEVsbSBTdCw3NjQwNyw0MzY1MzI3Mz\nk3NzM3MzM3LDA5MTAsNDUuNTgNCjIxMDk2LEtyaXMgV2FzaGluZ3RvbiwzMjY4IENsaW50b24gQXZlLD\nU0MjYyLDQ0MDgwMTEwODQ3NDg5MjcsMDMxOSwyLjkyDQoyMTA5NyxCb2IgSmFja3NvbiwyMzMyIDEwdG\nggU3QsNTcxMzgsNDUwMTU2NTQxOTU5MDYwNywwMjE0LDU3Ljg0DQoyMTA5OCxBZGFtIEJ1c2gsNjU2MCB\nQaW5lIFN0LDYwODI5LDQ3MjQ5MTc1NjM2NzgyMjgsMDUxMiwyMC44OQ0KMjEwOTksQ2F0aHkgSm9uZXMs\nNDY2MyBXaWxzaGlyZSw0MjY1NSw0MTAyMTQwNDk3NzQ3ODI3LDA0MTMsNjIuOTcNCg==</Data>\n<OverrideDuplicates xsi:nil=\"true\"/></ns1:createBatchUpload>\n</SOAP-ENV:Body>\n</SOAP-ENV:Envelope>", "language": "xml" } ] } [/block] ## Java [block:code] { "codes": [ { "code": "try {\n // Create request object\n String FileName = \"ExampleFile.csv\";\n String Format = \"csv\";\n String Encoding = \"base64\";\n StringArray Fields = new StringArray();\n Fields.add(\"invoice\");\n Fields.add(\"cardholder\");\n Fields.add(\"avsstreet\");\n Fields.add(\"avszip\");\n Fields.add(\"ccnum\");\n Fields.add(\"ccexp\");\n Fields.add(\"amount\");\n String RawData = \"12345,John Doe,1234 Test St,54321,4000100011112224,1012,1.23\\n54321,Joe Test,4321 Example St,12345,4000100111112223,0313,12.34\";\n BASE64Encoder encoder = new BASE64Encoder();\n String Data = encoder.encodeBuffer(RawData.getBytes()); \n boolean AutoStart = true;\n boolean OverrideDuplicates = true;\n // Create response object\n BatchUploadStatus response;\nresponse = client.createBatchUpload(token, FileName,AutoStart,Format,Encoding,Fields,Data,OverrideDuplicates);\n } catch (Exception e) {\n System.out.println(\"Soap Exception: \" + e.getMessage());\n }", "language": "java" } ] } [/block]