PaySecure Pinless Web Services 2023:07:03:07

<back to all web services

TokenizeCardRequest

The following routes are available for this service:
POST/TokenizeCard
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    @DataContract
    public static class TokenizeCardRequest
    {
        @DataMember
        public RequestorCredentials Credentials = null;

        @DataMember
        public String KeyId = null;

        @DataMember
        public String EncryptedCardNumber = null;

        @DataMember
        public String Expiration = null;

        @DataMember
        public String EncryptedCVN = null;

        @DataMember
        public Avs AVS = null;

        @DataMember
        public Boolean VerifyCard = null;
        
        public RequestorCredentials getCredentials() { return Credentials; }
        public TokenizeCardRequest setCredentials(RequestorCredentials value) { this.Credentials = value; return this; }
        public String getKeyId() { return KeyId; }
        public TokenizeCardRequest setKeyId(String value) { this.KeyId = value; return this; }
        public String getEncryptedCardNumber() { return EncryptedCardNumber; }
        public TokenizeCardRequest setEncryptedCardNumber(String value) { this.EncryptedCardNumber = value; return this; }
        public String getExpiration() { return Expiration; }
        public TokenizeCardRequest setExpiration(String value) { this.Expiration = value; return this; }
        public String getEncryptedCVN() { return EncryptedCVN; }
        public TokenizeCardRequest setEncryptedCVN(String value) { this.EncryptedCVN = value; return this; }
        public Avs getAvs() { return AVS; }
        public TokenizeCardRequest setAvs(Avs value) { this.AVS = value; return this; }
        public Boolean isVerifyCard() { return VerifyCard; }
        public TokenizeCardRequest setVerifyCard(Boolean value) { this.VerifyCard = value; return this; }
    }

    public static class RequestorCredentials
    {
        @Required()
        public String MerchantId = null;

        @Required()
        public String UserName = null;

        @Required()
        public String Password = null;

        @Required()
        public String Version = null;
        
        public String getMerchantId() { return MerchantId; }
        public RequestorCredentials setMerchantId(String value) { this.MerchantId = value; return this; }
        public String getUserName() { return UserName; }
        public RequestorCredentials setUserName(String value) { this.UserName = value; return this; }
        public String getPassword() { return Password; }
        public RequestorCredentials setPassword(String value) { this.Password = value; return this; }
        public String getVersion() { return Version; }
        public RequestorCredentials setVersion(String value) { this.Version = value; return this; }
    }

    public static class Avs
    {
        public String Address = null;
        public String City = null;
        public String State = null;
        public String Zip = null;
        public String Country = null;
        public String Email = null;
        public String IPAddress = null;
        public String TelephoneNumber = null;
        public TelephoneType TelephoneType = null;
        public Integer DeliveryMethod = null;
        public String FirstName = null;
        public String MiddleName = null;
        public String LastName = null;
        
        public String getAddress() { return Address; }
        public Avs setAddress(String value) { this.Address = value; return this; }
        public String getCity() { return City; }
        public Avs setCity(String value) { this.City = value; return this; }
        public String getState() { return State; }
        public Avs setState(String value) { this.State = value; return this; }
        public String getZip() { return Zip; }
        public Avs setZip(String value) { this.Zip = value; return this; }
        public String getCountry() { return Country; }
        public Avs setCountry(String value) { this.Country = value; return this; }
        public String getEmail() { return Email; }
        public Avs setEmail(String value) { this.Email = value; return this; }
        public String getIpAddress() { return IPAddress; }
        public Avs setIpAddress(String value) { this.IPAddress = value; return this; }
        public String getTelephoneNumber() { return TelephoneNumber; }
        public Avs setTelephoneNumber(String value) { this.TelephoneNumber = value; return this; }
        public TelephoneType getTelephoneType() { return TelephoneType; }
        public Avs setTelephoneType(TelephoneType value) { this.TelephoneType = value; return this; }
        public Integer getDeliveryMethod() { return DeliveryMethod; }
        public Avs setDeliveryMethod(Integer value) { this.DeliveryMethod = value; return this; }
        public String getFirstName() { return FirstName; }
        public Avs setFirstName(String value) { this.FirstName = value; return this; }
        public String getMiddleName() { return MiddleName; }
        public Avs setMiddleName(String value) { this.MiddleName = value; return this; }
        public String getLastName() { return LastName; }
        public Avs setLastName(String value) { this.LastName = value; return this; }
    }

    public static enum TelephoneType
    {
        D,
        H,
        N,
        W;
    }

    @DataContract
    public static class TokenizeCard extends PaysecureResponseInternal
    {
        @DataMember
        public String CardToken = null;

        @DataMember
        public String CardHash = null;

        @DataMember
        public String CardLast4 = null;

        @DataMember
        public String CardBIN = null;

        @DataMember
        public String CardExpiration = null;

        @DataMember
        public String ResponseCode = null;

        @DataMember
        public String ErrorMessage = null;

        @DataMember
        public String ErrorCode = null;
        
        public String getCardToken() { return CardToken; }
        public TokenizeCard setCardToken(String value) { this.CardToken = value; return this; }
        public String getCardHash() { return CardHash; }
        public TokenizeCard setCardHash(String value) { this.CardHash = value; return this; }
        public String getCardLast4() { return CardLast4; }
        public TokenizeCard setCardLast4(String value) { this.CardLast4 = value; return this; }
        public String getCardBIN() { return CardBIN; }
        public TokenizeCard setCardBIN(String value) { this.CardBIN = value; return this; }
        public String getCardExpiration() { return CardExpiration; }
        public TokenizeCard setCardExpiration(String value) { this.CardExpiration = value; return this; }
        public String getResponseCode() { return ResponseCode; }
        public TokenizeCard setResponseCode(String value) { this.ResponseCode = value; return this; }
        public String getErrorMessage() { return ErrorMessage; }
        public TokenizeCard setErrorMessage(String value) { this.ErrorMessage = value; return this; }
        public String getErrorCode() { return ErrorCode; }
        public TokenizeCard setErrorCode(String value) { this.ErrorCode = value; return this; }
    }

    @DataContract
    public static class PaysecureResponseInternal
    {
        @DataMember(EmitDefaultValue=false)
        public RequestTimestamps Timestamps = null;
        
        public RequestTimestamps getTimestamps() { return Timestamps; }
        public PaysecureResponseInternal setTimestamps(RequestTimestamps value) { this.Timestamps = value; return this; }
    }

    @DataContract
    public static class RequestTimestamps
    {
        @DataMember(EmitDefaultValue=false)
        public InOutTimes AppLayer = null;

        @DataMember(EmitDefaultValue=false)
        public InOutTimes ParentLookup = null;

        @DataMember(EmitDefaultValue=false)
        public InOutTimes RetryLookup = null;

        @DataMember(EmitDefaultValue=false)
        public InOutTimes GetCardData = null;

        @DataMember(EmitDefaultValue=false)
        public InOutTimes CardTokenize = null;

        @DataMember(EmitDefaultValue=false)
        public InOutTimes CardEncrypt = null;

        @DataMember(EmitDefaultValue=false)
        public InOutTimes DBInsert = null;

        @DataMember(EmitDefaultValue=false)
        public InOutTimes BackendProcess = null;

        @DataMember(EmitDefaultValue=false)
        public InOutTimes DBUpdate = null;

        @DataMember(EmitDefaultValue=false)
        public InOutTimes ParentUpdate = null;

        @DataMember(EmitDefaultValue=false)
        public InOutTimes Network = null;
        
        public InOutTimes getAppLayer() { return AppLayer; }
        public RequestTimestamps setAppLayer(InOutTimes value) { this.AppLayer = value; return this; }
        public InOutTimes getParentLookup() { return ParentLookup; }
        public RequestTimestamps setParentLookup(InOutTimes value) { this.ParentLookup = value; return this; }
        public InOutTimes getRetryLookup() { return RetryLookup; }
        public RequestTimestamps setRetryLookup(InOutTimes value) { this.RetryLookup = value; return this; }
        public InOutTimes getGetCardData() { return GetCardData; }
        public RequestTimestamps setGetCardData(InOutTimes value) { this.GetCardData = value; return this; }
        public InOutTimes getCardTokenize() { return CardTokenize; }
        public RequestTimestamps setCardTokenize(InOutTimes value) { this.CardTokenize = value; return this; }
        public InOutTimes getCardEncrypt() { return CardEncrypt; }
        public RequestTimestamps setCardEncrypt(InOutTimes value) { this.CardEncrypt = value; return this; }
        public InOutTimes getDbInsert() { return DBInsert; }
        public RequestTimestamps setDbInsert(InOutTimes value) { this.DBInsert = value; return this; }
        public InOutTimes getBackendProcess() { return BackendProcess; }
        public RequestTimestamps setBackendProcess(InOutTimes value) { this.BackendProcess = value; return this; }
        public InOutTimes getDbUpdate() { return DBUpdate; }
        public RequestTimestamps setDbUpdate(InOutTimes value) { this.DBUpdate = value; return this; }
        public InOutTimes getParentUpdate() { return ParentUpdate; }
        public RequestTimestamps setParentUpdate(InOutTimes value) { this.ParentUpdate = value; return this; }
        public InOutTimes getNetwork() { return Network; }
        public RequestTimestamps setNetwork(InOutTimes value) { this.Network = value; return this; }
    }

    @DataContract
    public static class InOutTimes
    {
        
    }

}

