<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Getting transaction details in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-transaction-details/m-p/14198#M8382</link>
    <description>&lt;P&gt;&lt;EM&gt;This question was asked at &lt;A href="http://stackoverflow.com/questions/6079812/getting-transaction-details-from-authorize-net" target="_self"&gt;StackOverflow&lt;/A&gt; but did not receive an answer so I am asking it here.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm having some trouble making sense of the Transaction Details API. I'll try my best to be brief.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;The only practical way of pulling transaction status updates from authorize (without using their 'silent post' feature, which seems like a big bag of nightmares* ), is to get a batch list of settled transactions (for let's say a day) and then pull transaction lists for every settled batch. Eg:&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;public function getTransactionsForDay($month = false, $day = false, $year = false)
{
    $transactions = array();
    $month = ($month ? $month : date('m'));
    $day = ($day ? $day : date('d'));
    $year = ($year ? $year : date('Y'));
    $firstSettlementDate = substr(date('c',mktime(0, 0, 0, (int)$month, (int)$day, (int)$year)),0,-6);
    $lastSettlementDate  = substr(date('c',mktime(0, 0, 0, (int)$month, (int)$day, (int)$year)),0,-6);
    $response = $this-&amp;gt;getSettledBatchList(true, $firstSettlementDate, $lastSettlementDate);
    $batches = $response-&amp;gt;xpath("batchList/batch");
    foreach ($batches as $batch) {
        $batch_id = (string)$batch-&amp;gt;batchId;
        $request = new AuthorizeNetTD;
        $tran_list = $request-&amp;gt;getTransactionList($batch_id);
        $transactions = array_merge($transactions, $tran_list-&amp;gt;xpath("transactions/transaction"));
    }
    return $transactions;
}

   $request = new AuthorizeNetTD;
    $transactions = $request-&amp;gt;getTransactionsForDay(12, 8, 2010);
    $this-&amp;gt;assertTrue(is_array($transactions));&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yet, there's a multitude of possible transaction statuses.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;These appear to be 'final' and unchangeable:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;- communicationError&lt;/LI&gt;
