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 'package:servicestack/servicestack.dart';

class RequestorCredentials implements IConvertible
{
    // @Required()
    String? MerchantId;

    // @Required()
    String? UserName;

    // @Required()
    String? Password;

    // @Required()
    String? Version;

    RequestorCredentials({this.MerchantId,this.UserName,this.Password,this.Version});
    RequestorCredentials.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        MerchantId = json['MerchantId'];
        UserName = json['UserName'];
        Password = json['Password'];
        Version = json['Version'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'MerchantId': MerchantId,
        'UserName': UserName,
        'Password': Password,
        'Version': Version
    };

    getTypeName() => "RequestorCredentials";
    TypeContext? context = _ctx;
}

// @DataContract
class CreateCardTokenRequest implements IConvertible
{
    // @DataMember
    RequestorCredentials? Credentials;

    // @DataMember
    String? SessionId;

    // @DataMember
    bool? VerifyCard;

    CreateCardTokenRequest({this.Credentials,this.SessionId,this.VerifyCard});
    CreateCardTokenRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Credentials = JsonConverters.fromJson(json['Credentials'],'RequestorCredentials',context!);
        SessionId = json['SessionId'];
        VerifyCard = json['VerifyCard'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Credentials': JsonConverters.toJson(Credentials,'RequestorCredentials',context!),
        'SessionId': SessionId,
        'VerifyCard': VerifyCard
    };

    getTypeName() => "CreateCardTokenRequest";
    TypeContext? context = _ctx;
}

// @DataContract
class InOutTimes implements IConvertible
{
    InOutTimes();
    InOutTimes.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "InOutTimes";
    TypeContext? context = _ctx;
}

// @DataContract
class RequestTimestamps implements IConvertible
{
    // @DataMember(EmitDefaultValue=false)
    InOutTimes? AppLayer;

    // @DataMember(EmitDefaultValue=false)
    InOutTimes? ParentLookup;

    // @DataMember(EmitDefaultValue=false)
    InOutTimes? RetryLookup;

    // @DataMember(EmitDefaultValue=false)
    InOutTimes? GetCardData;

    // @DataMember(EmitDefaultValue=false)
    InOutTimes? CardTokenize;

    // @DataMember(EmitDefaultValue=false)
    InOutTimes? CardEncrypt;

    // @DataMember(EmitDefaultValue=false)
    InOutTimes? DBInsert;

    // @DataMember(EmitDefaultValue=false)
    InOutTimes? BackendProcess;

    // @DataMember(EmitDefaultValue=false)
    InOutTimes? DBUpdate;

    // @DataMember(EmitDefaultValue=false)
    InOutTimes? ParentUpdate;

    // @DataMember(EmitDefaultValue=false)
    InOutTimes? Network;

    RequestTimestamps({this.AppLayer,this.ParentLookup,this.RetryLookup,this.GetCardData,this.CardTokenize,this.CardEncrypt,this.DBInsert,this.BackendProcess,this.DBUpdate,this.ParentUpdate,this.Network});
    RequestTimestamps.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        AppLayer = JsonConverters.fromJson(json['AppLayer'],'InOutTimes',context!);
        ParentLookup = JsonConverters.fromJson(json['ParentLookup'],'InOutTimes',context!);
        RetryLookup = JsonConverters.fromJson(json['RetryLookup'],'InOutTimes',context!);
        GetCardData = JsonConverters.fromJson(json['GetCardData'],'InOutTimes',context!);
        CardTokenize = JsonConverters.fromJson(json['CardTokenize'],'InOutTimes',context!);
        CardEncrypt = JsonConverters.fromJson(json['CardEncrypt'],'InOutTimes',context!);
        DBInsert = JsonConverters.fromJson(json['DBInsert'],'InOutTimes',context!);
        BackendProcess = JsonConverters.fromJson(json['BackendProcess'],'InOutTimes',context!);
        DBUpdate = JsonConverters.fromJson(json['DBUpdate'],'InOutTimes',context!);
        ParentUpdate = JsonConverters.fromJson(json['ParentUpdate'],'InOutTimes',context!);
        Network = JsonConverters.fromJson(json['Network'],'InOutTimes',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'AppLayer': JsonConverters.toJson(AppLayer,'InOutTimes',context!),
        'ParentLookup': JsonConverters.toJson(ParentLookup,'InOutTimes',context!),
        'RetryLookup': JsonConverters.toJson(RetryLookup,'InOutTimes',context!),
        'GetCardData': JsonConverters.toJson(GetCardData,'InOutTimes',context!),
        'CardTokenize': JsonConverters.toJson(CardTokenize,'InOutTimes',context!),
        'CardEncrypt': JsonConverters.toJson(CardEncrypt,'InOutTimes',context!),
        'DBInsert': JsonConverters.toJson(DBInsert,'InOutTimes',context!),
        'BackendProcess': JsonConverters.toJson(BackendProcess,'InOutTimes',context!),
        'DBUpdate': JsonConverters.toJson(DBUpdate,'InOutTimes',context!),
        'ParentUpdate': JsonConverters.toJson(ParentUpdate,'InOutTimes',context!),
        'Network': JsonConverters.toJson(Network,'InOutTimes',context!)
    };

