<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to get the transaction ID when using Accept Hosted forms in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-get-the-transaction-ID-when-using-Accept-Hosted-forms/m-p/75494#M47078</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Charge credit card&lt;/P&gt;&lt;P&gt;2) Create customer profile from transaction&lt;/P&gt;&lt;P&gt;3) Create subscription from customer profile&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using webhooks in general makes me nervous because I feel like it'd be very easy for a transcation to fall through the cracks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone can offer any guidance, I'd appreciate it.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Mar 2021 23:38:58 GMT</pubDate>
    <dc:creator>dav</dc:creator>
    <dc:date>2021-03-26T23:38:58Z</dc:date>
    <item>
      <title>How to get the transaction ID when using Accept Hosted forms</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-get-the-transaction-ID-when-using-Accept-Hosted-forms/m-p/75494#M47078</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Charge credit card&lt;/P&gt;&lt;P&gt;2) Create customer profile from transaction&lt;/P&gt;&lt;P&gt;3) Create subscription from customer profile&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using webhooks in general makes me nervous because I feel like it'd be very easy for a transcation to fall through the cracks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone can offer any guidance, I'd appreciate it.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 23:38:58 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-get-the-transaction-ID-when-using-Accept-Hosted-forms/m-p/75494#M47078</guid>
      <dc:creator>dav</dc:creator>
      <dc:date>2021-03-26T23:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the transaction ID when using Accept Hosted forms</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-get-the-transaction-ID-when-using-Accept-Hosted-forms/m-p/75819#M47319</link>
      <description>&lt;P&gt;I ended up using webhooks to get the transaction # and then subsequently create the profile and subscription.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 15:39:03 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/How-to-get-the-transaction-ID-when-using-Accept-Hosted-forms/m-p/75819#M47319</guid>
      <dc:creator>dav</dc:creator>
      <dc:date>2021-04-15T15:39:03Z</dc:date>
    </item>
  </channel>
</rss>