&lt;LI&gt;- refundSettledSuccessfully&lt;/LI&gt;
&lt;LI&gt;- declined&lt;/LI&gt;
&lt;LI&gt;- couldNotVoid&lt;/LI&gt;
&lt;LI&gt;- expired&lt;/LI&gt;
&lt;LI&gt;- generalError&lt;/LI&gt;
&lt;LI&gt;- failedReview&lt;/LI&gt;
&lt;LI&gt;- settledSuccessfully&lt;/LI&gt;
&lt;LI&gt;- settlementError&lt;/LI&gt;
&lt;LI&gt;- voided﻿&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The following appear to be 'pending' statuses:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;- authorizedPendingCapture&lt;/LI&gt;
&lt;LI&gt;- capturedPendingSettlement&lt;/LI&gt;
&lt;LI&gt;- refundPendingSettlement&lt;/LI&gt;
&lt;LI&gt;- pendingFinalSettlement&lt;/LI&gt;
&lt;LI&gt;- pendingSettlement&lt;/LI&gt;
&lt;LI&gt;- underReview&lt;/LI&gt;
&lt;LI&gt;- updatingSettlement&lt;/LI&gt;
&lt;LI&gt;- FDSPendingReview&lt;/LI&gt;
&lt;LI&gt;- FDSAuthorizedPendingReview&lt;/LI&gt;
&lt;LI&gt;- authorizedPendingRelease&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;These, I'm not sure about:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;- returnedItem (?)&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;- chargeback (?)&lt;/LI&gt;
&lt;LI&gt;- chargebackReversal (?)&lt;/LI&gt;
&lt;LI&gt;- approvedReview (?)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The getUnsettledTransactionList just dumps the last 1000 'unsettled' transactions on your lap, including declined, error, etc -- making it pretty unreliable, not mention you have to parse that junk.&amp;nbsp;So, my questions are:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;- What's up with the last four statuses above? Should I expect those to change or not?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;- Which of these go into a 'settled' batch? &amp;nbsp;(`settlementError` AND `settledSuccessfully`? &amp;nbsp; JUST `settledSuccessfully`? )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Do recurring billing transactions ([documentation here][2]) even show up in the settled batches?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Is there really no way to pull just the 'pending' transactions from authorize, ignoring all the irrelevant `error`, `declined`, etc ones? It seems necessary for recurring billing -- because otherwise, an app (in lieu of a transaction id) has no way of knowing if there's a problem with a subscription transaction, until enough time passes that you can safely assume it should have showed up in a settled batch.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;* due to the two second timeout, fail-and-never-talk-to-you-again policy, plus having to rely on users to properly configure their settings*&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jul 2011 14:54:52 GMT</pubDate>
    <dc:creator>stymiee</dc:creator>
    <dc:date>2011-07-06T14:54:52Z</dc:date>
    <item>
      <title>Getting transaction details</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-transaction-details/m-p/14198#M8382</link>
      <description>&lt;P&gt;&lt;EM&gt;This question was asked at &lt;A href="http://stackoverflow.com/questions/6079812/getting-transaction-details-from-authorize-net" target="_self"&gt;StackOverflow&lt;/A&gt; but did not receive an answer so I am asking it here.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm having some trouble making sense of the Transaction Details API. I'll try my best to be brief.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;The only practical way of pulling transaction status updates from authorize (without using their 'silent post' feature, which seems like a big bag of nightmares* ), is to get a batch list of settled transactions (for let's say a day) and then pull transaction lists for every settled batch. Eg:&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;public function getTransactionsForDay($month = false, $day = false, $year = false)
{
    $transactions = array();
    $month = ($month ? $month : date('m'));
    $day = ($day ? $day : date('d'));
    $year = ($year ? $year : date('Y'));
    $firstSettlementDate = substr(date('c',mktime(0, 0, 0, (int)$month, (int)$day, (int)$year)),0,-6);
    $lastSettlementDate  = substr(date('c',mktime(0, 0, 0, (int)$month, (int)$day, (int)$year)),0,-6);
    $response = $this-&amp;gt;getSettledBatchList(true, $firstSettlementDate, $lastSettlementDate);
    $batches = $response-&amp;gt;xpath("batchList/batch");
    foreach ($batches as $batch) {
        $batch_id = (string)$batch-&amp;gt;batchId;
        $request = new AuthorizeNetTD;
        $tran_list = $request-&amp;gt;getTransactionList($batch_id);
        $transactions = array_merge($transactions, $tran_list-&amp;gt;xpath("transactions/transaction"));
    }
    return $transactions;
}

   $request = new AuthorizeNetTD;
    $transactions = $request-&amp;gt;getTransactionsForDay(12, 8, 2010);
    $this-&amp;gt;assertTrue(is_array($transactions));&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yet, there's a multitude of possible transaction statuses.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;These appear to be 'final' and unchangeable:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;- communicationError&lt;/LI&gt;
