POST | /ACHRefund |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@DataContract
public static class AchRefundRequest
{
@DataMember
public RequestorCredentials Credentials = null;
@DataMember
public String TranId = null;
@DataMember
public Integer Amount = null;
@DataMember
public String ReferenceKey = null;
@DataMember
public MerchantDescriptor MerchantDetails = null;
@DataMember
public String Custom1 = null;
@DataMember
public String Custom2 = null;
@DataMember
public String Custom3 = null;
@DataMember
public String Custom4 = null;
@DataMember
public String Custom5 = null;
@DataMember
public String SignatureHash = null;
@DataMember
public Avs AVS = null;
@DataMember
public ACHExtendedData ExtendedData = null;
public RequestorCredentials getCredentials() { return Credentials; }
public AchRefundRequest setCredentials(RequestorCredentials value) { this.Credentials = value; return this; }
public String getTranId() { return TranId; }
public AchRefundRequest setTranId(String value) { this.TranId = value; return this; }
public Integer getAmount() { return Amount; }
public AchRefundRequest setAmount(Integer value) { this.Amount = value; return this; }
public String getReferenceKey() { return ReferenceKey; }
public AchRefundRequest setReferenceKey(String value) { this.ReferenceKey = value; return this; }
public MerchantDescriptor getMerchantDetails() { return MerchantDetails; }
public AchRefundRequest setMerchantDetails(MerchantDescriptor value) { this.MerchantDetails = value; return this; }
public String getCustom1() { return Custom1; }
public AchRefundRequest setCustom1(String value) { this.Custom1 = value; return this; }
public String getCustom2() { return Custom2; }
public AchRefundRequest setCustom2(String value) { this.Custom2 = value; return this; }
public String getCustom3() { return Custom3; }
public AchRefundRequest setCustom3(String value) { this.Custom3 = value; return this; }
public String getCustom4() { return Custom4; }
public AchRefundRequest setCustom4(String value) { this.Custom4 = value; return this; }
public String getCustom5() { return Custom5; }
public AchRefundRequest setCustom5(String value) { this.Custom5 = value; return this; }
public String getSignatureHash() { return SignatureHash; }
public AchRefundRequest setSignatureHash(String value) { this.SignatureHash = value; return this; }
public Avs getAvs() { return AVS; }
public AchRefundRequest setAvs(Avs value) { this.AVS = value; return this; }
public ACHExtendedData getExtendedData() { return ExtendedData; }
public AchRefundRequest 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; }
}
public static class MerchantDescriptor extends MerchantDescriptorBase
{
public String Name = null;
public String Address = null;
public String City = null;
public String State = null;
public String Zip = null;
public String Country = null;
public String CustomerServiceNumber = null;
public String MCC = null;
public String FNSnum = null;
public String Email = null;
public String getName() { return Name; }
public MerchantDescriptor setName(String value) { this.Name = value; return this; }
public String getAddress() { return Address; }
public MerchantDescriptor setAddress(String value) { this.Address = value; return this; }
public String getCity() { return City; }
public MerchantDescriptor setCity(String value) { this.City = value; return this; }
public String getState() { return State; }
public MerchantDescriptor setState(String value) { this.State = value; return this; }
public String getZip() { return Zip; }
public MerchantDescriptor setZip(String value) { this.Zip = value; return this; }
public String getCountry() { return Country; }
public MerchantDescriptor setCountry(String value) { this.Country = value; return this; }
public String getCustomerServiceNumber() { return CustomerServiceNumber; }
public MerchantDescriptor setCustomerServiceNumber(String value) { this.CustomerServiceNumber = value; return this; }
public String getMcc() { return MCC; }
public MerchantDescriptor setMcc(String value) { this.MCC = value; return this; }
public String getFnSnum() { return FNSnum; }
public MerchantDescriptor setFnSnum(String value) { this.FNSnum = value; return this; }
public String getEmail() { return Email; }
public MerchantDescriptor setEmail(String value) { this.Email = value; return this; }
}
public static class MerchantDescriptorBase
{
public MerchantDataElements DataElements = null;
public MerchantDataElements getDataElements() { return DataElements; }
public MerchantDescriptorBase setDataElements(MerchantDataElements value) { this.DataElements = value; return this; }
}
public static class MerchantDataElements
{
public Integer RefundSettlementTypeDetails = null;
public Boolean SendRecurringPOSEntryModeFeature = null;
public Boolean UseOrgPOSCode = null;
public Integer getRefundSettlementTypeDetails() { return RefundSettlementTypeDetails; }
public MerchantDataElements setRefundSettlementTypeDetails(Integer value) { this.RefundSettlementTypeDetails = value; return this; }
public Boolean isSendRecurringPOSEntryModeFeature() { return SendRecurringPOSEntryModeFeature; }
public MerchantDataElements setSendRecurringPOSEntryModeFeature(Boolean value) { this.SendRecurringPOSEntryModeFeature = value; return this; }
public Boolean isUseOrgPOSCode() { return UseOrgPOSCode; }
public MerchantDataElements setUseOrgPOSCode(Boolean value) { this.UseOrgPOSCode = value; return this; }
}
public static class Avs
{
public String Address = null;
public String City = null;
public String State = null;
public String Zip = null;
public String Country = null;
public String Email = null;
public String IPAddress = null;
public String TelephoneNumber = null;
public TelephoneType TelephoneType = null;
public Integer DeliveryMethod = null;
public String FirstName = null;
public String MiddleName = null;
public String LastName = null;
public String getAddress() { return Address; }
public Avs setAddress(String value) { this.Address = value; return this; }
public String getCity() { return City; }
public Avs setCity(String value) { this.City = value; return this; }
public String getState() { return State; }
public Avs setState(String value) { this.State = value; return this; }
public String getZip() { return Zip; }
public Avs setZip(String value) { this.Zip = value; return this; }
public String getCountry() { return Country; }
public Avs setCountry(String value) { this.Country = value; return this; }
public String getEmail() { return Email; }
public Avs setEmail(String value) { this.Email = value; return this; }
public String getIpAddress() { return IPAddress; }
public Avs setIpAddress(String value) { this.IPAddress = value; return this; }
public String getTelephoneNumber() { return TelephoneNumber; }
public Avs setTelephoneNumber(String value) { this.TelephoneNumber = value; return this; }
public TelephoneType getTelephoneType() { return TelephoneType; }
public Avs setTelephoneType(TelephoneType value) { this.TelephoneType = value; return this; }
public Integer getDeliveryMethod() { return DeliveryMethod; }
public Avs setDeliveryMethod(Integer value) { this.DeliveryMethod = value; return this; }
public String getFirstName() { return FirstName; }
public Avs setFirstName(String value) { this.FirstName = value; return this; }
public String getMiddleName() { return MiddleName; }
public Avs setMiddleName(String value) { this.MiddleName = value; return this; }
public String getLastName() { return LastName; }
public Avs setLastName(String value) { this.LastName = value; return this; }
}
public static enum TelephoneType
{
D,
H,
N,
W;
}
@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 Refund extends PaysecureVersion
{
@DataMember
public String TranId = null;
@DataMember
public String ApprovalCode = null;
@DataMember
public String ResponseCode = null;
@DataMember
public String Network = null;
@DataMember
public String ErrorMessage = null;
@DataMember
public String ErrorCode = null;
public String getTranId() { return TranId; }
public Refund setTranId(String value) { this.TranId = value; return this; }
public String getApprovalCode() { return ApprovalCode; }
public Refund setApprovalCode(String value) { this.ApprovalCode = value; return this; }
public String getResponseCode() { return ResponseCode; }
public Refund setResponseCode(String value) { this.ResponseCode = value; return this; }
public String getNetwork() { return Network; }
public Refund setNetwork(String value) { this.Network = value; return this; }
public String getErrorMessage() { return ErrorMessage; }
public Refund setErrorMessage(String value) { this.ErrorMessage = value; return this; }
public String getErrorCode() { return ErrorCode; }
public Refund setErrorCode(String value) { this.ErrorCode = value; return this; }
}
@DataContract
public static class PaysecureVersion extends PaysecureResponseInternal
{
@DataMember(EmitDefaultValue=false)
public String LocalDateTime = null;
@DataMember(EmitDefaultValue=false)
public String Token = null;
@DataMember(EmitDefaultValue=false)
public ExtendedResponse ExtendedData = null;
public String getLocalDateTime() { return LocalDateTime; }
public PaysecureVersion setLocalDateTime(String value) { this.LocalDateTime = value; return this; }
public String getToken() { return Token; }
public PaysecureVersion setToken(String value) { this.Token = value; return this; }
public ExtendedResponse getExtendedData() { return ExtendedData; }
public PaysecureVersion setExtendedData(ExtendedResponse 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 ExtendedResponse
{
@DataMember(EmitDefaultValue=false)
public CardAccountUpdaterDescriptor CardAccountUpdater = null;
@DataMember(EmitDefaultValue=false)
public String ProductId = null;
@DataMember(EmitDefaultValue=false)
public String NetworkResponseCode = null;
@DataMember(EmitDefaultValue=false)
public String NetworkTransactionId = null;
@DataMember(EmitDefaultValue=false)
public String CHEmailAddrResult = null;
public CardAccountUpdaterDescriptor getCardAccountUpdater() { return CardAccountUpdater; }
public ExtendedResponse setCardAccountUpdater(CardAccountUpdaterDescriptor value) { this.CardAccountUpdater = value; return this; }
public String getProductId() { return ProductId; }
public ExtendedResponse setProductId(String value) { this.ProductId = value; return this; }
public String getNetworkResponseCode() { return NetworkResponseCode; }
public ExtendedResponse setNetworkResponseCode(String value) { this.NetworkResponseCode = value; return this; }
public String getNetworkTransactionId() { return NetworkTransactionId; }
public ExtendedResponse setNetworkTransactionId(String value) { this.NetworkTransactionId = value; return this; }
public String getChEmailAddrResult() { return CHEmailAddrResult; }
public ExtendedResponse setChEmailAddrResult(String value) { this.CHEmailAddrResult = value; return this; }
}
public static class CardAccountUpdaterDescriptor
{
public CardInfoType CardDataType = null;
public String CardNumberInfo = null;
public String ExpiryDate = null;
public String Status = null;
public String ErrorCode = null;
public String CardToken = null;
public CardInfoType getCardDataType() { return CardDataType; }
public CardAccountUpdaterDescriptor setCardDataType(CardInfoType value) { this.CardDataType = value; return this; }
public String getCardNumberInfo() { return CardNumberInfo; }
public CardAccountUpdaterDescriptor setCardNumberInfo(String value) { this.CardNumberInfo = value; return this; }
public String getExpiryDate() { return ExpiryDate; }
public CardAccountUpdaterDescriptor setExpiryDate(String value) { this.ExpiryDate = value; return this; }
public String getStatus() { return Status; }
public CardAccountUpdaterDescriptor setStatus(String value) { this.Status = value; return this; }
public String getErrorCode() { return ErrorCode; }
public CardAccountUpdaterDescriptor setErrorCode(String value) { this.ErrorCode = value; return this; }
public String getCardToken() { return CardToken; }
public CardAccountUpdaterDescriptor setCardToken(String value) { this.CardToken = value; return this; }
}
public static enum CardInfoType
{
CardNumber,
Token,
Track,
Emv,
Encrypted,
Dpan,
ApplePay,
GooglePay,
SamsungPay,
CpToken,
EncryptedEnhanced,
EncryptedJWE;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /ACHRefund HTTP/1.1
Host: api.paysecure.acculynk.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Credentials:
{
MerchantId: String,
UserName: String,
Password: String,
Version: String
},
TranId: String,
Amount: 0,
ReferenceKey: String,
MerchantDetails:
{
Name: String,
Address: String,
City: String,
State: String,
Zip: String,
Country: String,
CustomerServiceNumber: String,
MCC: String,
FNSnum: String,
Email: String,
DataElements:
{
RefundSettlementTypeDetails: 0,
SendRecurringPOSEntryModeFeature: False,
UseOrgPOSCode: False
}
},
Custom1: String,
Custom2: String,
Custom3: String,
Custom4: String,
Custom5: String,
SignatureHash: String,
AVS:
{
Address: String,
City: String,
State: String,
Zip: String,
Country: String,
Email: String,
IPAddress: String,
TelephoneNumber: String,
TelephoneType: D,
DeliveryMethod: 0,
FirstName: String,
MiddleName: String,
LastName: String
},
ExtendedData:
{
CashbackAmount: 0,
ConnectPaySubScriberId: String,
OrganizationId: String,
DeviceFingerPrint: String,
MerchantSessionId: String,
CurrencyCode: String,
PaymentType: String,
VerifyCustomer: False,
CustomerExternalId: String,
Description: String,
CustomerName: String,
AddressLine1: String,
AddressLine2: String,
City: String,
State: String,
Zip: String,
Country: String,
Email: String,
TelephoneNumber: String,
ReturnUrl: String,
CancelUrl: String,
EstablishData: String,
RedirectUrl: String,
RetryAttemptCount: 0,
SignatureHashVersion: String,
DeadlineHashDate: 0001-01-01
}
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { TranId: String, ApprovalCode: String, ResponseCode: String, Network: String, ErrorMessage: String, ErrorCode: String, LocalDateTime: String, Token: String, ExtendedData: { CardAccountUpdater: { CardDataType: CardNumber, CardNumberInfo: String, ExpiryDate: String, Status: String, ErrorCode: String, CardToken: String }, ProductId: String, NetworkResponseCode: String, NetworkTransactionId: String, CHEmailAddrResult: String }, Timestamps: { AppLayer: { InTime: 0001-01-01, OutTime: 0001-01-01 }, ParentLookup: { InTime: 0001-01-01, OutTime: 0001-01-01 }, RetryLookup: { InTime: 0001-01-01, OutTime: 0001-01-01 }, GetCardData: { InTime: 0001-01-01, OutTime: 0001-01-01 }, CardTokenize: { InTime: 0001-01-01, OutTime: 0001-01-01 }, CardEncrypt: { InTime: 0001-01-01, OutTime: 0001-01-01 }, DBInsert: { InTime: 0001-01-01, OutTime: 0001-01-01 }, BackendProcess: { InTime: 0001-01-01, OutTime: 0001-01-01 }, DBUpdate: { InTime: 0001-01-01, OutTime: 0001-01-01 }, ParentUpdate: { InTime: 0001-01-01, OutTime: 0001-01-01 }, Network: { InTime: 0001-01-01, OutTime: 0001-01-01 } } }