{"_id":"5632a5e849e16d0d00122475","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"},"project":"55b933b3146ef121002158d3","user":"55b932ba8fd1a02b00f496c8","category":{"_id":"5632a5e749e16d0d00122445","project":"55b933b3146ef121002158d3","version":"5632a5e549e16d0d00122443","__v":1,"pages":["5632a5e849e16d0d00122460","5632a5e849e16d0d00122461","5632a5e849e16d0d00122462","5632a5e849e16d0d00122463","5632a5e849e16d0d00122464","5632a5e849e16d0d00122465","5632a5e849e16d0d00122466","5632a5e849e16d0d00122467","5632a5e849e16d0d00122468","5632a5e849e16d0d00122469","5632a5e849e16d0d0012246a","5632a5e849e16d0d0012246b","5632a5e849e16d0d0012246c","5632a5e849e16d0d0012246d","5632a5e849e16d0d0012246e","5632a5e849e16d0d0012246f","5632a5e849e16d0d00122470","5632a5e849e16d0d00122471","5632a5e849e16d0d00122472","5632a5e849e16d0d00122473","5632a5e849e16d0d00122474","5632a5e849e16d0d00122475","5632a5e849e16d0d00122476","5632a5e849e16d0d00122477"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-31T23:43:21.882Z","from_sync":false,"order":3,"slug":"transactions","title":"Transactions"},"githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-08-03T17:56:25.295Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":21,"body":"Pull a transaction report.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Description\"\n}\n[/block]\nThis method retrieves a report from the merchant console. Any reports, including custom reports, may be retrieved. The returned data is base 64 encoded. The format of the returned data can be HTML, comma separated (cvs), or tab separated (tab).\nNames of built-in reports are prefaced with either “CreditCard:” or “Check:” For example, to pull “Sales by Date” for credit cards, the “Report” parameter would be set to “CreditCard:Sales by Date.”\nTo pull a custom credit card or check report, prefix the name with “Custom:” or “CustomCheck:” For example, to pull a custom report titled “Recurring Declines” set the “Report” parameter to “Custom:Recurring Declines.”\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Syntax\"\n}\n[/block]\nstring **getTransactionReport** ( [ueSecurityToken](/docs/uesecuritytoken) Token, string StartDate, string EndDate, string Report, string Format )\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\": \"StartDate\",\n    \"1-2\": \"The earliest report date to retrieve.\",\n    \"2-0\": \"string\",\n    \"3-0\": \"string\",\n    \"2-1\": \"EndDate\",\n    \"2-2\": \"The latest report date to retrieve.\",\n    \"3-1\": \"Report\",\n    \"3-2\": \"Name of report to retrieve.\",\n    \"4-0\": \"string\",\n    \"4-1\": \"Format\",\n    \"4-2\": \"Format of returned report data. Possible values are: html, csv, or tab.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\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\": \"string\",\n    \"0-1\": \"Returns specified report data according to parameters set in search.\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Available Reports\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Credit Card Reports\",\n    \"h-1\": \"Credit Card Reports\",\n    \"0-0\": \"creditcard:errors by date\",\n    \"0-1\": \"Credit card transactions resulting in errors, sorted by date\",\n    \"1-0\": \"creditcard:errors by source\",\n    \"1-1\": \"Credit card transactions resulting in errors, sorted by source key\",\n    \"2-0\": \"creditcard:errors by reason\",\n    \"2-1\": \"Credit card transactions resulting in errors, sorted by reason\",\n    \"3-0\": \"creditcard:errors by user\",\n    \"3-1\": \"Credit card transactions resulting in errors, sorted by user\",\n    \"4-0\": \"creditcard:declines by date\",\n    \"4-1\": \"Credit card transactions resulting in declines, sorted by date\",\n    \"5-0\": \"creditcard:declines by source\",\n    \"5-1\": \"Credit card transactions resulting in declines, sorted by source key\",\n    \"6-0\": \"creditcard:declines by reason\",\n    \"6-1\": \"Credit card transactions resulting in declines, sorted by reason\",\n    \"7-0\": \"creditcard:declines by user\",\n    \"7-1\": \"Credit card transactions resulting in declines, sorted by user\",\n    \"8-0\": \"creditcard:sales by date\",\n    \"8-1\": \"Credit card transactions resulting in approval, sorted by date\",\n    \"9-0\": \"creditcard:sales by source\",\n    \"9-1\": \"Credit card transactions resulting in approval, sorted by source key\",\n    \"10-0\": \"creditcard:sales by reason\",\n    \"10-1\": \"Credit card transactions resulting in approval, sorted by reason\",\n    \"11-0\": \"creditcard:sales by user\",\n    \"11-1\": \"Credit card transactions resulting in approval, sorted by user\"\n  },\n  \"cols\": 2,\n  \"rows\": 12\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Check Reports\",\n    \"h-1\": \"Check Reports\",\n    \"0-0\": \"check:Deposit Report\",\n    \"0-1\": \"Check transactions sorted by estimated deposit date\",\n    \"1-0\": \"check:All Transactions by Date\",\n    \"1-1\": \"All Check transactions sorted by date (does not include errors)\",\n    \"2-0\": \"check:settled by date\",\n    \"2-1\": \"Check transactions that have been marked as settled, sorted by date\",\n    \"3-0\": \"check:settled by source\",\n    \"3-1\": \"Check transactions that have been marked as settled, sorted by source\",\n    \"4-0\": \"check:settled by users\",\n    \"4-1\": \"Check transactions that have been marked as settled, sorted by user\",\n    \"5-0\": \"check:returns by date\",\n    \"5-1\": \"Check transactions that have been marked as returned, sorted by date\",\n    \"6-0\": \"check:returns by source\",\n    \"6-1\": \"Check transactions that have been marked as returned, sorted by source\",\n    \"7-0\": \"check:returns by reason\",\n    \"7-1\": \"Check transactions that have been marked as returned, sorted by reason\",\n    \"8-0\": \"check:returns by user\",\n    \"8-1\": \"Check transactions that have been marked as returned, sorted by user\",\n    \"9-0\": \"check:declines by date\",\n    \"9-1\": \"Check transactions were rejected by check processor, sorted by date\",\n    \"10-0\": \"check:declines by source\",\n    \"10-1\": \"Check transactions were rejected by check processor, sorted by sourcekey\",\n    \"11-0\": \"check:declines by reason\",\n    \"11-1\": \"Check transactions were rejected by check processor, sorted by reason\",\n    \"12-0\": \"check:declines by user\",\n    \"12-1\": \"Check transactions were rejected by check processor, sorted by user\"\n  },\n  \"cols\": 2,\n  \"rows\": 13\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 $StartDate='2007/01/01';\\n $EndDate='2007/04/10';\\n $Format='csv';\\n $Report='CreditCard:Errors By Date';\\n $res=$client->getTransactionReport($token, $StartDate, $EndDate, $Report, $Format);  \\n $data=base64_decode($res);\\n print_r($data);\\n}\\ncatch (SoapFault $e) {\\n die(\\\"Get Transaction failed :\\\" .$e->getMessage());\\n }\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]\n## Java \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"try {\\n String StartDate = \\\"2009/01/01\\\";\\n String EndDate = \\\"2009/09/09\\\";\\n String Format = \\\"html\\\";\\n String Report = \\\"CreditCard:Errors By Date\\\";\\n String response = client.getTransactionReport(token, StartDate, EndDate, Report, Format);\\n BASE64Decoder decoder = new BASE64Decoder();\\n byte[] decodedBytes = decoder.decodeBuffer(response);\\n String report = new String(decodedBytes);\\n System.out.println(report);\\n} catch (Exception e) {\\n   System.out.println(\\\"Soap Exception: \\\" + e.getMessage());\\n}\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n## Visual Basic (.Net) \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Dim start As String\\n       start = \\\"2010-08-01\\\"\\n       Dim endd As String\\n       endd = \\\"2010-08-09\\\"\\n       Dim format As String\\n       format = \\\"html\\\"\\n       Dim report As String\\n       report = \\\"CreditCard:Sales By Date\\\"\\n       Dim response As String\\n       response = client.getTransactionReport(token, start, endd, report, format)\\n       Dim decbuff() As Byte\\n       decbuff = Convert.FromBase64String(response)\\n       MsgBox(Encoding.UTF8.GetString(decbuff))\",\n      \"language\": \"c\"\n    }\n  ]\n}\n[/block]\n## C Sharp (.Net)\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"string start = \\\"2010-08-01\\\";\\n           string end = \\\"2010-08-09\\\";\\n           string format = \\\"html\\\";\\n           string report = \\\"CreditCard:Sales By Date\\\";\\n           try\\n           {\\n               string response = client.getTransactionReport(token, start, end, report, format);\\n               byte[] decbuff = Convert.FromBase64String(response);\\n               MessageBox.Show(Encoding.UTF8.GetString(decbuff));\\n           }\\n           catch (Exception err)\\n           {\\n               MessageBox.Show(err.Message);\\n           }\\n\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"gettransactionreport","type":"basic","title":"getTransactionReport"}

getTransactionReport


Pull a transaction report. [block:api-header] { "type": "basic", "title": "Description" } [/block] This method retrieves a report from the merchant console. Any reports, including custom reports, may be retrieved. The returned data is base 64 encoded. The format of the returned data can be HTML, comma separated (cvs), or tab separated (tab). Names of built-in reports are prefaced with either “CreditCard:” or “Check:” For example, to pull “Sales by Date” for credit cards, the “Report” parameter would be set to “CreditCard:Sales by Date.” To pull a custom credit card or check report, prefix the name with “Custom:” or “CustomCheck:” For example, to pull a custom report titled “Recurring Declines” set the “Report” parameter to “Custom:Recurring Declines.” [block:api-header] { "type": "basic", "title": "Syntax" } [/block] string **getTransactionReport** ( [ueSecurityToken](/docs/uesecuritytoken) Token, string StartDate, string EndDate, string Report, string Format ) [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": "StartDate", "1-2": "The earliest report date to retrieve.", "2-0": "string", "3-0": "string", "2-1": "EndDate", "2-2": "The latest report date to retrieve.", "3-1": "Report", "3-2": "Name of report to retrieve.", "4-0": "string", "4-1": "Format", "4-2": "Format of returned report data. Possible values are: html, csv, or tab." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Return Value" } [/block] [block:parameters] { "data": { "0-0": "string", "0-1": "Returns specified report data according to parameters set in search." }, "cols": 2, "rows": 1 } [/block] [block:api-header] { "type": "basic", "title": "Available Reports" } [/block] [block:parameters] { "data": { "h-0": "Credit Card Reports", "h-1": "Credit Card Reports", "0-0": "creditcard:errors by date", "0-1": "Credit card transactions resulting in errors, sorted by date", "1-0": "creditcard:errors by source", "1-1": "Credit card transactions resulting in errors, sorted by source key", "2-0": "creditcard:errors by reason", "2-1": "Credit card transactions resulting in errors, sorted by reason", "3-0": "creditcard:errors by user", "3-1": "Credit card transactions resulting in errors, sorted by user", "4-0": "creditcard:declines by date", "4-1": "Credit card transactions resulting in declines, sorted by date", "5-0": "creditcard:declines by source", "5-1": "Credit card transactions resulting in declines, sorted by source key", "6-0": "creditcard:declines by reason", "6-1": "Credit card transactions resulting in declines, sorted by reason", "7-0": "creditcard:declines by user", "7-1": "Credit card transactions resulting in declines, sorted by user", "8-0": "creditcard:sales by date", "8-1": "Credit card transactions resulting in approval, sorted by date", "9-0": "creditcard:sales by source", "9-1": "Credit card transactions resulting in approval, sorted by source key", "10-0": "creditcard:sales by reason", "10-1": "Credit card transactions resulting in approval, sorted by reason", "11-0": "creditcard:sales by user", "11-1": "Credit card transactions resulting in approval, sorted by user" }, "cols": 2, "rows": 12 } [/block] [block:parameters] { "data": { "h-0": "Check Reports", "h-1": "Check Reports", "0-0": "check:Deposit Report", "0-1": "Check transactions sorted by estimated deposit date", "1-0": "check:All Transactions by Date", "1-1": "All Check transactions sorted by date (does not include errors)", "2-0": "check:settled by date", "2-1": "Check transactions that have been marked as settled, sorted by date", "3-0": "check:settled by source", "3-1": "Check transactions that have been marked as settled, sorted by source", "4-0": "check:settled by users", "4-1": "Check transactions that have been marked as settled, sorted by user", "5-0": "check:returns by date", "5-1": "Check transactions that have been marked as returned, sorted by date", "6-0": "check:returns by source", "6-1": "Check transactions that have been marked as returned, sorted by source", "7-0": "check:returns by reason", "7-1": "Check transactions that have been marked as returned, sorted by reason", "8-0": "check:returns by user", "8-1": "Check transactions that have been marked as returned, sorted by user", "9-0": "check:declines by date", "9-1": "Check transactions were rejected by check processor, sorted by date", "10-0": "check:declines by source", "10-1": "Check transactions were rejected by check processor, sorted by sourcekey", "11-0": "check:declines by reason", "11-1": "Check transactions were rejected by check processor, sorted by reason", "12-0": "check:declines by user", "12-1": "Check transactions were rejected by check processor, sorted by user" }, "cols": 2, "rows": 13 } [/block] [block:api-header] { "type": "basic", "title": "Examples" } [/block] ## PHP [block:code] { "codes": [ { "code": "<?php\ntry {\n $StartDate='2007/01/01';\n $EndDate='2007/04/10';\n $Format='csv';\n $Report='CreditCard:Errors By Date';\n $res=$client->getTransactionReport($token, $StartDate, $EndDate, $Report, $Format); \n $data=base64_decode($res);\n print_r($data);\n}\ncatch (SoapFault $e) {\n die(\"Get Transaction failed :\" .$e->getMessage());\n }\n?>", "language": "php" } ] } [/block] ## Java [block:code] { "codes": [ { "code": "try {\n String StartDate = \"2009/01/01\";\n String EndDate = \"2009/09/09\";\n String Format = \"html\";\n String Report = \"CreditCard:Errors By Date\";\n String response = client.getTransactionReport(token, StartDate, EndDate, Report, Format);\n BASE64Decoder decoder = new BASE64Decoder();\n byte[] decodedBytes = decoder.decodeBuffer(response);\n String report = new String(decodedBytes);\n System.out.println(report);\n} catch (Exception e) {\n System.out.println(\"Soap Exception: \" + e.getMessage());\n}", "language": "java" } ] } [/block] ## Visual Basic (.Net) [block:code] { "codes": [ { "code": "Dim start As String\n start = \"2010-08-01\"\n Dim endd As String\n endd = \"2010-08-09\"\n Dim format As String\n format = \"html\"\n Dim report As String\n report = \"CreditCard:Sales By Date\"\n Dim response As String\n response = client.getTransactionReport(token, start, endd, report, format)\n Dim decbuff() As Byte\n decbuff = Convert.FromBase64String(response)\n MsgBox(Encoding.UTF8.GetString(decbuff))", "language": "c" } ] } [/block] ## C Sharp (.Net) [block:code] { "codes": [ { "code": "string start = \"2010-08-01\";\n string end = \"2010-08-09\";\n string format = \"html\";\n string report = \"CreditCard:Sales By Date\";\n try\n {\n string response = client.getTransactionReport(token, start, end, report, format);\n byte[] decbuff = Convert.FromBase64String(response);\n MessageBox.Show(Encoding.UTF8.GetString(decbuff));\n }\n catch (Exception err)\n {\n MessageBox.Show(err.Message);\n }\n", "language": "csharp" } ] } [/block]