{"id":457,"date":"2017-10-12T18:36:36","date_gmt":"2017-10-12T18:36:36","guid":{"rendered":"http:\/\/devportal2.somethingbiggr.com\/?page_id=457"},"modified":"2025-11-05T10:18:48","modified_gmt":"2025-11-05T15:18:48","slug":"polling-response","status":"publish","type":"page","link":"https:\/\/developers.instamed.com\/integration\/polling-response\/","title":{"rendered":"Polling Payment Response"},"content":{"rendered":"\n<p>As an alternative to webhook, which is based on sending notifications from InstaMed to an application, applications can receive real-time notifications by polling InstaMed about a specific transaction. This allows for real-time notification without requiring unsolicited messaging from an outside system that may be blocked by firewalls and security features. Using a token generated through an SSO session, an application can determine whether a transaction has been processed or updated.<\/p>\n\n\n\n<p>Initiating a polling response is done by getting the status of the token and then getting the transaction details once the token is complete.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"get-token-status\">Get Token Status<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n\t<li>URL: https:\/\/online.instamed.com\/Forms\/WebServices\/SSOService.asmx<\/li>\n\t<li>Method: <strong>GetSSOTokenStatus<\/strong><\/li>\n\t<li>Logic:<\/li>\n\t<ul>\n\t\t<li>After performing SSO and loading a page to the RelayStateURL, poll https:\/\/online.instamed.com\/Forms\/WebServices\/SSOService.asmx every 10 seconds for up to 15 minutes (token expiration time limit)<\/li>\n\t\t<li>While the token status = NEW, sleep for 10 seconds<\/li>\n\t\t<li>If the taken status = EXPIRED, the SSO session expired before the transaction was completed<\/li>\n\t\t<li>If the token status = complete, retrieve the payment details (see the following example)<\/li>\n\t<\/ul>\n\t<li>Polling can be implemented in javascript or client\u2019s specific code.<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"get-transaction-details\">Get Transaction Details<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>URL: https:\/\/online.instamed.com\/payment\/NVP.aspx<\/li>\n<\/ul>\n\n\n\n<p><em>Example:<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Request merchantID=6011000551245&amp;storeID=001&amp;terminalID=002&amp;transactionAction=ViewReceipt&amp;requestToken=false&amp;allowPartialPayment=false&amp;singleSignOnToken=NTJmY2Y5NmMtOTg2Yi00NDM0LTk2ZWYtZjc3OGE1OTVhN2Qz&amp;\nResponse IsEMVVerifiedByPIN=false&amp;isEMVTransaction=false&amp;EMVCardEntryMode=Swiped&amp;cardBrand=VISA&amp;cardExpirationMonth=6&amp;cardExpirationYear=2017&amp;cardBINNumber=411111&amp;cardHolderName= &amp;lastFourDigits=1111&amp;authorizationNumber=A3807B&amp;responseCode=010&amp;responseMessage=Partially Approved $1.00&amp;transactionStatus=D&amp;primaryTransactionID=0ca7530a86084b468fff132ab7f04491&amp;authorizationText=I AGREE TO PAY THE ABOVE AMOUNT ACCORDING TO MY CARD HOLDER AGREEMENT.&amp;transactionID=0ca7530a86084b468fff132ab7f04491&amp;transactionDate=2016-01-15T20:37:21.5238539Z<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>As an alternative to webhook, which is based on sending notifications from InstaMed to an application, applications can receive real-time notifications by polling InstaMed about a specific transaction. This allows for real-time notification without requiring unsolicited messaging from an outside system that may be blocked by firewalls and security features. Using a token generated through &#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":19,"menu_order":60,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-457","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/developers.instamed.com\/wp-json\/wp\/v2\/pages\/457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.instamed.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/developers.instamed.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/developers.instamed.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/developers.instamed.com\/wp-json\/wp\/v2\/comments?post=457"}],"version-history":[{"count":0,"href":"https:\/\/developers.instamed.com\/wp-json\/wp\/v2\/pages\/457\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/developers.instamed.com\/wp-json\/wp\/v2\/pages\/19"}],"wp:attachment":[{"href":"https:\/\/developers.instamed.com\/wp-json\/wp\/v2\/media?parent=457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}