PaySecure Pinless Web Services 2023:07:03:07

<back to all web services

CreateCardTokenRequest

The following routes are available for this service:
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 .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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/json
Content-Type: application/json
Content-Length: length

{"Credentials":{"MerchantId":"String","UserName":"String","Password":"String","Version":"String"},"SessionId":"String","VerifyCard":false}
HTTP/1.1 200 OK
Content-Type: application/json
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":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"ParentLookup":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"RetryLookup":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"GetCardData":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"CardTokenize":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"CardEncrypt":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"DBInsert":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"BackendProcess":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"DBUpdate":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"ParentUpdate":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"},"Network":{"InTime":"\/Date(-62135596800000-0000)\/","OutTime":"\/Date(-62135596800000-0000)\/"}}}