cancel
Showing results for 
Search instead for 
Did you mean: 

Re: ARB Subscription IDs Available Through Transaction Details API

I was hoping someone could help me understand why Subscription ID is not returned.  I thank you all in advance.  
 
I am using https://github.com/AuthorizeNet/sdk-ruby to integrate with Auth.net.  I have a sandbox subscription ID 2343517. On March 18th, it charged $10 https://sandbox.authorize.net/UI/themes/sandbox/ARB/TransactionList.aspx?SubscrID=2343517 for an existing subscription.  
 
Here is what API returns (no Sub ID):
​{"id":"2230382467","submitted_at":"2015-03-18T09:45:10.000+00:00","status":"settledSuccessfully","account_type":"Visa","account_number":"XXXX4242","settle_amount":"10.0","customer":{"first_name":"Tanya","last_name":"Rowe"}}
Here is my code snippet:
t1 = AuthorizeNet::Reporting::Transaction.new ...
response1 = t1.get_settled_batch_list(dates here)
if response1.success?
  response1.batch_list.each do |batch|
      t2 = AuthorizeNet::Reporting::Transaction.new ...
      response2 = t2.get_transaction_list(batch.id)
      if response2.success?
        transactions = response2.transactions
        transactions.each do |t|
 
dmitrypol
Member
5 REPLIES 5

The transaction list just return basic info, use the gettransactionDetail to get all the detail

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

RaynorC1emen7
Expert
Most transactions do not have associated subscrptions.  It's crazy to loop through each transactions and make thousands of calls to Auth.net API.  
        {
            "transId": "2230382467",
            "submitTimeUTC": "2015-03-18T09:45:10Z",
            "submitTimeLocal": "2015-03-18T02:45:10",
            "transactionStatus": "settledSuccessfully",
            "firstName": "Tanya",
            "lastName": "Rowe",
            "accountType": "Visa",
            "accountNumber": "XXXX4242",
            "settleAmount": 10,
            "marketType": "eCommerce",
            "product": "Card Not Present",
            "subscription": {
                "id": 2343517,
                "payNum": 2
            },
            "hasReturnedItemsSpecified": false
        },

 

dmitrypol
Member

See reply at https://github.com/AuthorizeNet/sdk-ruby/issues/39  

 

We will get the main release gem updated in the next release.

 

Brian

not sure what updates have occurred since last response, but i'm running into an issue in which the subscription id, as returned by the transaction details api endpoint seems to be appending one or more digits to the end. how can i reliably know what the subscription id is for any given transaction detail? a valid one appears to be 8 digits (for now?) so i'm thinking about just slicing off anything beyond 8 digits.

phamdt
Member

Hi @phamdt,

 

Assuming you're still talking about the ruby sdk, that was actually fixed just a couple of weeks ago. You can see the PR here: https://github.com/AuthorizeNet/sdk-ruby/pull/129

 

A new gem will be cut soon, but in the meantime, if you're downloading the latest version right from GitHub you'll have the fixes.