&lt;LI&gt;- refundSettledSuccessfully&lt;/LI&gt;
&lt;LI&gt;- declined&lt;/LI&gt;
&lt;LI&gt;- couldNotVoid&lt;/LI&gt;
&lt;LI&gt;- expired&lt;/LI&gt;
&lt;LI&gt;- generalError&lt;/LI&gt;
&lt;LI&gt;- failedReview&lt;/LI&gt;
&lt;LI&gt;- settledSuccessfully&lt;/LI&gt;
&lt;LI&gt;- settlementError&lt;/LI&gt;
&lt;LI&gt;- voided﻿&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The following appear to be 'pending' statuses:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;- authorizedPendingCapture&lt;/LI&gt;
&lt;LI&gt;- capturedPendingSettlement&lt;/LI&gt;
&lt;LI&gt;- refundPendingSettlement&lt;/LI&gt;
&lt;LI&gt;- pendingFinalSettlement&lt;/LI&gt;
&lt;LI&gt;- pendingSettlement&lt;/LI&gt;
&lt;LI&gt;- underReview&lt;/LI&gt;
&lt;LI&gt;- updatingSettlement&lt;/LI&gt;
&lt;LI&gt;- FDSPendingReview&lt;/LI&gt;
&lt;LI&gt;- FDSAuthorizedPendingReview&lt;/LI&gt;
&lt;LI&gt;- authorizedPendingRelease&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;These, I'm not sure about:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;- returnedItem (?)&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;- chargeback (?)&lt;/LI&gt;
&lt;LI&gt;- chargebackReversal (?)&lt;/LI&gt;
&lt;LI&gt;- approvedReview (?)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The getUnsettledTransactionList just dumps the last 1000 'unsettled' transactions on your lap, including declined, error, etc -- making it pretty unreliable, not mention you have to parse that junk.&amp;nbsp;So, my questions are:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;- What's up with the last four statuses above? Should I expect those to change or not?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;- Which of these go into a 'settled' batch? &amp;nbsp;(`settlementError` AND `settledSuccessfully`? &amp;nbsp; JUST `settledSuccessfully`? )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Do recurring billing transactions ([documentation here][2]) even show up in the settled batches?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Is there really no way to pull just the 'pending' transactions from authorize, ignoring all the irrelevant `error`, `declined`, etc ones? It seems necessary for recurring billing -- because otherwise, an app (in lieu of a transaction id) has no way of knowing if there's a problem with a subscription transaction, until enough time passes that you can safely assume it should have showed up in a settled batch.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;* due to the two second timeout, fail-and-never-talk-to-you-again policy, plus having to rely on users to properly configure their settings*&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2011 14:54:52 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-transaction-details/m-p/14198#M8382</guid>
      <dc:creator>stymiee</dc:creator>
      <dc:date>2011-07-06T14:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Getting transaction details</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-transaction-details/m-p/14312#M8430</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A part of the confusion with the transaction statuses is that the transaction status object is built off of a similar object that we use internally and includes ever possible transaction status in our system.&amp;nbsp; Some of these status will effectively never actually be seen by you as an external developer.&amp;nbsp; I've checked our public knowledge base and confirmed that we don't currently have a good list of all of the transaction statuses, so I'm working on creating one for you.&amp;nbsp; I'm working with our internal developers just to confirm some details on the statuses and I'll reply with that list as soon as I can.&amp;nbsp; I can answer the rest of your questions right now.&lt;EM&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Which of these go into a 'settled' batch? &amp;nbsp;(`settlementError` AND `settledSuccessfully`? &amp;nbsp; JUST `settledSuccessfully`? )﻿&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Within Authorize.Net, all transactions are moved into a batch when the transaction state is final.&amp;nbsp; This is a significant difference in the Authorize.Net definition of a batch and the definition used by most merchant services provider.&amp;nbsp; Because all of our reporting is organized into batches, it is important that all of your transactions ultimately end up in a batch.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Do recurring billing transactions ([documentation here][2]) even show up in the settled batches?﻿&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Yes, the transactions initiated by the Automated Recurring Billing (ARB) system are treated no different from any other transaction once they are created.&lt;EM&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Is there really no way to pull just the 'pending' transactions from authorize, ignoring all the irrelevant `error`, `declined`, etc ones? It seems necessary for recurring billing -- because otherwise, an app (in lieu of a transaction id) has no way of knowing if there's a problem with a subscription transaction, until enough time passes that you can safely assume it should have showed up in a settled batch. ﻿&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;There is currently no way to pull a list of only successful unsettled transactions or of pulling only transactions that are associated with a specific ARB subscription. We are aware of this limitation and have a few ideas of how to address it, but unfortunately the only 100% reliable way of checking ARB transactions programmatically is to pull the whole batch after settlement.&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2011 22:07:51 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-transaction-details/m-p/14312#M8430</guid>
      <dc:creator>Trevor</dc:creator>
      <dc:date>2011-07-08T22:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Getting transaction details</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-transaction-details/m-p/16374#M9246</link>
      <description>&lt;P&gt;I'm working towards making more of an official document for defining these fields, but I thought I would post what I have so far:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;BasicTransaction Statuses&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I don't think these statuses need any further explanation, but let me know if I'm mistaken.&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;authorizedPendingCapture&lt;/LI&gt;
