Retrieving transaction information from authorize.net

I am having some problems understanding the authorization.net transaction API API ( here ). I will try my best to be brief.

The only practical way to get transaction status updates out of authorization (without using your “silent recording” feature, which seems like a big bag of nightmares *) is to get a list of lots of allowed transactions (let’s say, day), and then pull out the lists of transactions for each installed party. For instance:

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->getSettledBatchList(true, $firstSettlementDate, $lastSettlementDate); $batches = $response->xpath("batchList/batch"); foreach ($batches as $batch) { $batch_id = (string)$batch->batchId; $request = new AuthorizeNetTD; $tran_list = $request->getTransactionList($batch_id); $transactions = array_merge($transactions, $tran_list->xpath("transactions/transaction")); } return $transactions; } $request = new AuthorizeNetTD; $transactions = $request->getTransactionsForDay(12, 8, 2010); $this->assertTrue(is_array($transactions)); 

However, there are many possible transactional states.

They seem to be "final" and immutable:

  • communicationError
  • refundSettledSuccessfully
  • decreased
  • couldNotVoid
  • expired
  • generalError
  • failedReview
  • settledSuccessfully
  • settlementError
  • canceled

The following are pending statuses:

  • authorizedPendingCapture
  • capturedPendingSettlement
  • refundPendingSettlement
  • pendingFinalSettlement
  • pendingSettlement
  • underReview
  • updatingSettlement
  • FDSPendingReview
  • FDSAuthorizedPendingReview
  • authorizedPendingRelease

These, I'm not sure:

  • returnItem (?)
  • chargeback (?)
  • chargebackReversal (?)
  • approvedReview (?)

GetUnsettledTransactionList just flushes the last 1000 "unresolved" transactions on your circle, including rejected, errors, etc., which makes it rather unreliable, not to mention the fact that you need to parse this garbage.

So my questions are:

  • What happens to the last four statuses above? Should I expect those to change or not?

  • Which one is part of the "settled" party? ( settlementError AND settledSuccessfully ? JUST settledSuccessfully ?)

  • Are recurring billing transactions ( documentation here ) even displayed in settled batches?

  • Is there no way to pull only "pending" transactions from authorization, ignoring all irrelevant error , declined , etc.? This seems to be necessary for billing again, because otherwise the application (instead of the transaction identifier) ​​has no way to find out if there is a problem with the subscription transaction until enough time has passed so that you can safely assume that it should was to appear in the settlement party.

* because of the two secondary policies "time out", "refusal and never talk to you", plus the need to rely on users to properly configure their settings.

+6
source share
1 answer

I received a response from Authorize.net. There he is:


Part of the confusion with transaction statuses is that the transaction status object is built from a similar object that we use internally and includes all possible transaction status in our system. Some of these statuses will in fact never be considered by you as an external developer. I checked our public knowledge base and confirmed that we currently do not have a good list of all transaction statuses, so I am working on creating one of them for you. I work with our internal developers to confirm some status details, and as soon as I can, I will respond with this list. I can answer your other questions right now.

Which of them is part of the "settled" party? ( settlementError AND settledSuccessfully ? JUST settledSuccessfully ?)

Inside Authorize.Net, all transactions are transferred to the batch when the transaction status is final. This is a significant difference in the definition of Authorize.Net authorization and the definition used by most trading service providers. Since all our reporting is organized in packages, it is important that all your transactions end up in the package.

Do recurring billing transactions ([documentation here] [2]) even show in settled batches?

Yes, transactions initiated by the Automated Rebilling (ARB) system are processed just like any other transaction after they have been created.

Is there no way to pull only “pending” transactions from allow, ignoring all the inappropriate error , declined , etc.? This seems necessary for repeated billing - because otherwise the application (instead of the transaction identifier) ​​has no way to find out if there are problems with the subscription transaction until enough time has passed you can safely assume that it should have appeared in an established batch.

There is currently no way to pull only the list of successful unsolved transactions or pull only the transactions associated with a specific ARB subscription. We know about this restriction and have several ideas on how to solve it, but, unfortunately, the only reliable way to verify ARB transactions by 100% is to pull out the entire batch after settlement.

I am working on creating an official document to define these fields, but I thought I would post what I still have:

Basic Transaction Status
I do not think these statuses need further explanation, but let me know if I am wrong.
- authorized request - captPendingSettlement
- refundPendingSettlement
- settled successfully | - money back successfully - voided
- expired
- rejected

Fraud Detection Kit (FDS or AFDS)
Both of these statuses indicate that the transaction is pending manual review by the seller.
- FDSPendingReview
- FDSAuthorizedPendingReview

eCheck Special Answers
- underReview - Under a manual review, it will be approved or rejected.
- failedReview - the final status of a transaction that does not pass verification.
- returnItem - this will not appear in the original transaction, but eCheck returns its own transactions with this status.

Other bugs
- communicationError - a single transaction was rejected by the processor. This is the final transaction status.
- calculation Error - the processor was rejected for a day. This status is not final. The merchant should try to restore the party.
- General mistake. This is the status for all transaction statuses that are not otherwise defined.

Transitional Transaction Status
These transaction statuses occur only as the transaction is completed. They should not be returned by the transaction API.
- couldNotVoid
- approvedReview

Deprecated Statuses
These transaction statuses refer to services that we have not offered for more than 3 years. Since the seller account Authorize.Net only stores 2-3 years of history, you will not see these statuses that are actually returned in any normal operation.
- pendingFinalSettlement
- pendingSettlement
- updateSettlement
- chargeback
- chargebackReversal
- authorizedPendingRelease

+7
source

Source: https://habr.com/ru/post/888685/


All Articles