    getTypeName() => "RequestTimestamps";
    TypeContext? context = _ctx;
}

// @DataContract
class PaysecureResponseInternal implements IConvertible
{
    // @DataMember(EmitDefaultValue=false)
    RequestTimestamps? Timestamps;

    PaysecureResponseInternal({this.Timestamps});
    PaysecureResponseInternal.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Timestamps = JsonConverters.fromJson(json['Timestamps'],'RequestTimestamps',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Timestamps': JsonConverters.toJson(Timestamps,'RequestTimestamps',context!)
    };

    getTypeName() => "PaysecureResponseInternal";
    TypeContext? context = _ctx;
}

class BINResults implements IConvertible
{
    String? BIN;
    String? Network;
    bool? InternetPinDebit;
    bool? EcomEBTCash;
    bool? EcomEBTSNAP;
    bool? POSFlag;
    bool? PinlessEcommerce;
    bool? PinlessBillPay;
    bool? OnDemandPaymentCredit;
    bool? OnDemandPaymentDebit;
    bool? PinlessA2ACredit;
    bool? PinlessA2ADebit;
    bool? PinlessPrePaidLoad;
    bool? DualMessage;
    bool? Recurring;
    bool? CardVerify;
    bool? RegulatedFlag;
    bool? OTP;
    bool? POSPinlessDualMessage;
    String? FastFunds;
    bool? RegulatedWithFraud;
    String? CountryCode;
    String? CardType;
    String? CardProduct;
    String? CardDesignation;
    String? CardSubCategory;
    bool? IncrementalAuth;

