cancel
Showing results for 
Search instead for 
Did you mean: 
dnsBuffaloNY
Contributor
Status: Delivered

Currently, there is no easy way to get a list of transactions for a given subscription id.  To get a list of transactions for a subscription id. I load the subscription to get the customerProfileId and payentProfileId, call getTransactionListForCustomerRequest(customerProfileId, paymentProfileId), loop over the transactions returned in the response, and evaluate if transaction.subscription.id is equal to the subsciptionId I am looking for.  Furthermore, getTransactionListForCustomerRequest() uses paging, so I may need to call that API multiple times to get the collection of transactions for a subscription.

 

I am requesting there be a new API to get a list of transactions for a subscription id.  The new method would implement the standard paging and sorting.

 

See this Community Forum Discussion

 

Thank you for your consideration.

 

12 Comments
Status changed to: Accepted
RichardH
Administrator Administrator
Administrator
 

@RichardH, what is the status on this?

@RichardH, also, getTransactionListForCustomerRequest does not seem to return ARB recurring payments.

Anurag
Administrator Administrator
Administrator

You can now pass new   <includeTransactions> flag is passed with the GetSubscription Request to get lastest 20 transactions  associated with subscription . 

 

The API documentations will be updated in coming weeks . 

damianignacio
Member
@Anurag Any update on this? is there a chance that we can also have a "paging" for this instead the latest 20, which sounds pretty arbitrary btw? Thanks!
Anurag
Administrator Administrator
Administrator

Hi @damianignacio 

 

The API reference will be updated with the details by mid Jan as per last updates from the team . 

 

You can check the XSD changes for it under https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd 

 

<xs:element name="ARBGetSubscriptionRequest">
<xs:complexType>
<xs:complexContent>
<xs:extension base="anet:ANetApiRequest">
<xs:sequence>
<xs:element name="subscriptionId" type="anet:numericString" minOccurs="1" maxOccurs="1"/>
<xs:element name="includeTransactions" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
 
 
Regarding the last 20 transactions it was mainly due to performance impact but we will be reviewing the API to add more customization based on feedback from the developers . 
 
You can also add it as a new idea in the forum.

 

Status changed to: Delivered
Anurag
Administrator Administrator
Administrator
damianignacio
Member

Thanks for the update @anuragg29!

sjordan
Member

Hello,

 

Can someone paste working example PHP code that incudes use of  includeTransactions option?

 

I and others have been trying to make use of this option and getting errors:

 

See my StackOverflow post here:

https://stackoverflow.com/questions/48411340/how-to-set-and-use-includetransactions-with-authorize-n...

 

And github issues:

https://github.com/AuthorizeNet/sdk-php/issues/280

https://github.com/AuthorizeNet/sample-code-php/issues/102

 

I would suggest the sample PHP in the documentation also be update here:

https://developer.authorize.net/api/reference/#recurring-billing-get-subscription-status

https://github.com/AuthorizeNet/sample-code-php/blob/master/RecurringBilling/get-subscription-status...

 

Thank you

edin1993
Member

I am using includeTransactions in the latest .net sdk and arbTransactions is always returned as null. Maybe only the production is changed, the testing environment always returns null. Please help