POST | /CreateCardToken |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
@DataContract
open class CreateCardTokenRequest
{
@DataMember
var Credentials:RequestorCredentials? = null
@DataMember
var SessionId:String? = null
@DataMember
var VerifyCard:Boolean? = null
}
open class RequestorCredentials
{
@Required()
var MerchantId:String? = null
@Required()
var UserName:String? = null
@Required()
var Password:String? = null
@Required()
var Version:String? = null
}
@DataContract
open class CreateCardToken : PaysecureResponseInternal()
{
@DataMember
var CardToken:String? = null
@DataMember
var CardZip:String? = null
@DataMember
var CardLast4:String? = null
@DataMember
var CardExpiration:String? = null
@DataMember
var CVN:String? = null
@DataMember
var AVS:String? = null
@DataMember
var BINResults:BINResults? = null
@DataMember
var ResponseCode:String? = null
@DataMember
var ErrorMessage:String? = null
@DataMember
var ErrorCode:String? = null
@DataMember(EmitDefaultValue=false)
var ExtendedData:ExtendedResponse? = null
}
@DataContract
open class PaysecureResponseInternal
{
@DataMember(EmitDefaultValue=false)
var Timestamps:RequestTimestamps? = null
}
@DataContract
open class RequestTimestamps
{
@DataMember(EmitDefaultValue=false)
var AppLayer:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var ParentLookup:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var RetryLookup:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var GetCardData:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var CardTokenize:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var CardEncrypt:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var DBInsert:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var BackendProcess:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var DBUpdate:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var ParentUpdate:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var Network:InOutTimes? = null
}
@DataContract
open class InOutTimes
{
}
open class BINResults
{
var BIN:String? = null
var Network:String? = null
var InternetPinDebit:Boolean? = null
var EcomEBTCash:Boolean? = null
var EcomEBTSNAP:Boolean? = null
var POSFlag:Boolean? = null
var PinlessEcommerce:Boolean? = null
var PinlessBillPay:Boolean? = null
var OnDemandPaymentCredit:Boolean? = null
var OnDemandPaymentDebit:Boolean? = null
var PinlessA2ACredit:Boolean? = null
var PinlessA2ADebit:Boolean? = null
var PinlessPrePaidLoad:Boolean? = null
var DualMessage:Boolean? = null
var Recurring:Boolean? = null
var CardVerify:Boolean? = null
var RegulatedFlag:Boolean? = null
var OTP:Boolean? = null
var POSPinlessDualMessage:Boolean? = null
var FastFunds:String? = null
var RegulatedWithFraud:Boolean? = null
var CountryCode:String? = null
var CardType:String? = null
var CardProduct:String? = null
var CardDesignation:String? = null
var CardSubCategory:String? = null
var IncrementalAuth:Boolean? = null
}
@DataContract
open class ExtendedResponse
{
@DataMember(EmitDefaultValue=false)
var CardAccountUpdater:CardAccountUpdaterDescriptor? = null
@DataMember(EmitDefaultValue=false)
var ProductId:String? = null
@DataMember(EmitDefaultValue=false)
var NetworkResponseCode:String? = null
@DataMember(EmitDefaultValue=false)
var NetworkTransactionId:String? = null
@DataMember(EmitDefaultValue=false)
var CHEmailAddrResult:String? = null
}
open class CardAccountUpdaterDescriptor
{
var CardDataType:CardInfoType? = null
var CardNumberInfo:String? = null
var ExpiryDate:String? = null
var Status:String? = null
var ErrorCode:String? = null
var CardToken:String? = null
}
enum class CardInfoType
{
CardNumber,
Token,
Track,
Emv,
Encrypted,
Dpan,
ApplePay,
GooglePay,
SamsungPay,
CpToken,
EncryptedEnhanced,
EncryptedJWE,
}
Kotlin 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>