Java TokenizeCardRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /TokenizeCard HTTP/1.1 
Host: api.paysecure.acculynk.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<TokenizeCardRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <AVS>
    <Address>String</Address>
    <City>String</City>
    <Country>String</Country>
    <DeliveryMethod>0</DeliveryMethod>
    <Email>String</Email>
    <FirstName>String</FirstName>
    <IPAddress>String</IPAddress>
    <LastName>String</LastName>
    <MiddleName>String</MiddleName>
    <State>String</State>
    <TelephoneNumber>String</TelephoneNumber>
    <TelephoneType>D</TelephoneType>
    <Zip>String</Zip>
  </AVS>
  <Credentials>
    <MerchantId>String</MerchantId>
    <Password>String</Password>
    <UserName>String</UserName>
    <Version>String</Version>
  </Credentials>
  <EncryptedCVN>String</EncryptedCVN>
  <EncryptedCardNumber>String</EncryptedCardNumber>
  <Expiration>String</Expiration>
  <KeyId>String</KeyId>
  <VerifyCard>false</VerifyCard>
</TokenizeCardRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<TokenizeCard xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Timestamps>
    <AppLayer>
      <InTime>0001-01-01T00:00:00</InTime>
      <OutTime>0001-01-01T00:00:00</OutTime>
    </AppLayer>
    <BackendProcess>
      <InTime>0001-01-01T00:00:00</InTime>
      <OutTime>0001-01-01T00:00:00</OutTime>
    </BackendProcess>
    <CardEncrypt>
      <InTime>0001-01-01T00:00:00</InTime>
      <OutTime>0001-01-01T00:00:00</OutTime>
    </CardEncrypt>
    <CardTokenize>
      <InTime>0001-01-01T00:00:00</InTime>
      <OutTime>0001-01-01T00:00:00</OutTime>
    </CardTokenize>
    <DBInsert>
      <InTime>0001-01-01T00:00:00</InTime>
      <OutTime>0001-01-01T00:00:00</OutTime>
    </DBInsert>
    <DBUpdate>
      <InTime>0001-01-01T00:00:00</InTime>
      <OutTime>0001-01-01T00:00:00</OutTime>
    </DBUpdate>
    <GetCardData>
      <InTime>0001-01-01T00:00:00</InTime>
      <OutTime>0001-01-01T00:00:00</OutTime>
    </GetCardData>
    <Network>
      <InTime>0001-01-01T00:00:00</InTime>
      <OutTime>0001-01-01T00:00:00</OutTime>
    </Network>
    <ParentLookup>
      <InTime>0001-01-01T00:00:00</InTime>
      <OutTime>0001-01-01T00:00:00</OutTime>
    </ParentLookup>
    <ParentUpdate>
      <InTime>0001-01-01T00:00:00</InTime>
      <OutTime>0001-01-01T00:00:00</OutTime>
    </ParentUpdate>
    <RetryLookup>
      <InTime>0001-01-01T00:00:00</InTime>
      <OutTime>0001-01-01T00:00:00</OutTime>
    </RetryLookup>
  </Timestamps>
  <CardBIN>String</CardBIN>
  <CardExpiration>String</CardExpiration>
  <CardHash>String</CardHash>
  <CardLast4>String</CardLast4>
  <CardToken>String</CardToken>
  <ErrorCode>String</ErrorCode>
  <ErrorMessage>String</ErrorMessage>
  <ResponseCode>String</ResponseCode>
</TokenizeCard>