    BINResults({this.BIN,this.Network,this.InternetPinDebit,this.EcomEBTCash,this.EcomEBTSNAP,this.POSFlag,this.PinlessEcommerce,this.PinlessBillPay,this.OnDemandPaymentCredit,this.OnDemandPaymentDebit,this.PinlessA2ACredit,this.PinlessA2ADebit,this.PinlessPrePaidLoad,this.DualMessage,this.Recurring,this.CardVerify,this.RegulatedFlag,this.OTP,this.POSPinlessDualMessage,this.FastFunds,this.RegulatedWithFraud,this.CountryCode,this.CardType,this.CardProduct,this.CardDesignation,this.CardSubCategory,this.IncrementalAuth});
    BINResults.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        BIN = json['BIN'];
        Network = json['Network'];
        InternetPinDebit = json['InternetPinDebit'];
        EcomEBTCash = json['EcomEBTCash'];
        EcomEBTSNAP = json['EcomEBTSNAP'];
        POSFlag = json['POSFlag'];
        PinlessEcommerce = json['PinlessEcommerce'];
        PinlessBillPay = json['PinlessBillPay'];
        OnDemandPaymentCredit = json['OnDemandPaymentCredit'];
        OnDemandPaymentDebit = json['OnDemandPaymentDebit'];
        PinlessA2ACredit = json['PinlessA2ACredit'];
        PinlessA2ADebit = json['PinlessA2ADebit'];
        PinlessPrePaidLoad = json['PinlessPrePaidLoad'];
        DualMessage = json['DualMessage'];
        Recurring = json['Recurring'];
        CardVerify = json['CardVerify'];
        RegulatedFlag = json['RegulatedFlag'];
        OTP = json['OTP'];
        POSPinlessDualMessage = json['POSPinlessDualMessage'];
        FastFunds = json['FastFunds'];
        RegulatedWithFraud = json['RegulatedWithFraud'];
        CountryCode = json['CountryCode'];
        CardType = json['CardType'];
        CardProduct = json['CardProduct'];
        CardDesignation = json['CardDesignation'];
        CardSubCategory = json['CardSubCategory'];
        IncrementalAuth = json['IncrementalAuth'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'BIN': BIN,
        'Network': Network,
        'InternetPinDebit': InternetPinDebit,
        'EcomEBTCash': EcomEBTCash,
        'EcomEBTSNAP': EcomEBTSNAP,
        'POSFlag': POSFlag,
        'PinlessEcommerce': PinlessEcommerce,
        'PinlessBillPay': PinlessBillPay,
        'OnDemandPaymentCredit': OnDemandPaymentCredit,
        'OnDemandPaymentDebit': OnDemandPaymentDebit,
        'PinlessA2ACredit': PinlessA2ACredit,
        'PinlessA2ADebit': PinlessA2ADebit,
        'PinlessPrePaidLoad': PinlessPrePaidLoad,
        'DualMessage': DualMessage,
        'Recurring': Recurring,
        'CardVerify': CardVerify,
        'RegulatedFlag': RegulatedFlag,
        'OTP': OTP,
        'POSPinlessDualMessage': POSPinlessDualMessage,
        'FastFunds': FastFunds,
        'RegulatedWithFraud': RegulatedWithFraud,
        'CountryCode': CountryCode,
        'CardType': CardType,
        'CardProduct': CardProduct,
        'CardDesignation': CardDesignation,
        'CardSubCategory': CardSubCategory,
        'IncrementalAuth': IncrementalAuth
    };

    getTypeName() => "BINResults";
    TypeContext? context = _ctx;
}

enum CardInfoType
{
    CardNumber,
    Token,
    Track,
    EMV,
    Encrypted,
    DPAN,
    ApplePay,
    GooglePay,
    SamsungPay,
    CPToken,
    EncryptedEnhanced,
    EncryptedJWE,
}

class CardAccountUpdaterDescriptor implements IConvertible
{
    CardInfoType? CardDataType;
    String? CardNumberInfo;
    String? ExpiryDate;
    String? Status;
    String? ErrorCode;
    String? CardToken;

    CardAccountUpdaterDescriptor({this.CardDataType,this.CardNumberInfo,this.ExpiryDate,this.Status,this.ErrorCode,this.CardToken});
    CardAccountUpdaterDescriptor.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CardDataType = JsonConverters.fromJson(json['CardDataType'],'CardInfoType',context!);
        CardNumberInfo = json['CardNumberInfo'];
        ExpiryDate = json['ExpiryDate'];
        Status = json['Status'];
        ErrorCode = json['ErrorCode'];
        CardToken = json['CardToken'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CardDataType': JsonConverters.toJson(CardDataType,'CardInfoType',context!),
        'CardNumberInfo': CardNumberInfo,
        'ExpiryDate': ExpiryDate,
        'Status': Status,
        'ErrorCode': ErrorCode,
        'CardToken': CardToken
    };

    getTypeName() => "CardAccountUpdaterDescriptor";
    TypeContext? context = _ctx;
}

// @DataContract
class ExtendedResponse implements IConvertible
{
    // @DataMember(EmitDefaultValue=false)
    CardAccountUpdaterDescriptor? CardAccountUpdater;

    // @DataMember(EmitDefaultValue=false)
    String? ProductId;

    // @DataMember(EmitDefaultValue=false)
    String? NetworkResponseCode;

    // @DataMember(EmitDefaultValue=false)
    String? NetworkTransactionId;

    // @DataMember(EmitDefaultValue=false)
    String? CHEmailAddrResult;

