POST | /CreateCardToken |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@DataContract
public static class CreateCardTokenRequest
{
@DataMember
public RequestorCredentials Credentials = null;
@DataMember
public String SessionId = null;
@DataMember
public Boolean VerifyCard = null;
public RequestorCredentials getCredentials() { return Credentials; }
public CreateCardTokenRequest setCredentials(RequestorCredentials value) { this.Credentials = value; return this; }
public String getSessionId() { return SessionId; }
public CreateCardTokenRequest setSessionId(String value) { this.SessionId = value; return this; }
public Boolean isVerifyCard() { return VerifyCard; }
public CreateCardTokenRequest 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; }
}
@DataContract
public static class CreateCardToken extends PaysecureResponseInternal
{
@DataMember
public String CardToken = null;
@DataMember
public String CardZip = null;
@DataMember
public String CardLast4 = null;
@DataMember
public String CardExpiration = null;
@DataMember
public String CVN = null;
@DataMember
public String AVS = null;
@DataMember
public BINResults BINResults = null;
@DataMember
public String ResponseCode = null;
@DataMember
public String ErrorMessage = null;
@DataMember
public String ErrorCode = null;
@DataMember(EmitDefaultValue=false)
public ExtendedResponse ExtendedData = null;
public String getCardToken() { return CardToken; }
public CreateCardToken setCardToken(String value) { this.CardToken = value; return this; }
public String getCardZip() { return CardZip; }
public CreateCardToken setCardZip(String value) { this.CardZip = value; return this; }
public String getCardLast4() { return CardLast4; }
public CreateCardToken setCardLast4(String value) { this.CardLast4 = value; return this; }
public String getCardExpiration() { return CardExpiration; }
public CreateCardToken setCardExpiration(String value) { this.CardExpiration = value; return this; }
public String getCvn() { return CVN; }
public CreateCardToken setCvn(String value) { this.CVN = value; return this; }
public String getAvs() { return AVS; }
public CreateCardToken setAvs(String value) { this.AVS = value; return this; }
public BINResults getBinResults() { return BINResults; }
public CreateCardToken setBinResults(BINResults value) { this.BINResults = value; return this; }
public String getResponseCode() { return ResponseCode; }
public CreateCardToken setResponseCode(String value) { this.ResponseCode = value; return this; }
public String getErrorMessage() { return ErrorMessage; }
public CreateCardToken setErrorMessage(String value) { this.ErrorMessage = value; return this; }
public String getErrorCode() { return ErrorCode; }
public CreateCardToken setErrorCode(String value) { this.ErrorCode = value; return this; }
public ExtendedResponse getExtendedData() { return ExtendedData; }
public CreateCardToken setExtendedData(ExtendedResponse value) { this.ExtendedData = 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
{
}
public static class BINResults
{
public String BIN = null;
public String Network = null;
public Boolean InternetPinDebit = null;
public Boolean EcomEBTCash = null;
public Boolean EcomEBTSNAP = null;
public Boolean POSFlag = null;
public Boolean PinlessEcommerce = null;
public Boolean PinlessBillPay = null;
public Boolean OnDemandPaymentCredit = null;
public Boolean OnDemandPaymentDebit = null;
public Boolean PinlessA2ACredit = null;
public Boolean PinlessA2ADebit = null;
public Boolean PinlessPrePaidLoad = null;
public Boolean DualMessage = null;
public Boolean Recurring = null;
public Boolean CardVerify = null;
public Boolean RegulatedFlag = null;
public Boolean OTP = null;
public Boolean POSPinlessDualMessage = null;
public String FastFunds = null;
public Boolean RegulatedWithFraud = null;
public String CountryCode = null;
public String CardType = null;
public String CardProduct = null;
public String CardDesignation = null;
public String CardSubCategory = null;
public Boolean IncrementalAuth = null;
public String getBin() { return BIN; }
public BINResults setBin(String value) { this.BIN = value; return this; }
public String getNetwork() { return Network; }
public BINResults setNetwork(String value) { this.Network = value; return this; }
public Boolean isInternetPinDebit() { return InternetPinDebit; }
public BINResults setInternetPinDebit(Boolean value) { this.InternetPinDebit = value; return this; }
public Boolean isEcomEBTCash() { return EcomEBTCash; }
public BINResults setEcomEBTCash(Boolean value) { this.EcomEBTCash = value; return this; }
public Boolean isEcomEBTSNAP() { return EcomEBTSNAP; }
public BINResults setEcomEBTSNAP(Boolean value) { this.EcomEBTSNAP = value; return this; }
public Boolean isPosFlag() { return POSFlag; }
public BINResults setPosFlag(Boolean value) { this.POSFlag = value; return this; }
public Boolean isPinlessEcommerce() { return PinlessEcommerce; }
public BINResults setPinlessEcommerce(Boolean value) { this.PinlessEcommerce = value; return this; }
public Boolean isPinlessBillPay() { return PinlessBillPay; }
public BINResults setPinlessBillPay(Boolean value) { this.PinlessBillPay = value; return this; }
public Boolean isOnDemandPaymentCredit() { return OnDemandPaymentCredit; }
public BINResults setOnDemandPaymentCredit(Boolean value) { this.OnDemandPaymentCredit = value; return this; }
public Boolean isOnDemandPaymentDebit() { return OnDemandPaymentDebit; }
public BINResults setOnDemandPaymentDebit(Boolean value) { this.OnDemandPaymentDebit = value; return this; }
public Boolean isPinlessA2ACredit() { return PinlessA2ACredit; }
public BINResults setPinlessA2ACredit(Boolean value) { this.PinlessA2ACredit = value; return this; }
public Boolean isPinlessA2ADebit() { return PinlessA2ADebit; }
public BINResults setPinlessA2ADebit(Boolean value) { this.PinlessA2ADebit = value; return this; }
public Boolean isPinlessPrePaidLoad() { return PinlessPrePaidLoad; }
public BINResults setPinlessPrePaidLoad(Boolean value) { this.PinlessPrePaidLoad = value; return this; }
public Boolean isDualMessage() { return DualMessage; }
public BINResults setDualMessage(Boolean value) { this.DualMessage = value; return this; }
public Boolean isRecurring() { return Recurring; }
public BINResults setRecurring(Boolean value) { this.Recurring = value; return this; }
public Boolean isCardVerify() { return CardVerify; }
public BINResults setCardVerify(Boolean value) { this.CardVerify = value; return this; }
public Boolean isRegulatedFlag() { return RegulatedFlag; }
public BINResults setRegulatedFlag(Boolean value) { this.RegulatedFlag = value; return this; }
public Boolean isOtp() { return OTP; }
public BINResults setOtp(Boolean value) { this.OTP = value; return this; }
public Boolean isPosPinlessDualMessage() { return POSPinlessDualMessage; }
public BINResults setPosPinlessDualMessage(Boolean value) { this.POSPinlessDualMessage = value; return this; }
public String getFastFunds() { return FastFunds; }
public BINResults setFastFunds(String value) { this.FastFunds = value; return this; }
public Boolean isRegulatedWithFraud() { return RegulatedWithFraud; }
public BINResults setRegulatedWithFraud(Boolean value) { this.RegulatedWithFraud = value; return this; }
public String getCountryCode() { return CountryCode; }
public BINResults setCountryCode(String value) { this.CountryCode = value; return this; }
public String getCardType() { return CardType; }
public BINResults setCardType(String value) { this.CardType = value; return this; }
public String getCardProduct() { return CardProduct; }
public BINResults setCardProduct(String value) { this.CardProduct = value; return this; }
public String getCardDesignation() { return CardDesignation; }
public BINResults setCardDesignation(String value) { this.CardDesignation = value; return this; }
public String getCardSubCategory() { return CardSubCategory; }
public BINResults setCardSubCategory(String value) { this.CardSubCategory = value; return this; }
public Boolean isIncrementalAuth() { return IncrementalAuth; }
public BINResults setIncrementalAuth(Boolean value) { this.IncrementalAuth = value; return this; }
}
@DataContract
public static class ExtendedResponse
{
@DataMember(EmitDefaultValue=false)
public CardAccountUpdaterDescriptor CardAccountUpdater = null;
@DataMember(EmitDefaultValue=false)
public String ProductId = null;
@DataMember(EmitDefaultValue=false)
public String NetworkResponseCode = null;
@DataMember(EmitDefaultValue=false)
public String NetworkTransactionId = null;
@DataMember(EmitDefaultValue=false)
public String CHEmailAddrResult = null;
public CardAccountUpdaterDescriptor getCardAccountUpdater() { return CardAccountUpdater; }
public ExtendedResponse setCardAccountUpdater(CardAccountUpdaterDescriptor value) { this.CardAccountUpdater = value; return this; }
public String getProductId() { return ProductId; }
public ExtendedResponse setProductId(String value) { this.ProductId = value; return this; }
public String getNetworkResponseCode() { return NetworkResponseCode; }
public ExtendedResponse setNetworkResponseCode(String value) { this.NetworkResponseCode = value; return this; }
public String getNetworkTransactionId() { return NetworkTransactionId; }
public ExtendedResponse setNetworkTransactionId(String value) { this.NetworkTransactionId = value; return this; }
public String getChEmailAddrResult() { return CHEmailAddrResult; }
public ExtendedResponse setChEmailAddrResult(String value) { this.CHEmailAddrResult = value; return this; }
}
public static class CardAccountUpdaterDescriptor
{
public CardInfoType CardDataType = null;
public String CardNumberInfo = null;
public String ExpiryDate = null;
public String Status = null;
public String ErrorCode = null;
public String CardToken = null;
public CardInfoType getCardDataType() { return CardDataType; }
public CardAccountUpdaterDescriptor setCardDataType(CardInfoType value) { this.CardDataType = value; return this; }
public String getCardNumberInfo() { return CardNumberInfo; }
public CardAccountUpdaterDescriptor setCardNumberInfo(String value) { this.CardNumberInfo = value; return this; }
public String getExpiryDate() { return ExpiryDate; }
public CardAccountUpdaterDescriptor setExpiryDate(String value) { this.ExpiryDate = value; return this; }
public String getStatus() { return Status; }
public CardAccountUpdaterDescriptor setStatus(String value) { this.Status = value; return this; }
public String getErrorCode() { return ErrorCode; }
public CardAccountUpdaterDescriptor setErrorCode(String value) { this.ErrorCode = value; return this; }
public String getCardToken() { return CardToken; }
public CardAccountUpdaterDescriptor setCardToken(String value) { this.CardToken = value; return this; }
}
public static enum CardInfoType
{
CardNumber,
Token,
Track,
Emv,
Encrypted,
Dpan,
ApplePay,
GooglePay,
SamsungPay,
CpToken,
EncryptedEnhanced,
EncryptedJWE;
}
}
Java CreateCardTokenRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /CreateCardToken HTTP/1.1
Host: api.paysecure.acculynk.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateCardTokenRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
<Credentials>
<MerchantId>String</MerchantId>
<Password>String</Password>
<UserName>String</UserName>
<Version>String</Version>
</Credentials>
<SessionId>String</SessionId>
<VerifyCard>false</VerifyCard>
</CreateCardTokenRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CreateCardToken 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> <AVS>String</AVS> <BINResults> <BIN>String</BIN> <CardDesignation>String</CardDesignation> <CardProduct>String</CardProduct> <CardSubCategory>String</CardSubCategory> <CardType>String</CardType> <CardVerify>false</CardVerify> <CountryCode>String</CountryCode> <DualMessage>false</DualMessage> <EcomEBTCash>false</EcomEBTCash> <EcomEBTSNAP>false</EcomEBTSNAP> <FastFunds>String</FastFunds> <IncrementalAuth>false</IncrementalAuth> <InternetPinDebit>false</InternetPinDebit> <Network>String</Network> <OTP>false</OTP> <OnDemandPaymentCredit>false</OnDemandPaymentCredit> <OnDemandPaymentDebit>false</OnDemandPaymentDebit> <POSFlag>false</POSFlag> <POSPinlessDualMessage>false</POSPinlessDualMessage> <PinlessA2ACredit>false</PinlessA2ACredit> <PinlessA2ADebit>false</PinlessA2ADebit> <PinlessBillPay>false</PinlessBillPay> <PinlessEcommerce>false</PinlessEcommerce> <PinlessPrePaidLoad>false</PinlessPrePaidLoad> <Recurring>false</Recurring> <RegulatedFlag>false</RegulatedFlag> <RegulatedWithFraud>false</RegulatedWithFraud> </BINResults> <CVN>String</CVN> <CardExpiration>String</CardExpiration> <CardLast4>String</CardLast4> <CardToken>String</CardToken> <CardZip>String</CardZip> <ErrorCode>String</ErrorCode> <ErrorMessage>String</ErrorMessage> <ExtendedData> <CHEmailAddrResult>String</CHEmailAddrResult> <CardAccountUpdater> <CardDataType>CardNumber</CardDataType> <CardNumberInfo>String</CardNumberInfo> <CardToken>String</CardToken> <ErrorCode>String</ErrorCode> <ExpiryDate>String</ExpiryDate> <Status>String</Status> </CardAccountUpdater> <NetworkResponseCode>String</NetworkResponseCode> <NetworkTransactionId>String</NetworkTransactionId> <ProductId>String</ProductId> </ExtendedData> <ResponseCode>String</ResponseCode> </CreateCardToken>