POST | /CreateACHToken |
---|
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 ACHExtendedData implements IConvertible
{
// @DataMember
int? CashbackAmount;
// @DataMember
String? ConnectPaySubScriberId;
// @DataMember
String? OrganizationId;
// @DataMember
String? DeviceFingerPrint;
// @DataMember
String? MerchantSessionId;
// @DataMember
String? CurrencyCode;
// @DataMember
String? PaymentType;
// @DataMember
bool? VerifyCustomer;
// @DataMember
String? CustomerExternalId;
// @DataMember
String? Description;
// @DataMember
String? CustomerName;
// @DataMember
String? AddressLine1;
// @DataMember
String? AddressLine2;
// @DataMember
String? City;
// @DataMember
String? State;
// @DataMember
String? Zip;
// @DataMember
String? Country;
// @DataMember
String? Email;
// @DataMember
String? TelephoneNumber;
// @DataMember
String? ReturnUrl;
// @DataMember
String? CancelUrl;
// @DataMember
String? EstablishData;
// @DataMember
String? RedirectUrl;
// @DataMember
int? RetryAttemptCount;
// @DataMember
String? SignatureHashVersion;
// @DataMember
DateTime? DeadlineHashDate;
ACHExtendedData({this.CashbackAmount,this.ConnectPaySubScriberId,this.OrganizationId,this.DeviceFingerPrint,this.MerchantSessionId,this.CurrencyCode,this.PaymentType,this.VerifyCustomer,this.CustomerExternalId,this.Description,this.CustomerName,this.AddressLine1,this.AddressLine2,this.City,this.State,this.Zip,this.Country,this.Email,this.TelephoneNumber,this.ReturnUrl,this.CancelUrl,this.EstablishData,this.RedirectUrl,this.RetryAttemptCount,this.SignatureHashVersion,this.DeadlineHashDate});
ACHExtendedData.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CashbackAmount = json['CashbackAmount'];
ConnectPaySubScriberId = json['ConnectPaySubScriberId'];
OrganizationId = json['OrganizationId'];
DeviceFingerPrint = json['DeviceFingerPrint'];
MerchantSessionId = json['MerchantSessionId'];
CurrencyCode = json['CurrencyCode'];
PaymentType = json['PaymentType'];
VerifyCustomer = json['VerifyCustomer'];
CustomerExternalId = json['CustomerExternalId'];
Description = json['Description'];
CustomerName = json['CustomerName'];
AddressLine1 = json['AddressLine1'];
AddressLine2 = json['AddressLine2'];
City = json['City'];
State = json['State'];
Zip = json['Zip'];
Country = json['Country'];
Email = json['Email'];
TelephoneNumber = json['TelephoneNumber'];
ReturnUrl = json['ReturnUrl'];
CancelUrl = json['CancelUrl'];
EstablishData = json['EstablishData'];
RedirectUrl = json['RedirectUrl'];
RetryAttemptCount = json['RetryAttemptCount'];
SignatureHashVersion = json['SignatureHashVersion'];
DeadlineHashDate = JsonConverters.fromJson(json['DeadlineHashDate'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'CashbackAmount': CashbackAmount,
'ConnectPaySubScriberId': ConnectPaySubScriberId,
'OrganizationId': OrganizationId,
'DeviceFingerPrint': DeviceFingerPrint,
'MerchantSessionId': MerchantSessionId,
'CurrencyCode': CurrencyCode,
'PaymentType': PaymentType,
'VerifyCustomer': VerifyCustomer,
'CustomerExternalId': CustomerExternalId,
'Description': Description,
'CustomerName': CustomerName,
'AddressLine1': AddressLine1,
'AddressLine2': AddressLine2,
'City': City,
'State': State,
'Zip': Zip,
'Country': Country,
'Email': Email,
'TelephoneNumber': TelephoneNumber,
'ReturnUrl': ReturnUrl,
'CancelUrl': CancelUrl,
'EstablishData': EstablishData,
'RedirectUrl': RedirectUrl,
'RetryAttemptCount': RetryAttemptCount,
'SignatureHashVersion': SignatureHashVersion,
'DeadlineHashDate': JsonConverters.toJson(DeadlineHashDate,'DateTime',context!)
};
getTypeName() => "ACHExtendedData";
TypeContext? context = _ctx;
}
// @DataContract
class CreateACHTokenRequest implements IConvertible
{
// @DataMember
RequestorCredentials? Credentials;
// @DataMember
String? SessionId;
// @DataMember
ACHExtendedData? ExtendedData;
CreateACHTokenRequest({this.Credentials,this.SessionId,this.ExtendedData});
CreateACHTokenRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Credentials = JsonConverters.fromJson(json['Credentials'],'RequestorCredentials',context!);
SessionId = json['SessionId'];
ExtendedData = JsonConverters.fromJson(json['ExtendedData'],'ACHExtendedData',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Credentials': JsonConverters.toJson(Credentials,'RequestorCredentials',context!),
'SessionId': SessionId,
'ExtendedData': JsonConverters.toJson(ExtendedData,'ACHExtendedData',context!)
};
getTypeName() => "CreateACHTokenRequest";
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;
}
// @DataContract
class UserInformation implements IConvertible
{
// @DataMember
List<String>? Name;
// @DataMember
List<String>? Phone;
// @DataMember
List<String>? Email;
// @DataMember
List<AddressDetails>? Address;
UserInformation({this.Name,this.Phone,this.Email,this.Address});
UserInformation.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = JsonConverters.fromJson(json['Name'],'List<String>',context!);
Phone = JsonConverters.fromJson(json['Phone'],'List<String>',context!);
Email = JsonConverters.fromJson(json['Email'],'List<String>',context!);
Address = JsonConverters.fromJson(json['Address'],'List<AddressDetails>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Name': JsonConverters.toJson(Name,'List<String>',context!),
'Phone': JsonConverters.toJson(Phone,'List<String>',context!),
'Email': JsonConverters.toJson(Email,'List<String>',context!),
'Address': JsonConverters.toJson(Address,'List<AddressDetails>',context!)
};
getTypeName() => "UserInformation";
TypeContext? context = _ctx;
}
// @DataContract
class ACHExtendedDataResponse implements IConvertible
{
// @DataMember(EmitDefaultValue=false)
String? NetworkResponseCode;
// @DataMember(EmitDefaultValue=false)
String? NetworkErrorCode;
// @DataMember(EmitDefaultValue=false)
String? DeclineReferenceCode;
// @DataMember(EmitDefaultValue=false)
String? NetworkTransactionId;
ACHExtendedDataResponse({this.NetworkResponseCode,this.NetworkErrorCode,this.DeclineReferenceCode,this.NetworkTransactionId});
ACHExtendedDataResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
NetworkResponseCode = json['NetworkResponseCode'];
NetworkErrorCode = json['NetworkErrorCode'];
DeclineReferenceCode = json['DeclineReferenceCode'];
NetworkTransactionId = json['NetworkTransactionId'];
return this;
}
Map<String, dynamic> toJson() => {
'NetworkResponseCode': NetworkResponseCode,
'NetworkErrorCode': NetworkErrorCode,
'DeclineReferenceCode': DeclineReferenceCode,
'NetworkTransactionId': NetworkTransactionId
};
getTypeName() => "ACHExtendedDataResponse";
TypeContext? context = _ctx;
}
// @DataContract
class CreateACHToken extends PaysecureResponseInternal implements IConvertible
{
// @DataMember
String? ACHToken;
// @DataMember
String? BankName;
// @DataMember
String? AccountNumberLast4;
// @DataMember
String? ACHHash;
// @DataMember
String? AccountType;
// @DataMember
String? AccountName;
// @DataMember
String? BankId;
// @DataMember
String? AccountStatus;
// @DataMember
UserInformation? UserInformation;
// @DataMember
String? ResponseCode;
// @DataMember
String? ErrorMessage;
// @DataMember
String? ErrorCode;
// @DataMember
ACHExtendedDataResponse? ExtendedData;
CreateACHToken({this.ACHToken,this.BankName,this.AccountNumberLast4,this.ACHHash,this.AccountType,this.AccountName,this.BankId,this.AccountStatus,this.UserInformation,this.ResponseCode,this.ErrorMessage,this.ErrorCode,this.ExtendedData});
CreateACHToken.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
ACHToken = json['ACHToken'];
BankName = json['BankName'];
AccountNumberLast4 = json['AccountNumberLast4'];
ACHHash = json['ACHHash'];
AccountType = json['AccountType'];
AccountName = json['AccountName'];
BankId = json['BankId'];
AccountStatus = json['AccountStatus'];
UserInformation = JsonConverters.fromJson(json['UserInformation'],'UserInformation',context!);
ResponseCode = json['ResponseCode'];
ErrorMessage = json['ErrorMessage'];
ErrorCode = json['ErrorCode'];
ExtendedData = JsonConverters.fromJson(json['ExtendedData'],'ACHExtendedDataResponse',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'ACHToken': ACHToken,
'BankName': BankName,
'AccountNumberLast4': AccountNumberLast4,
'ACHHash': ACHHash,
'AccountType': AccountType,
'AccountName': AccountName,
'BankId': BankId,
'AccountStatus': AccountStatus,
'UserInformation': JsonConverters.toJson(UserInformation,'UserInformation',context!),
'ResponseCode': ResponseCode,
'ErrorMessage': ErrorMessage,
'ErrorCode': ErrorCode,
'ExtendedData': JsonConverters.toJson(ExtendedData,'ACHExtendedDataResponse',context!)
});
getTypeName() => "CreateACHToken";
TypeContext? context = _ctx;
}
// @DataContract
class AddressDetails implements IConvertible
{
// @DataMember
String? Address1;
// @DataMember
String? Address2;
// @DataMember
String? City;
// @DataMember
String? State;
// @DataMember
String? Zip;
// @DataMember
String? Country;
AddressDetails({this.Address1,this.Address2,this.City,this.State,this.Zip,this.Country});
AddressDetails.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Address1 = json['Address1'];
Address2 = json['Address2'];
City = json['City'];
State = json['State'];
Zip = json['Zip'];
Country = json['Country'];
return this;
}
Map<String, dynamic> toJson() => {
'Address1': Address1,
'Address2': Address2,
'City': City,
'State': State,
'Zip': Zip,
'Country': Country
};
getTypeName() => "AddressDetails";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.paysecure.acculynk.net', types: <String, TypeInfo> {
'RequestorCredentials': TypeInfo(TypeOf.Class, create:() => RequestorCredentials()),
'ACHExtendedData': TypeInfo(TypeOf.Class, create:() => ACHExtendedData()),
'CreateACHTokenRequest': TypeInfo(TypeOf.Class, create:() => CreateACHTokenRequest()),
'InOutTimes': TypeInfo(TypeOf.Class, create:() => InOutTimes()),
'RequestTimestamps': TypeInfo(TypeOf.Class, create:() => RequestTimestamps()),
'PaysecureResponseInternal': TypeInfo(TypeOf.Class, create:() => PaysecureResponseInternal()),
'UserInformation': TypeInfo(TypeOf.Class, create:() => UserInformation()),
'List<AddressDetails>': TypeInfo(TypeOf.Class, create:() => <AddressDetails>[]),
'AddressDetails': TypeInfo(TypeOf.Class, create:() => AddressDetails()),
'ACHExtendedDataResponse': TypeInfo(TypeOf.Class, create:() => ACHExtendedDataResponse()),
'CreateACHToken': TypeInfo(TypeOf.Class, create:() => CreateACHToken()),
});
Dart CreateACHTokenRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /CreateACHToken HTTP/1.1
Host: api.paysecure.acculynk.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateACHTokenRequest 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>
<ExtendedData>
<AddressLine1>String</AddressLine1>
<AddressLine2>String</AddressLine2>
<CancelUrl>String</CancelUrl>
<CashbackAmount>0</CashbackAmount>
<City>String</City>
<ConnectPaySubScriberId>String</ConnectPaySubScriberId>
<Country>String</Country>
<CurrencyCode>String</CurrencyCode>
<CustomerExternalId>String</CustomerExternalId>
<CustomerName>String</CustomerName>
<DeadlineHashDate>0001-01-01T00:00:00</DeadlineHashDate>
<Description>String</Description>
<DeviceFingerPrint>String</DeviceFingerPrint>
<Email>String</Email>
<EstablishData>String</EstablishData>
<MerchantSessionId>String</MerchantSessionId>
<OrganizationId>String</OrganizationId>
<PaymentType>String</PaymentType>
<RedirectUrl>String</RedirectUrl>
<RetryAttemptCount>0</RetryAttemptCount>
<ReturnUrl>String</ReturnUrl>
<SignatureHashVersion>String</SignatureHashVersion>
<State>String</State>
<TelephoneNumber>String</TelephoneNumber>
<VerifyCustomer>false</VerifyCustomer>
<Zip>String</Zip>
</ExtendedData>
<SessionId>String</SessionId>
</CreateACHTokenRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CreateACHToken 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> <ACHHash>String</ACHHash> <ACHToken>String</ACHToken> <AccountName>String</AccountName> <AccountNumberLast4>String</AccountNumberLast4> <AccountStatus>String</AccountStatus> <AccountType>String</AccountType> <BankId>String</BankId> <BankName>String</BankName> <ErrorCode>String</ErrorCode> <ErrorMessage>String</ErrorMessage> <ExtendedData> <DeclineReferenceCode>String</DeclineReferenceCode> <NetworkErrorCode>String</NetworkErrorCode> <NetworkResponseCode>String</NetworkResponseCode> <NetworkTransactionId>String</NetworkTransactionId> </ExtendedData> <ResponseCode>String</ResponseCode> <UserInformation> <Address> <AddressDetails> <Address1>String</Address1> <Address2>String</Address2> <City>String</City> <Country>String</Country> <State>String</State> <Zip>String</Zip> </AddressDetails> </Address> <Email xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:string>String</d3p1:string> </Email> <Name xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:string>String</d3p1:string> </Name> <Phone xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:string>String</d3p1:string> </Phone> </UserInformation> </CreateACHToken>