PaySecure Pinless Web Services 2023:07:03:07

<back to all web services

TokenizeCardRequest

The following routes are available for this service:
POST/TokenizeCard
import 'package:servicestack/servicestack.dart';

// @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;
}

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

    // @DataMember
    String? CardHash;

    // @DataMember
    String? CardLast4;

    // @DataMember
    String? CardBIN;

    // @DataMember
    String? CardExpiration;

    // @DataMember
    String? ResponseCode;

    // @DataMember
    String? ErrorMessage;

    // @DataMember
    String? ErrorCode;

    TokenizeCard({this.CardToken,this.CardHash,this.CardLast4,this.CardBIN,this.CardExpiration,this.ResponseCode,this.ErrorMessage,this.ErrorCode});
    TokenizeCard.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        CardToken = json['CardToken'];
        CardHash = json['CardHash'];
        CardLast4 = json['CardLast4'];
        CardBIN = json['CardBIN'];
        CardExpiration = json['CardExpiration'];
        ResponseCode = json['ResponseCode'];
        ErrorMessage = json['ErrorMessage'];
        ErrorCode = json['ErrorCode'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'CardToken': CardToken,
        'CardHash': CardHash,
        'CardLast4': CardLast4,
        'CardBIN': CardBIN,
        'CardExpiration': CardExpiration,
        'ResponseCode': ResponseCode,
        'ErrorMessage': ErrorMessage,
        'ErrorCode': ErrorCode
    });

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

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;
}

enum TelephoneType
{
    D,
    H,
    N,
    W,
}

class Avs implements IConvertible
{
    String? Address;
    String? City;
    String? State;
    String? Zip;
    String? Country;
    String? Email;
    String? IPAddress;
    String? TelephoneNumber;
    TelephoneType? TelephoneType;
    int? DeliveryMethod;
    String? FirstName;
    String? MiddleName;
    String? LastName;

    Avs({this.Address,this.City,this.State,this.Zip,this.Country,this.Email,this.IPAddress,this.TelephoneNumber,this.TelephoneType,this.DeliveryMethod,this.FirstName,this.MiddleName,this.LastName});
    Avs.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Address = json['Address'];
        City = json['City'];
        State = json['State'];
        Zip = json['Zip'];
        Country = json['Country'];
        Email = json['Email'];
        IPAddress = json['IPAddress'];
        TelephoneNumber = json['TelephoneNumber'];
        TelephoneType = JsonConverters.fromJson(json['TelephoneType'],'TelephoneType',context!);
        DeliveryMethod = json['DeliveryMethod'];
        FirstName = json['FirstName'];
        MiddleName = json['MiddleName'];
        LastName = json['LastName'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Address': Address,
        'City': City,
        'State': State,
        'Zip': Zip,
        'Country': Country,
        'Email': Email,
        'IPAddress': IPAddress,
        'TelephoneNumber': TelephoneNumber,
        'TelephoneType': JsonConverters.toJson(TelephoneType,'TelephoneType',context!),
        'DeliveryMethod': DeliveryMethod,
        'FirstName': FirstName,
        'MiddleName': MiddleName,
        'LastName': LastName
    };

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

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

    // @DataMember
    String? KeyId;

    // @DataMember
    String? EncryptedCardNumber;

    // @DataMember
    String? Expiration;

    // @DataMember
    String? EncryptedCVN;

    // @DataMember
    Avs? AVS;

    // @DataMember
    bool? VerifyCard;

    TokenizeCardRequest({this.Credentials,this.KeyId,this.EncryptedCardNumber,this.Expiration,this.EncryptedCVN,this.AVS,this.VerifyCard});
    TokenizeCardRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Credentials = JsonConverters.fromJson(json['Credentials'],'RequestorCredentials',context!);
        KeyId = json['KeyId'];
        EncryptedCardNumber = json['EncryptedCardNumber'];
        Expiration = json['Expiration'];
        EncryptedCVN = json['EncryptedCVN'];
        AVS = JsonConverters.fromJson(json['AVS'],'Avs',context!);
        VerifyCard = json['VerifyCard'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Credentials': JsonConverters.toJson(Credentials,'RequestorCredentials',context!),
        'KeyId': KeyId,
        'EncryptedCardNumber': EncryptedCardNumber,
        'Expiration': Expiration,
        'EncryptedCVN': EncryptedCVN,
        'AVS': JsonConverters.toJson(AVS,'Avs',context!),
        'VerifyCard': VerifyCard
    };

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

TypeContext _ctx = TypeContext(library: 'api.paysecure.acculynk.net', types: <String, TypeInfo> {
    'InOutTimes': TypeInfo(TypeOf.Class, create:() => InOutTimes()),
    'RequestTimestamps': TypeInfo(TypeOf.Class, create:() => RequestTimestamps()),
    'PaysecureResponseInternal': TypeInfo(TypeOf.Class, create:() => PaysecureResponseInternal()),
    'TokenizeCard': TypeInfo(TypeOf.Class, create:() => TokenizeCard()),
    'RequestorCredentials': TypeInfo(TypeOf.Class, create:() => RequestorCredentials()),
    'TelephoneType': TypeInfo(TypeOf.Enum, enumValues:TelephoneType.values),
    'Avs': TypeInfo(TypeOf.Class, create:() => Avs()),
    'TokenizeCardRequest': TypeInfo(TypeOf.Class, create:() => TokenizeCardRequest()),
});

Dart TokenizeCardRequest 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 /TokenizeCard HTTP/1.1 
Host: api.paysecure.acculynk.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<TokenizeCardRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <AVS>
    <Address>String</Address>
    <City>String</City>
    <Country>String</Country>
    <DeliveryMethod>0</DeliveryMethod>
    <Email>String</Email>
    <FirstName>String</FirstName>
    <IPAddress>String</IPAddress>
    <LastName>String</LastName>
    <MiddleName>String</MiddleName>
    <State>String</State>
    <TelephoneNumber>String</TelephoneNumber>
    <TelephoneType>D</TelephoneType>
    <Zip>String</Zip>
  </AVS>
  <Credentials>
    <MerchantId>String</MerchantId>
    <Password>String</Password>
    <UserName>String</UserName>
    <Version>String</Version>
  </Credentials>
  <EncryptedCVN>String</EncryptedCVN>
  <EncryptedCardNumber>String</EncryptedCardNumber>
  <Expiration>String</Expiration>
  <KeyId>String</KeyId>
  <VerifyCard>false</VerifyCard>
</TokenizeCardRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<TokenizeCard 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>
  <CardBIN>String</CardBIN>
  <CardExpiration>String</CardExpiration>
  <CardHash>String</CardHash>
  <CardLast4>String</CardLast4>
  <CardToken>String</CardToken>
  <ErrorCode>String</ErrorCode>
  <ErrorMessage>String</ErrorMessage>
  <ResponseCode>String</ResponseCode>
</TokenizeCard>