Subscription Transactions?

Status: Delivered
by dnsBuffaloNY on ‎04-12-2017 01:15 PM

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.

 

Comments
by Administrator Administrator
on ‎06-15-2017 02:25 PM
Status changed to: Accepted
 
by seskandaryan87
on ‎08-16-2017 09:56 AM

@RichardH, what is the status on this?

by seskandaryan87
on ‎08-16-2017 09:58 AM

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

by Administrator Administrator
on ‎12-04-2017 10:07 PM

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 . 

by damianignacio
on ‎01-06-2018 03:14 PM
@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!
by Administrator Administrator
on ‎01-06-2018 10:26 PM

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.

 

by Administrator Administrator
on ‎01-08-2018 09:33 AM
by damianignacio
on ‎01-09-2018 06:33 AM

Thanks for the update @anuragg29!

by sjordan
on ‎01-26-2018 04:21 PM

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