cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the transaction ID when using Accept Hosted forms

Hi,

 

I'm setting up a new app that uses our existing Authorize.net account. On this app, users will purchase products that need to automatically rebill every 6 months.

 

I'm using the Accept Hosted redirect method to create the transaction. I understand that in order to create a subscription, I'll have to do the following:

 

1) Charge credit card

2) Create customer profile from transaction

3) Create subscription from customer profile

 

I'm a little stuck on step 2. The Accept Hosted form doesn't return an ID, so I'm trying to figure out the best way to get it.

 

I've tried using webhooks, but this creates new problems. The webhook only sends the transaction number, so I then have to make a separate API request and then confirm if this is a transaction that needs a subscription created. (Again, not every transaction needs a subscription in this use case.) The transactions themselves don't have any unique ID that can trigger the workflow -- the only thing I can think of is to go through the line items of every transaction and do a check on a product-by-product basis.

 

Using webhooks in general makes me nervous because I feel like it'd be very easy for a transcation to fall through the cracks.

 

If there were a way to pass a custom identifier of some sort to the transcation, that would make things easier. I know the documentation suggests using key/value pairs to send custom information along with each transaction, but I'm not sure how that would help in my instance.

 

If anyone can offer any guidance, I'd appreciate it.

dav
Member
1 REPLY 1

I ended up using webhooks to get the transaction # and then subsequently create the profile and subscription.

 

In the case of webhook failure, I wrote a script that runs on a cron that fetches unsettled transactions, matches them to our invoice numbers, and then subsequently creates the profile and subscription.

 

 

dav
Member