POST | /WICReverse |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
@DataContract
open class WICReverseRequest
{
@DataMember
var Credentials:RequestorCredentials? = null
@DataMember
var OriginalData:OriginalTransaction? = null
@DataMember
var ReferenceKey:String? = null
@DataMember
var Reason: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:ExtendedData? = 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 OriginalTransaction
{
var OriginalIdentifierType:OriginalDataType? = null
var OriginalDataIdentifier:String? = null
}
enum class OriginalDataType(val value:Int)
{
TransactionId(1),
ReferenceKey(2),
ExternalId(3),
InternalTransactionId(4),
}
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 ExtendedData
{
@DataMember
var Track2DataForEMVTransaction:String? = null
@DataMember
var SenderInfo:SenderInfo? = null
@DataMember
var CashbackAmount:Int? = null
@DataMember
var Network:NetworkName? = null
@DataMember
var ReceiverInfo:ReceiverInfo? = null
@DataMember
var BillPayGroup:BillPayGroup? = null
@DataMember
var WalletData:WalletDescriptor? = null
@DataMember
var SecureData:SecureDescriptor? = null
@DataMember
var Level2Data:Level2Descriptor? = null
@DataMember
var PaymentFacilitatorData:PaymentFacilitatorDescriptor? = null
@DataMember
var TokenData:TokenDescriptor? = null
@DataMember
var OTPTranId:String? = null
@DataMember
var CurrentShipment:Int? = null
@DataMember
var TotalShipments:Int? = null
@DataMember
var IsTokenRequested:Boolean? = null
@DataMember
var CardonFileIndicator:CardonFileIndicatorDescriptor? = null
@DataMember
var CardAccountUpdater:CardAccountUpdaterInfo? = null
@DataMember
var RetryAttemptCount:Int? = null
@DataMember
var TotalAuthAmount:Int? = null
@DataMember
var SignatureHashVersion:String? = null
@DataMember
var OrderTypeDetail:OrderTypeInfo? = null
@DataMember
var BillPayGroupIndicator:BillPayGroupIndicator? = null
@DataMember
var ChargeTypeDetail:ChargeTypeInfo? = null
@DataMember
var SAFEligible:SAFEligibleFlag? = null
}
open class SenderInfo
{
var ReferenceNumber:String? = null
var AccountNumber:String? = null
/**
* Name Format FirstName{Space}LastName. For Example :- Alvaro Morata
*/
var Name:String? = null
var Address:String? = null
var City:String? = null
var State:String? = null
var Country:String? = null
/**
* DateOfBirth Format MMDDYYYY. For Example :- 05051960
*/
var DateOfBirth:String? = null
var Zip:String? = null
var PhoneNumber:String? = null
var FundingSource:FundingSourceType? = null
}
enum class FundingSourceType
{
DepositAccount,
Credit,
Debit,
Prepaid,
}
enum class NetworkName
{
Default,
Nyce,
CU24,
Xcel,
Star,
Puls,
Shzm,
Visa,
Mast,
Disc,
Amex,
Alip,
Upin,
Stac,
Stne,
Maes,
Intl,
}
open class ReceiverInfo
{
var ReferenceNumber:String? = null
var AccountNumber:String? = null
/**
* Name Format FirstName{Space}LastName. For Example :- Alvaro Morata
*/
var Name:String? = null
var Address:String? = null
var City:String? = null
var State:String? = null
var Country:String? = null
var Zip:String? = null
var PhoneNumber:String? = null
}
enum class BillPayGroup
{
Default,
Single,
Recurring,
Installment,
Deferred,
}
open class WalletDescriptor
{
var Type:String? = null
var EncryptedData:String? = null
var ApplicationDataHash:String? = null
var EphemeralPublicKey:String? = null
var PublicKeyHash:String? = null
var TransactionId:String? = null
var Signature:String? = null
var Version:String? = null
var ApplicationData:String? = null
var MerchantIdentifier:String? = null
var SpecialPayment:String? = null
var DigitalWalletIndicator:DigitalWalletInfo? = null
}
enum class DigitalWalletInfo
{
Default,
Staged,
Passthrough,
}
open class SecureDescriptor
{
var CAVV:String? = null
var SecureTransactionId:String? = null
}
open class Level2Descriptor
{
var TaxDetails:TaxIndicator? = null
var MerchantReferenceNumber:String? = null
var MerchantTaxId:String? = null
var OrderNumber:String? = null
var TaxAmount:Int? = null
var DestinationPostalCode:String? = null
var ProductDescription:String? = null
}
enum class TaxIndicator
{
Default,
NoTaxInfoProvided,
TaxInfoProvided,
TaxExemptItem,
}
open class PaymentFacilitatorDescriptor
{
var PaymentFacilitatorIndicator:String? = null
var PFPhoneNumber:String? = null
var SubMerchID:String? = null
var SellerID:String? = null
}
open class TokenDescriptor
{
var TokenType:TokenTypes? = null
var TokenCryptogramData1:String? = null
var TokenCryptogramData2:String? = null
}
enum class TokenTypes
{
Default,
Ucaf,
Dsrp,
Ucafdsrp,
VisaVerified,
DigitalWallet,
VisaVerifiedDigitalWallet,
}
open class CardonFileIndicatorDescriptor
{
var CardonFile:CardonFileInfo? = null
var StoredCredentialIndicator:StoredCredentialIndicatorInfo? = null
var TransactionInitiate:TransactionInitiateInfo? = null
var ScheduleIndicator:ScheduleIndicatorInfo? = null
var NetworkTransactionId:String? = null
}
enum class CardonFileInfo
{
Default,
Supported,
NotSupported,
}
enum class StoredCredentialIndicatorInfo
{
Default,
Initial,
Subsequent,
}
enum class TransactionInitiateInfo
{
Default,
Merchant,
Terminal,
Customer,
}
enum class ScheduleIndicatorInfo
{
Default,
Scheduled,
Unscheduled,
}
enum class CardAccountUpdaterInfo
{
Default,
Supported,
NotSupported,
}
enum class OrderTypeInfo
{
Default,
Standing,
Subscription,
}
open class BillPayGroupIndicator
{
var MITTotalPaymentCount:String? = null
var MITAmountType:String? = null
var MITAmount:String? = null
var MITUniqueID:String? = null
var MITFrequency:String? = null
var MITValidationFlag:String? = null
var MITValidationReference:String? = null
var MITSequenceIndicator:String? = null
}
enum class ChargeTypeInfo
{
Default,
PartialShipment,
Delayed,
NoShow,
Resubmission,
}
enum class SAFEligibleFlag
{
Default,
True,
False,
}
@DataContract
open class WICReverse : PaysecureVersion()
{
@DataMember
var TranId:String? = null
@DataMember
var ResponseCode:String? = null
@DataMember
var ErrorMessage:String? = null
@DataMember
var ErrorCode:String? = null
@DataMember
var EarliestBenefitExpirationDate:String? = null
@DataMember
var WICBalances:ArrayList<WICBalance> = ArrayList<WICBalance>()
}
@DataContract
open class PaysecureVersion : PaysecureResponseInternal()
{
@DataMember(EmitDefaultValue=false)
var LocalDateTime:String? = null
@DataMember(EmitDefaultValue=false)
var Token:String? = null
@DataMember(EmitDefaultValue=false)
var ExtendedData:ExtendedResponse? = 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 ExtendedResponse
{
@DataMember(EmitDefaultValue=false)
var CardAccountUpdater:CardAccountUpdaterDescriptor? = null
@DataMember(EmitDefaultValue=false)
var ProductId:String? = null
@DataMember(EmitDefaultValue=false)
var NetworkResponseCode:String? = null
@DataMember(EmitDefaultValue=false)
var NetworkTransactionId:String? = null
@DataMember(EmitDefaultValue=false)
var CHEmailAddrResult:String? = null
}
open class CardAccountUpdaterDescriptor
{
var CardDataType:CardInfoType? = null
var CardNumberInfo:String? = null
var ExpiryDate:String? = null
var Status:String? = null
var ErrorCode:String? = null
var CardToken:String? = null
}
enum class CardInfoType
{
CardNumber,
Token,
Track,
Emv,
Encrypted,
Dpan,
ApplePay,
GooglePay,
SamsungPay,
CpToken,
EncryptedEnhanced,
EncryptedJWE,
}
open class WICBalance
{
var WICCategory:String? = null
var WICSubcategory:String? = null
var WICQuantity:Int? = null
}
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 /WICReverse HTTP/1.1
Host: api.paysecure.acculynk.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<WICReverseRequest 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>
<Custom1>String</Custom1>
<Custom2>String</Custom2>
<Custom3>String</Custom3>
<Custom4>String</Custom4>
<Custom5>String</Custom5>
<ExtendedData>
<BillPayGroup>Default</BillPayGroup>
<BillPayGroupIndicator>
<MITAmount>String</MITAmount>
<MITAmountType>String</MITAmountType>
<MITFrequency>String</MITFrequency>
<MITSequenceIndicator>String</MITSequenceIndicator>
<MITTotalPaymentCount>String</MITTotalPaymentCount>
<MITUniqueID>String</MITUniqueID>
<MITValidationFlag>String</MITValidationFlag>
<MITValidationReference>String</MITValidationReference>
</BillPayGroupIndicator>
<CardAccountUpdater>Default</CardAccountUpdater>
<CardonFileIndicator>
<CardonFile>Default</CardonFile>
<NetworkTransactionId>String</NetworkTransactionId>
<ScheduleIndicator>Default</ScheduleIndicator>
<StoredCredentialIndicator>Default</StoredCredentialIndicator>
<TransactionInitiate>Default</TransactionInitiate>
</CardonFileIndicator>
<CashbackAmount>0</CashbackAmount>
<ChargeTypeDetail>Default</ChargeTypeDetail>
<CurrentShipment>0</CurrentShipment>
<IsTokenRequested>false</IsTokenRequested>
<Level2Data>
<DestinationPostalCode>String</DestinationPostalCode>
<MerchantReferenceNumber>String</MerchantReferenceNumber>
<MerchantTaxId>String</MerchantTaxId>
<OrderNumber>String</OrderNumber>
<ProductDescription>String</ProductDescription>
<TaxAmount>0</TaxAmount>
<TaxDetails>Default</TaxDetails>
</Level2Data>
<Network>Default</Network>
<OTPTranId>String</OTPTranId>
<OrderTypeDetail>Default</OrderTypeDetail>
<PaymentFacilitatorData>
<PFPhoneNumber>String</PFPhoneNumber>
<PaymentFacilitatorIndicator>String</PaymentFacilitatorIndicator>
<SellerID>String</SellerID>
<SubMerchID>String</SubMerchID>
</PaymentFacilitatorData>
<ReceiverInfo>
<AccountNumber>String</AccountNumber>
<Address>String</Address>
<City>String</City>
<Country>String</Country>
<Name>String</Name>
<PhoneNumber>String</PhoneNumber>
<ReferenceNumber>String</ReferenceNumber>
<State>String</State>
<Zip>String</Zip>
</ReceiverInfo>
<RetryAttemptCount>0</RetryAttemptCount>
<SAFEligible>Default</SAFEligible>
<SecureData>
<CAVV>String</CAVV>
<SecureTransactionId>String</SecureTransactionId>
</SecureData>
<SenderInfo>
<AccountNumber>String</AccountNumber>
<Address>String</Address>
<City>String</City>
<Country>String</Country>
<DateOfBirth>String</DateOfBirth>
<FundingSource>DepositAccount</FundingSource>
<Name>String</Name>
<PhoneNumber>String</PhoneNumber>
<ReferenceNumber>String</ReferenceNumber>
<State>String</State>
<Zip>String</Zip>
</SenderInfo>
<SignatureHashVersion>String</SignatureHashVersion>
<TokenData>
<TokenCryptogramData1>String</TokenCryptogramData1>
<TokenCryptogramData2>String</TokenCryptogramData2>
<TokenType>Default</TokenType>
</TokenData>
<TotalAuthAmount>0</TotalAuthAmount>
<TotalShipments>0</TotalShipments>
<Track2DataForEMVTransaction>String</Track2DataForEMVTransaction>
<WalletData>
<ApplicationData>String</ApplicationData>
<ApplicationDataHash>String</ApplicationDataHash>
<DigitalWalletIndicator>Default</DigitalWalletIndicator>
<EncryptedData>String</EncryptedData>
<EphemeralPublicKey>String</EphemeralPublicKey>
<MerchantIdentifier>String</MerchantIdentifier>
<PublicKeyHash>String</PublicKeyHash>
<Signature>String</Signature>
<SpecialPayment>String</SpecialPayment>
<TransactionId>String</TransactionId>
<Type>String</Type>
<Version>String</Version>
</WalletData>
</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>
<OriginalData>
<OriginalDataIdentifier>String</OriginalDataIdentifier>
<OriginalIdentifierType>TransactionId</OriginalIdentifierType>
</OriginalData>
<Reason>String</Reason>
<ReferenceKey>String</ReferenceKey>
<SignatureHash>String</SignatureHash>
</WICReverseRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <WICReverse 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> <CHEmailAddrResult>String</CHEmailAddrResult> <CardAccountUpdater> <CardDataType>CardNumber</CardDataType> <CardNumberInfo>String</CardNumberInfo> <CardToken>String</CardToken> <ErrorCode>String</ErrorCode> <ExpiryDate>String</ExpiryDate> <Status>String</Status> </CardAccountUpdater> <NetworkResponseCode>String</NetworkResponseCode> <NetworkTransactionId>String</NetworkTransactionId> <ProductId>String</ProductId> </ExtendedData> <LocalDateTime>String</LocalDateTime> <Token>String</Token> <EarliestBenefitExpirationDate>String</EarliestBenefitExpirationDate> <ErrorCode>String</ErrorCode> <ErrorMessage>String</ErrorMessage> <ResponseCode>String</ResponseCode> <TranId>String</TranId> <WICBalances> <WICBalance> <WICCategory>String</WICCategory> <WICQuantity>0</WICQuantity> <WICSubcategory>String</WICSubcategory> </WICBalance> </WICBalances> </WICReverse>