cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction Details API - Help needed retrieving Shipping and Billing Address - C# or VB.NET

I am having difficulty understanding how to obtain the shipping and billing address from the Transaction Details API.  I used the virtual terminal of my sandbox account to produce some transactions, and I have successfully retrieved many of the transaction details, but not the shipping, billing, or email address.  I prefer VB.NET but help in C# is fine as well.  Here is a sampling of my other code:

 

        Dim gate As New ReportingGateway("APIKEY", "TRANKEY", ServiceMode.Test)
        Dim addr As New CustomerGateway(("APIKEY", "TRANKEY", ServiceMode.Test)

        Dim batches As New List(Of Batch)
        batches = gate.GetSettledBatchList(startdate, enddate)

 

        For Each item In batches

            Dim transactions As New List(Of Transaction)
            transactions = gate.GetTransactionList(batches.Item(batchitemcount).ID)

            'GET BATCH DETAILS

 

            For Each tran In transactions

 

                              Response.write(transactions.Item(trancount).BillingAddress.Street.tostring)

 

                               Dim details As Transaction
                               details = gate.GetTransactionDetails(transactions.Item(trancount).TransactionID)

                               'GET TRANSACTION DETAILS

 

                               Dim litem As LineItem

                               For Each litem In details.LineItems

                                      'GET LINE ITEM DETAILS

                               Next

           Next

      Next

 

I just can't figure out how the syntax for getting at the shipping and billing address even though it looks like they are available in the transactions section.  If I try to access them I get an "object reference not set to instance of object errors" so I'm obviously not accessing it correctly.  Any thoughts or help would be appreciated.

emlinney
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

doc on either

http://developer.authorize.net/api/transaction_details/ or http://developer.authorize.net/api/reference/

 

bill to and ship to address only available from GetTransactionDetails

View solution in original post

RaynorC1emen7
Expert
2 REPLIES 2

doc on either

http://developer.authorize.net/api/transaction_details/ or http://developer.authorize.net/api/reference/

 

bill to and ship to address only available from GetTransactionDetails

RaynorC1emen7
Expert

Thanks the little nugget at the end helped (shipping & billing only available from GetTransactionDetails).  Got me on the right path.