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 .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Credentials:
{
MerchantId: String,
UserName: String,
Password: String,
Version: String
},
SessionId: String,
VerifyCard: False
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { CardToken: String, CardZip: String, CardLast4: String, CardExpiration: String, CVN: String, AVS: String, BINResults: { BIN: String, Network: String, InternetPinDebit: False, EcomEBTCash: False, EcomEBTSNAP: False, POSFlag: False, PinlessEcommerce: False, PinlessBillPay: False, OnDemandPaymentCredit: False, OnDemandPaymentDebit: False, PinlessA2ACredit: False, PinlessA2ADebit: False, PinlessPrePaidLoad: False, DualMessage: False, Recurring: False, CardVerify: False, RegulatedFlag: False, OTP: False, POSPinlessDualMessage: False, FastFunds: String, RegulatedWithFraud: False, CountryCode: String, CardType: String, CardProduct: String, CardDesignation: String, CardSubCategory: String, IncrementalAuth: False }, ResponseCode: String, ErrorMessage: String, ErrorCode: String, ExtendedData: { CardAccountUpdater: { CardDataType: CardNumber, CardNumberInfo: String, ExpiryDate: String, Status: String, ErrorCode: String, CardToken: String }, ProductId: String, NetworkResponseCode: String, NetworkTransactionId: String, CHEmailAddrResult: String }, Timestamps: { AppLayer: { InTime: 0001-01-01, OutTime: 0001-01-01 }, ParentLookup: { InTime: 0001-01-01, OutTime: 0001-01-01 }, RetryLookup: { InTime: 0001-01-01, OutTime: 0001-01-01 }, GetCardData: { InTime: 0001-01-01, OutTime: 0001-01-01 }, CardTokenize: { InTime: 0001-01-01, OutTime: 0001-01-01 }, CardEncrypt: { InTime: 0001-01-01, OutTime: 0001-01-01 }, DBInsert: { InTime: 0001-01-01, OutTime: 0001-01-01 }, BackendProcess: { InTime: 0001-01-01, OutTime: 0001-01-01 }, DBUpdate: { InTime: 0001-01-01, OutTime: 0001-01-01 }, ParentUpdate: { InTime: 0001-01-01, OutTime: 0001-01-01 }, Network: { InTime: 0001-01-01, OutTime: 0001-01-01 } } }