Polling Payment Response

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 notifications without requiring unsolicited messaging from an outside system that may be blocked by firewalls or other security features. When using a token generated through an SSO session the application determines if a transaction has been processed or updated. Initiating a polling response is done by getting the status of the token and then getting the transaction details once the token is complete. Get Token Status
  1. URL: https://online.instamed.com/providers/Forms/WebServices/SSOService.asmx
  2. Method: GetSSOTokenStatus
  3. Logic:
    • After performing SSO and loading a page to the RelayStateURL, poll https://online.instamed.com/providers/Forms/WebServices/SSOService.asmx every 10 seconds for up to 15 minutes (token expiration time limit)
    • While the token status = NEW, sleep for 10 seconds
    • If the taken status = EXPIRED, the SSO session expired before the transaction was completed
    • If the token status = USED, retrieve the payment details (see the following example)
  4. Polling can be implemented in javascript or client’s specific code.
Sample SOAP 1.1 request and response Sample SOAP 1.2 request and response Get Transaction Details
  • URL: https://online.instamed.com/payment/NVP.aspx
Request merchantID=6011000551245&storeID=001&terminalID=002&transactionAction=ViewReceipt&requestToken=false&allowPartialPayment=false&singleSignOnToken=NTJmY2Y5NmMtOTg2Yi00NDM0LTk2ZWYtZjc3OGE1OTVhN2Qz&
Response IsEMVVerifiedByPIN=false&isEMVTransaction=false&EMVCardEntryMode=Swiped&cardBrand=VISA&cardExpirationMonth=6&cardExpirationYear=2017&cardBINNumber=411111&cardHolderName= &lastFourDigits=1111&authorizationNumber=A3807B&responseCode=010&responseMessage=Partially Approved $1.00&transactionStatus=D&primaryTransactionID=0ca7530a86084b468fff132ab7f04491&authorizationText=I AGREE TO PAY THE ABOVE AMOUNT ACCORDING TO MY CARD HOLDER AGREEMENT.&transactionID=0ca7530a86084b468fff132ab7f04491&transactionDate=2016-01-15T20:37:21.5238539Z