&lt;LI&gt;capturedPendingSettlement&lt;/LI&gt;
&lt;LI&gt;refundPendingSettlement&lt;/LI&gt;
&lt;LI&gt;settledSuccessfully&lt;/LI&gt;
&lt;LI&gt;refundSettledSuccessfully&lt;/LI&gt;
&lt;LI&gt;voided&lt;/LI&gt;
&lt;LI&gt;expired&lt;/LI&gt;
&lt;LI&gt;declined&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Fraud Detection Suite (FDS or AFDS) Specific Responses&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Both of these statuses indicate that a transaction is pending manual review by the merchant.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;FDSPendingReview&lt;/LI&gt;
&lt;LI&gt;FDSAuthorizedPendingReview&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;eCheck Specific Responses&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;underReview - Under manual review, will be approved or declined.&lt;/LI&gt;
&lt;LI&gt;failedReview - Final status of a transaction that fails review.&lt;/LI&gt;
&lt;LI&gt;returnedItem - This will not show on an original transaction, but eCheck returns generate their own transactions with this status.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Other Errors&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;communicationError - An individual transaction was rejected by the processor.&amp;nbsp; This is a final transaction status.&lt;/LI&gt;
&lt;LI&gt;settlementError - A day's batch was rejected by the processor.&amp;nbsp; This status is &lt;EM&gt;not&lt;/EM&gt; final.&amp;nbsp; The merchant should try to recover the batch.&lt;/LI&gt;
&lt;LI&gt;General Error - This is a catch-all status for any transaction status that is not otherwise defined.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Transitional Transaction Statuses&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;These transaction statuses occur only as a transaction is taking place.&amp;nbsp; They should not be returned by the Transaction Details API.&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;couldNotVoid&lt;/LI&gt;
&lt;LI&gt;approvedReview&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Legacy Statuses&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;These transaction statuses relate to services that we have not offered for over 3 years.&amp;nbsp; Because an Authorize.Net merchant account stores only 2-3 years of history, you will not see these statuses actually returned in any normal operation.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;pendingFinalSettlement&lt;/LI&gt;
&lt;LI&gt;pendingSettlement&lt;/LI&gt;
&lt;LI&gt;updatingSettlement&lt;/LI&gt;
&lt;LI&gt;chargeback&lt;/LI&gt;
&lt;LI&gt;chargebackReversal&lt;/LI&gt;
&lt;LI&gt;authorizedPendingRelease&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2011 23:10:57 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-transaction-details/m-p/16374#M9246</guid>
      <dc:creator>Trevor</dc:creator>
      <dc:date>2011-08-19T23:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Getting transaction details</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-transaction-details/m-p/16386#M9252</link>
      <description>Thanks, Trevor. I've relayed this information to the original question asker.</description>
      <pubDate>Sun, 21 Aug 2011 01:34:36 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-transaction-details/m-p/16386#M9252</guid>
      <dc:creator>stymiee</dc:creator>
      <dc:date>2011-08-21T01:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Getting transaction details</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-transaction-details/m-p/24097#M12935</link>
      <description>&lt;P&gt;Hi Trevor,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you have a chance to create an official document after you finalized your research?&amp;nbsp; Just wondering whether you have any new info since this post...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2012 18:21:12 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Getting-transaction-details/m-p/24097#M12935</guid>
      <dc:creator>svetozar</dc:creator>
      <dc:date>2012-03-07T18:21:12Z</dc:date>
    </item>
  </channel>
</rss>

