POST | /CreateACHToken |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@DataContract
public static class CreateACHTokenRequest
{
@DataMember
public RequestorCredentials Credentials = null;
@DataMember
public String SessionId = null;
@DataMember
public ACHExtendedData ExtendedData = null;
public RequestorCredentials getCredentials() { return Credentials; }
public CreateACHTokenRequest setCredentials(RequestorCredentials value) { this.Credentials = value; return this; }
public String getSessionId() { return SessionId; }
public CreateACHTokenRequest setSessionId(String value) { this.SessionId = value; return this; }
public ACHExtendedData getExtendedData() { return ExtendedData; }
public CreateACHTokenRequest setExtendedData(ACHExtendedData value) { this.ExtendedData = value; return this; }
}
public static class RequestorCredentials
{
@Required()
public String MerchantId = null;
@Required()
public String UserName = null;
@Required()
public String Password = null;
@Required()
public String Version = null;
public String getMerchantId() { return MerchantId; }
public RequestorCredentials setMerchantId(String value) { this.MerchantId = value; return this; }
public String getUserName() { return UserName; }
public RequestorCredentials setUserName(String value) { this.UserName = value; return this; }
public String getPassword() { return Password; }
public RequestorCredentials setPassword(String value) { this.Password = value; return this; }
public String getVersion() { return Version; }
public RequestorCredentials setVersion(String value) { this.Version = value; return this; }
}
@DataContract
public static class ACHExtendedData
{
@DataMember
public Integer CashbackAmount = null;
@DataMember
public String ConnectPaySubScriberId = null;
@DataMember
public String OrganizationId = null;
@DataMember
public String DeviceFingerPrint = null;
@DataMember
public String MerchantSessionId = null;
@DataMember
public String CurrencyCode = null;
@DataMember
public String PaymentType = null;
@DataMember
public Boolean VerifyCustomer = null;
@DataMember
public String CustomerExternalId = null;
@DataMember
public String Description = null;
@DataMember
public String CustomerName = null;
@DataMember
public String AddressLine1 = null;
@DataMember
public String AddressLine2 = null;
@DataMember
public String City = null;
@DataMember
public String State = null;
@DataMember
public String Zip = null;
@DataMember
public String Country = null;
@DataMember
public String Email = null;
@DataMember
public String TelephoneNumber = null;
@DataMember
public String ReturnUrl = null;
@DataMember
public String CancelUrl = null;
@DataMember
public String EstablishData = null;
@DataMember
public String RedirectUrl = null;
@DataMember
public Integer RetryAttemptCount = null;
@DataMember
public String SignatureHashVersion = null;
@DataMember
public Date DeadlineHashDate = null;
public Integer getCashbackAmount() { return CashbackAmount; }
public ACHExtendedData setCashbackAmount(Integer value) { this.CashbackAmount = value; return this; }
public String getConnectPaySubScriberId() { return ConnectPaySubScriberId; }
public ACHExtendedData setConnectPaySubScriberId(String value) { this.ConnectPaySubScriberId = value; return this; }
public String getOrganizationId() { return OrganizationId; }
public ACHExtendedData setOrganizationId(String value) { this.OrganizationId = value; return this; }
public String getDeviceFingerPrint() { return DeviceFingerPrint; }
public ACHExtendedData setDeviceFingerPrint(String value) { this.DeviceFingerPrint = value; return this; }
public String getMerchantSessionId() { return MerchantSessionId; }
public ACHExtendedData setMerchantSessionId(String value) { this.MerchantSessionId = value; return this; }
public String getCurrencyCode() { return CurrencyCode; }
public ACHExtendedData setCurrencyCode(String value) { this.CurrencyCode = value; return this; }
public String getPaymentType() { return PaymentType; }
public ACHExtendedData setPaymentType(String value) { this.PaymentType = value; return this; }
public Boolean isVerifyCustomer() { return VerifyCustomer; }
public ACHExtendedData setVerifyCustomer(Boolean value) { this.VerifyCustomer = value; return this; }
public String getCustomerExternalId() { return CustomerExternalId; }
public ACHExtendedData setCustomerExternalId(String value) { this.CustomerExternalId = value; return this; }
public String getDescription() { return Description; }
public ACHExtendedData setDescription(String value) { this.Description = value; return this; }
public String getCustomerName() { return CustomerName; }
public ACHExtendedData setCustomerName(String value) { this.CustomerName = value; return this; }
public String getAddressLine1() { return AddressLine1; }
public ACHExtendedData setAddressLine1(String value) { this.AddressLine1 = value; return this; }
public String getAddressLine2() { return AddressLine2; }
public ACHExtendedData setAddressLine2(String value) { this.AddressLine2 = value; return this; }
public String getCity() { return City; }
public ACHExtendedData setCity(String value) { this.City = value; return this; }
public String getState() { return State; }
public ACHExtendedData setState(String value) { this.State = value; return this; }
public String getZip() { return Zip; }
public ACHExtendedData setZip(String value) { this.Zip = value; return this; }
public String getCountry() { return Country; }
public ACHExtendedData setCountry(String value) { this.Country = value; return this; }
public String getEmail() { return Email; }
public ACHExtendedData setEmail(String value) { this.Email = value; return this; }
public String getTelephoneNumber() { return TelephoneNumber; }
public ACHExtendedData setTelephoneNumber(String value) { this.TelephoneNumber = value; return this; }
public String getReturnUrl() { return ReturnUrl; }
public ACHExtendedData setReturnUrl(String value) { this.ReturnUrl = value; return this; }
public String getCancelUrl() { return CancelUrl; }
public ACHExtendedData setCancelUrl(String value) { this.CancelUrl = value; return this; }
public String getEstablishData() { return EstablishData; }
public ACHExtendedData setEstablishData(String value) { this.EstablishData = value; return this; }
public String getRedirectUrl() { return RedirectUrl; }
public ACHExtendedData setRedirectUrl(String value) { this.RedirectUrl = value; return this; }
public Integer getRetryAttemptCount() { return RetryAttemptCount; }
public ACHExtendedData setRetryAttemptCount(Integer value) { this.RetryAttemptCount = value; return this; }
public String getSignatureHashVersion() { return SignatureHashVersion; }
public ACHExtendedData setSignatureHashVersion(String value) { this.SignatureHashVersion = value; return this; }
public Date getDeadlineHashDate() { return DeadlineHashDate; }
public ACHExtendedData setDeadlineHashDate(Date value) { this.DeadlineHashDate = value; return this; }
}
@DataContract
public static class CreateACHToken extends PaysecureResponseInternal
{
@DataMember
public String ACHToken = null;
@DataMember
public String BankName = null;
@DataMember
public String AccountNumberLast4 = null;
@DataMember
public String ACHHash = null;
@DataMember
public String AccountType = null;
@DataMember
public String AccountName = null;
@DataMember
public String BankId = null;
@DataMember
public String AccountStatus = null;
@DataMember
public UserInformation UserInformation = null;
@DataMember
public String ResponseCode = null;
@DataMember
public String ErrorMessage = null;
@DataMember
public String ErrorCode = null;
@DataMember
public ACHExtendedDataResponse ExtendedData = null;
public String getAchToken() { return ACHToken; }
public CreateACHToken setAchToken(String value) { this.ACHToken = value; return this; }
public String getBankName() { return BankName; }
public CreateACHToken setBankName(String value) { this.BankName = value; return this; }
public String getAccountNumberLast4() { return AccountNumberLast4; }
public CreateACHToken setAccountNumberLast4(String value) { this.AccountNumberLast4 = value; return this; }
public String getAchHash() { return ACHHash; }
public CreateACHToken setAchHash(String value) { this.ACHHash = value; return this; }
public String getAccountType() { return AccountType; }
public CreateACHToken setAccountType(String value) { this.AccountType = value; return this; }
public String getAccountName() { return AccountName; }
public CreateACHToken setAccountName(String value) { this.AccountName = value; return this; }
public String getBankId() { return BankId; }
public CreateACHToken setBankId(String value) { this.BankId = value; return this; }
public String getAccountStatus() { return AccountStatus; }
public CreateACHToken setAccountStatus(String value) { this.AccountStatus = value; return this; }
public UserInformation getUserInformation() { return UserInformation; }
public CreateACHToken setUserInformation(UserInformation value) { this.UserInformation = value; return this; }
public String getResponseCode() { return ResponseCode; }
public CreateACHToken setResponseCode(String value) { this.ResponseCode = value; return this; }
public String getErrorMessage() { return ErrorMessage; }
public CreateACHToken setErrorMessage(String value) { this.ErrorMessage = value; return this; }
public String getErrorCode() { return ErrorCode; }
public CreateACHToken setErrorCode(String value) { this.ErrorCode = value; return this; }
public ACHExtendedDataResponse getExtendedData() { return ExtendedData; }
public CreateACHToken setExtendedData(ACHExtendedDataResponse value) { this.ExtendedData = value; return this; }
}
@DataContract
public static class PaysecureResponseInternal
{
@DataMember(EmitDefaultValue=false)
public RequestTimestamps Timestamps = null;
public RequestTimestamps getTimestamps() { return Timestamps; }
public PaysecureResponseInternal setTimestamps(RequestTimestamps value) { this.Timestamps = value; return this; }
}
@DataContract
public static class RequestTimestamps
{
@DataMember(EmitDefaultValue=false)
public InOutTimes AppLayer = null;
@DataMember(EmitDefaultValue=false)
public InOutTimes ParentLookup = null;
@DataMember(EmitDefaultValue=false)
public InOutTimes RetryLookup = null;
@DataMember(EmitDefaultValue=false)
public InOutTimes GetCardData = null;
@DataMember(EmitDefaultValue=false)
public InOutTimes CardTokenize = null;
@DataMember(EmitDefaultValue=false)
public InOutTimes CardEncrypt = null;
@DataMember(EmitDefaultValue=false)
public InOutTimes DBInsert = null;
@DataMember(EmitDefaultValue=false)
public InOutTimes BackendProcess = null;
@DataMember(EmitDefaultValue=false)
public InOutTimes DBUpdate = null;
@DataMember(EmitDefaultValue=false)
public InOutTimes ParentUpdate = null;
@DataMember(EmitDefaultValue=false)
public InOutTimes Network = null;
public InOutTimes getAppLayer() { return AppLayer; }
public RequestTimestamps setAppLayer(InOutTimes value) { this.AppLayer = value; return this; }
public InOutTimes getParentLookup() { return ParentLookup; }
public RequestTimestamps setParentLookup(InOutTimes value) { this.ParentLookup = value; return this; }
public InOutTimes getRetryLookup() { return RetryLookup; }
public RequestTimestamps setRetryLookup(InOutTimes value) { this.RetryLookup = value; return this; }
public InOutTimes getGetCardData() { return GetCardData; }
public RequestTimestamps setGetCardData(InOutTimes value) { this.GetCardData = value; return this; }
public InOutTimes getCardTokenize() { return CardTokenize; }
public RequestTimestamps setCardTokenize(InOutTimes value) { this.CardTokenize = value; return this; }
public InOutTimes getCardEncrypt() { return CardEncrypt; }
public RequestTimestamps setCardEncrypt(InOutTimes value) { this.CardEncrypt = value; return this; }
public InOutTimes getDbInsert() { return DBInsert; }
public RequestTimestamps setDbInsert(InOutTimes value) { this.DBInsert = value; return this; }
public InOutTimes getBackendProcess() { return BackendProcess; }
public RequestTimestamps setBackendProcess(InOutTimes value) { this.BackendProcess = value; return this; }
public InOutTimes getDbUpdate() { return DBUpdate; }
public RequestTimestamps setDbUpdate(InOutTimes value) { this.DBUpdate = value; return this; }
public InOutTimes getParentUpdate() { return ParentUpdate; }
public RequestTimestamps setParentUpdate(InOutTimes value) { this.ParentUpdate = value; return this; }
public InOutTimes getNetwork() { return Network; }
public RequestTimestamps setNetwork(InOutTimes value) { this.Network = value; return this; }
}
@DataContract
public static class InOutTimes
{
}
@DataContract
public static class UserInformation
{
@DataMember
public ArrayList<String> Name = null;
@DataMember
public ArrayList<String> Phone = null;
@DataMember
public ArrayList<String> Email = null;
@DataMember
public ArrayList<AddressDetails> Address = null;
public ArrayList<String> getName() { return Name; }
public UserInformation setName(ArrayList<String> value) { this.Name = value; return this; }
public ArrayList<String> getPhone() { return Phone; }
public UserInformation setPhone(ArrayList<String> value) { this.Phone = value; return this; }
public ArrayList<String> getEmail() { return Email; }
public UserInformation setEmail(ArrayList<String> value) { this.Email = value; return this; }
public ArrayList<AddressDetails> getAddress() { return Address; }
public UserInformation setAddress(ArrayList<AddressDetails> value) { this.Address = value; return this; }
}
@DataContract
public static class AddressDetails
{
@DataMember
public String Address1 = null;
@DataMember
public String Address2 = null;
@DataMember
public String City = null;
@DataMember
public String State = null;
@DataMember
public String Zip = null;
@DataMember
public String Country = null;
public String getAddress1() { return Address1; }
public AddressDetails setAddress1(String value) { this.Address1 = value; return this; }
public String getAddress2() { return Address2; }
public AddressDetails setAddress2(String value) { this.Address2 = value; return this; }
public String getCity() { return City; }
public AddressDetails setCity(String value) { this.City = value; return this; }
public String getState() { return State; }
public AddressDetails setState(String value) { this.State = value; return this; }
public String getZip() { return Zip; }
public AddressDetails setZip(String value) { this.Zip = value; return this; }
public String getCountry() { return Country; }
public AddressDetails setCountry(String value) { this.Country = value; return this; }
}
@DataContract
public static class ACHExtendedDataResponse
{
@DataMember(EmitDefaultValue=false)
public String NetworkResponseCode = null;
@DataMember(EmitDefaultValue=false)
public String NetworkErrorCode = null;
@DataMember(EmitDefaultValue=false)
public String DeclineReferenceCode = null;
@DataMember(EmitDefaultValue=false)
public String NetworkTransactionId = null;
public String getNetworkResponseCode() { return NetworkResponseCode; }
public ACHExtendedDataResponse setNetworkResponseCode(String value) { this.NetworkResponseCode = value; return this; }
public String getNetworkErrorCode() { return NetworkErrorCode; }
public ACHExtendedDataResponse setNetworkErrorCode(String value) { this.NetworkErrorCode = value; return this; }
public String getDeclineReferenceCode() { return DeclineReferenceCode; }
public ACHExtendedDataResponse setDeclineReferenceCode(String value) { this.DeclineReferenceCode = value; return this; }
public String getNetworkTransactionId() { return NetworkTransactionId; }
public ACHExtendedDataResponse setNetworkTransactionId(String value) { this.NetworkTransactionId = value; return this; }
}
}
Java 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>