    ExtendedResponse({this.CardAccountUpdater,this.ProductId,this.NetworkResponseCode,this.NetworkTransactionId,this.CHEmailAddrResult});
    ExtendedResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CardAccountUpdater = JsonConverters.fromJson(json['CardAccountUpdater'],'CardAccountUpdaterDescriptor',context!);
        ProductId = json['ProductId'];
        NetworkResponseCode = json['NetworkResponseCode'];
        NetworkTransactionId = json['NetworkTransactionId'];
        CHEmailAddrResult = json['CHEmailAddrResult'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CardAccountUpdater': JsonConverters.toJson(CardAccountUpdater,'CardAccountUpdaterDescriptor',context!),
        'ProductId': ProductId,
        'NetworkResponseCode': NetworkResponseCode,
        'NetworkTransactionId': NetworkTransactionId,
        'CHEmailAddrResult': CHEmailAddrResult
    };

    getTypeName() => "ExtendedResponse";
    TypeContext? context = _ctx;
}

// @DataContract
class CreateCardToken extends PaysecureResponseInternal implements IConvertible
{
    // @DataMember
    String? CardToken;

    // @DataMember
    String? CardZip;

    // @DataMember
    String? CardLast4;

    // @DataMember
    String? CardExpiration;

    // @DataMember
    String? CVN;

    // @DataMember
    String? AVS;

    // @DataMember
    BINResults? BINResults;

    // @DataMember
    String? ResponseCode;

    // @DataMember
    String? ErrorMessage;

    // @DataMember
    String? ErrorCode;

    // @DataMember(EmitDefaultValue=false)
    ExtendedResponse? ExtendedData;

    CreateCardToken({this.CardToken,this.CardZip,this.CardLast4,this.CardExpiration,this.CVN,this.AVS,this.BINResults,this.ResponseCode,this.ErrorMessage,this.ErrorCode,this.ExtendedData});
    CreateCardToken.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        CardToken = json['CardToken'];
        CardZip = json['CardZip'];
        CardLast4 = json['CardLast4'];
        CardExpiration = json['CardExpiration'];
        CVN = json['CVN'];
        AVS = json['AVS'];
        BINResults = JsonConverters.fromJson(json['BINResults'],'BINResults',context!);
        ResponseCode = json['ResponseCode'];
        ErrorMessage = json['ErrorMessage'];
        ErrorCode = json['ErrorCode'];
        ExtendedData = JsonConverters.fromJson(json['ExtendedData'],'ExtendedResponse',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'CardToken': CardToken,
        'CardZip': CardZip,
        'CardLast4': CardLast4,
        'CardExpiration': CardExpiration,
        'CVN': CVN,
        'AVS': AVS,
        'BINResults': JsonConverters.toJson(BINResults,'BINResults',context!),
        'ResponseCode': ResponseCode,
        'ErrorMessage': ErrorMessage,
        'ErrorCode': ErrorCode,
        'ExtendedData': JsonConverters.toJson(ExtendedData,'ExtendedResponse',context!)
    });

    getTypeName() => "CreateCardToken";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.paysecure.acculynk.net', types: <String, TypeInfo> {
    'RequestorCredentials': TypeInfo(TypeOf.Class, create:() => RequestorCredentials()),
    'CreateCardTokenRequest': TypeInfo(TypeOf.Class, create:() => CreateCardTokenRequest()),
    'InOutTimes': TypeInfo(TypeOf.Class, create:() => InOutTimes()),
    'RequestTimestamps': TypeInfo(TypeOf.Class, create:() => RequestTimestamps()),
    'PaysecureResponseInternal': TypeInfo(TypeOf.Class, create:() => PaysecureResponseInternal()),
    'BINResults': TypeInfo(TypeOf.Class, create:() => BINResults()),
    'CardInfoType': TypeInfo(TypeOf.Enum, enumValues:CardInfoType.values),
    'CardAccountUpdaterDescriptor': TypeInfo(TypeOf.Class, create:() => CardAccountUpdaterDescriptor()),
    'ExtendedResponse': TypeInfo(TypeOf.Class, create:() => ExtendedResponse()),
    'CreateCardToken': TypeInfo(TypeOf.Class, create:() => CreateCardToken()),
});

Dart CreateCardTokenRequest 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 /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>