PaySecure Pinless Web Services 2023:07:03:07

<back to all web services

InitiateRequest

The following routes are available for this service:
POST/Initiate
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 Initiate extends PaysecureResponseInternal implements IConvertible
{
    // @DataMember
    String? TranId;

    // @DataMember
    String? ErrorMessage;

    // @DataMember
    String? ErrorCode;

    // @DataMember
    String? AccuId;

    Initiate({this.TranId,this.ErrorMessage,this.ErrorCode,this.AccuId});
    Initiate.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        TranId = json['TranId'];
        ErrorMessage = json['ErrorMessage'];
        ErrorCode = json['ErrorCode'];
        AccuId = json['AccuId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'TranId': TranId,
        'ErrorMessage': ErrorMessage,
        'ErrorCode': ErrorCode,
        'AccuId': AccuId
    });

    getTypeName() => "Initiate";
    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 CardInfoType
{
    CardNumber,
    Token,
    Track,
    EMV,
    Encrypted,
    DPAN,
    ApplePay,
    GooglePay,
    SamsungPay,
    CPToken,
    EncryptedEnhanced,
    EncryptedJWE,
}

class Card implements IConvertible
{
    CardInfoType? CardDataType;
    String? CardNumberData;
    String? KeyID;

    Card({this.CardDataType,this.CardNumberData,this.KeyID});
    Card.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'CardDataType': JsonConverters.toJson(CardDataType,'CardInfoType',context!),
        'CardNumberData': CardNumberData,
        'KeyID': KeyID
    };

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

enum EBTIntiateTransStatus
{
    eCommerce,
    EBT,
    MoneyTransfer,
    WIC,
}

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

    // @DataMember
    Card? CardNumberInfo;

    // @DataMember
    String? ExpirationDate;

    // @DataMember
    int? Amount;

    // @DataMember
    String? CurrencyCode;

    // @DataMember
    EBTIntiateTransStatus? TransType;

    InitiateRequest({this.Credentials,this.CardNumberInfo,this.ExpirationDate,this.Amount,this.CurrencyCode,this.TransType});
    InitiateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Credentials = JsonConverters.fromJson(json['Credentials'],'RequestorCredentials',context!);
        CardNumberInfo = JsonConverters.fromJson(json['CardNumberInfo'],'Card',context!);
        ExpirationDate = json['ExpirationDate'];
        Amount = json['Amount'];
        CurrencyCode = json['CurrencyCode'];
        TransType = JsonConverters.fromJson(json['TransType'],'EBTIntiateTransStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Credentials': JsonConverters.toJson(Credentials,'RequestorCredentials',context!),
        'CardNumberInfo': JsonConverters.toJson(CardNumberInfo,'Card',context!),
        'ExpirationDate': ExpirationDate,
        'Amount': Amount,
        'CurrencyCode': CurrencyCode,
        'TransType': JsonConverters.toJson(TransType,'EBTIntiateTransStatus',context!)
    };

    getTypeName() => "InitiateRequest";
    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()),
    'Initiate': TypeInfo(TypeOf.Class, create:() => Initiate()),
    'RequestorCredentials': TypeInfo(TypeOf.Class, create:() => RequestorCredentials()),
    'CardInfoType': TypeInfo(TypeOf.Enum, enumValues:CardInfoType.values),
    'Card': TypeInfo(TypeOf.Class, create:() => Card()),
    'EBTIntiateTransStatus': TypeInfo(TypeOf.Enum, enumValues:EBTIntiateTransStatus.values),
    'InitiateRequest': TypeInfo(TypeOf.Class, create:() => InitiateRequest()),
});

Dart InitiateRequest 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 /Initiate 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"},"CardNumberInfo":{"CardDataType":"CardNumber","CardNumberData":"String","KeyID":"String"},"ExpirationDate":"String","Amount":0,"CurrencyCode":"String","TransType":"eCommerce"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"TranId":"String","ErrorMessage":"String","ErrorCode":"String","AccuId":"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)\/"}}}