lookupCardToken

Retrieve a card reference token by a developer assigned lookup key

Description

Typically when generating a card token, the end user is presented with a browser form by the gateway. Once the user completes the form, the user is redirected back to the developers software with the generated token. In scenarios where the developers software is not able to handle a browser redirection (or javascript hook), the developer can use the lookupCardToken method to retrieve the token after the fact.

To implement this method of retrieving the token, the developer must generate a random lookup key. When presenting the tokenization form this random lookup key should be set in the UMcardLookup variable. The same card lookup value should then be passed to the lookupCardToken method in the Lookup parameter.

If the lookup value matches multiple tokens, the most recent one will be returned. The lookupCardToken method will only match tokens created under the same merchant account.

Syntax

CreditCardToken lookupCardToken ( ueSecurityToken Token, string Lookup )

Arguments

Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
string Lookup Lookup key that was assigned during the token creation

Return Value

Type Description
CreditCardToken Returns object containing card token data (including card ref)

Examples

PHP

For directions on how to set up the WSDL link, create "$token" and "$client", go to PHP Soap How-to.

    <?php

    try {

      $Lookup = "vu8ls884kys7674s";
      $token=$client->lookupCardToken($token, $Lookup);

    }

    catch (SoapFault $e) {
      die("lookupCardToken failed :" .$e->getMessage());
    }

    ?>

XML

    <?xml version="1.0" encoding="UTF-8"?>
       <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:newtek" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
          <SOAP-ENV:Body>
             <ns1:lookupCardToken>
                <Token xsi:type="ns1:ueSecurityToken">
                   <ClientIP xsi:type="xsd:string">192.168.0.1</ClientIP>
                   <PinHash xsi:type="ns1:ueHash">
                      <HashValue xsi:type="xsd:string">f2f5838082462468fc9ab65cffde0c112c34870d</HashValue>
                      <Seed xsi:type="xsd:string">13430765681990835866</Seed>
                      <Type xsi:type="xsd:string">sha1</Type>
                   </PinHash>
                   <SourceKey xsi:type="xsd:string">_Ss7g8t6UW9b1Py6474F5Z1A8fmo22x2</SourceKey>
                </Token>
                <Lookup xsi:type="xsd:string">19217415721343076568.727</Lookup>
             </ns1:lookupCardToken>
          </SOAP-ENV:Body>
       </SOAP-ENV:Envelope>