POST | /ACHPreAuthCapture |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
@DataContract
open class AchPreAuthCaptureRequest
{
@DataMember
var Credentials:RequestorCredentials? = null
@DataMember
var TranId:String? = null
@DataMember
var Amount:Int? = null
@DataMember
var ReferenceKey:String? = null
@DataMember
var MerchantDetails:MerchantDescriptor? = null
@DataMember
var Custom1:String? = null
@DataMember
var Custom2:String? = null
@DataMember
var Custom3:String? = null
@DataMember
var Custom4:String? = null
@DataMember
var Custom5:String? = null
@DataMember
var SignatureHash:String? = null
@DataMember
var ExtendedData:ACHExtendedData? = null
}
open class RequestorCredentials
{
@Required()
var MerchantId:String? = null
@Required()
var UserName:String? = null
@Required()
var Password:String? = null
@Required()
var Version:String? = null
}
open class MerchantDescriptor : MerchantDescriptorBase()
{
var Name:String? = null
var Address:String? = null
var City:String? = null
var State:String? = null
var Zip:String? = null
var Country:String? = null
var CustomerServiceNumber:String? = null
var MCC:String? = null
var FNSnum:String? = null
var Email:String? = null
}
open class MerchantDescriptorBase
{
var DataElements:MerchantDataElements? = null
}
open class MerchantDataElements
{
var RefundSettlementTypeDetails:Int? = null
var SendRecurringPOSEntryModeFeature:Boolean? = null
var UseOrgPOSCode:Boolean? = null
}
@DataContract
open class ACHExtendedData
{
@DataMember
var CashbackAmount:Int? = null
@DataMember
var ConnectPaySubScriberId:String? = null
@DataMember
var OrganizationId:String? = null
@DataMember
var DeviceFingerPrint:String? = null
@DataMember
var MerchantSessionId:String? = null
@DataMember
var CurrencyCode:String? = null
@DataMember
var PaymentType:String? = null
@DataMember
var VerifyCustomer:Boolean? = null
@DataMember
var CustomerExternalId:String? = null
@DataMember
var Description:String? = null
@DataMember
var CustomerName:String? = null
@DataMember
var AddressLine1:String? = null
@DataMember
var AddressLine2:String? = null
@DataMember
var City:String? = null
@DataMember
var State:String? = null
@DataMember
var Zip:String? = null
@DataMember
var Country:String? = null
@DataMember
var Email:String? = null
@DataMember
var TelephoneNumber:String? = null
@DataMember
var ReturnUrl:String? = null
@DataMember
var CancelUrl:String? = null
@DataMember
var EstablishData:String? = null
@DataMember
var RedirectUrl:String? = null
@DataMember
var RetryAttemptCount:Int? = null
@DataMember
var SignatureHashVersion:String? = null
@DataMember
var DeadlineHashDate:Date? = null
}
@DataContract
open class AchPreAuthCapture : AchPaysecureVersion()
{
@DataMember
var TranId:String? = null
@DataMember
var ApprovalCode:String? = null
@DataMember
var ResponseCode:String? = null
@DataMember
var ErrorMessage:String? = null
@DataMember
var ErrorCode:String? = null
@DataMember(EmitDefaultValue=false)
var AchProviderDetails:AchProviderResponse? = null
}
@DataContract
open class AchPaysecureVersion : PaysecureResponseInternal()
{
@DataMember(EmitDefaultValue=false)
var LocalDateTime:String? = null
@DataMember(EmitDefaultValue=false)
var ExtendedData:ACHExtendedDataResponse? = null
}
@DataContract
open class PaysecureResponseInternal
{
@DataMember(EmitDefaultValue=false)
var Timestamps:RequestTimestamps? = null
}
@DataContract
open class RequestTimestamps
{
@DataMember(EmitDefaultValue=false)
var AppLayer:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var ParentLookup:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var RetryLookup:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var GetCardData:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var CardTokenize:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var CardEncrypt:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var DBInsert:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var BackendProcess:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var DBUpdate:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var ParentUpdate:InOutTimes? = null
@DataMember(EmitDefaultValue=false)
var Network:InOutTimes? = null
}
@DataContract
open class InOutTimes
{
}
@DataContract
open class ACHExtendedDataResponse
{
@DataMember(EmitDefaultValue=false)
var NetworkResponseCode:String? = null
@DataMember(EmitDefaultValue=false)
var NetworkErrorCode:String? = null
@DataMember(EmitDefaultValue=false)
var DeclineReferenceCode:String? = null
@DataMember(EmitDefaultValue=false)
var NetworkTransactionId:String? = null
}
@DataContract
open class AchProviderResponse
{
@DataMember
var NetworkResponseCode:String? = null
@DataMember
var TransactionStatusCode:Int? = null
}
Kotlin AchPreAuthCaptureRequest 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 /ACHPreAuthCapture HTTP/1.1
Host: api.paysecure.acculynk.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<AchPreAuthCaptureRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
<Amount>0</Amount>
<Credentials>
<MerchantId>String</MerchantId>
<Password>String</Password>
<UserName>String</UserName>
<Version>String</Version>
</Credentials>
<Custom1>String</Custom1>
<Custom2>String</Custom2>
<Custom3>String</Custom3>
<Custom4>String</Custom4>
<Custom5>String</Custom5>
<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>
<MerchantDetails>
<DataElements>
<RefundSettlementTypeDetails>0</RefundSettlementTypeDetails>
<SendRecurringPOSEntryModeFeature>false</SendRecurringPOSEntryModeFeature>
<UseOrgPOSCode>false</UseOrgPOSCode>
</DataElements>
<Address>String</Address>
<City>String</City>
<Country>String</Country>
<CustomerServiceNumber>String</CustomerServiceNumber>
<Email>String</Email>
<FNSnum>String</FNSnum>
<MCC>String</MCC>
<Name>String</Name>
<State>String</State>
<Zip>String</Zip>
</MerchantDetails>
<ReferenceKey>String</ReferenceKey>
<SignatureHash>String</SignatureHash>
<TranId>String</TranId>
</AchPreAuthCaptureRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <AchPreAuthCapture 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> <ExtendedData> <DeclineReferenceCode>String</DeclineReferenceCode> <NetworkErrorCode>String</NetworkErrorCode> <NetworkResponseCode>String</NetworkResponseCode> <NetworkTransactionId>String</NetworkTransactionId> </ExtendedData> <LocalDateTime>String</LocalDateTime> <AchProviderDetails> <NetworkResponseCode>String</NetworkResponseCode> <TransactionStatusCode>0</TransactionStatusCode> </AchProviderDetails> <ApprovalCode>String</ApprovalCode> <ErrorCode>String</ErrorCode> <ErrorMessage>String</ErrorMessage> <ResponseCode>String</ResponseCode> <TranId>String</TranId> </AchPreAuthCapture>