| POST | /integrations/api/{integrationType}/heldpayment/chargerefund |
|---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BH.CloudAPI.DTO.HeldPayments.Api.Request;
using BH.CloudAPI.DTO.HeldPayments.Api;
using BH.CloudAPI.DTO.HeldPayments.Api.Response;
using BH.CloudAPI.DTO.HeldPayments;
using BH.CloudAPI.DTO.Charges.Api;
using BH.CloudAPI.Common4.DTO;
namespace BH.CloudAPI.Common4.DTO
{
public partial class AttributeItem
{
public virtual string Name { get; set; }
public virtual string Value { get; set; }
}
}
namespace BH.CloudAPI.DTO.Charges.Api
{
public partial class AchChargeVerificationResult
{
public virtual bool NetworkVerificationAttempted { get; set; }
public virtual string Result { get; set; }
}
public partial class CreditCardBillingAddressItem
{
public CreditCardBillingAddressItem()
{
Attributes = new List<AttributeItem>{};
}
public virtual string Address1 { get; set; }
public virtual string Address2 { get; set; }
public virtual string City { get; set; }
public virtual string PostalCode { get; set; }
public virtual string Region { get; set; }
public virtual string Country { get; set; }
public virtual List<AttributeItem> Attributes { get; set; }
}
public partial class CreditCardChargeVerificationResult
{
public virtual bool NetworkVerificationAttempted { get; set; }
public virtual string CvvVerificationResult { get; set; }
public virtual string AddressVerificationResult { get; set; }
public virtual string PostalCodeVerificationResult { get; set; }
}
}
namespace BH.CloudAPI.DTO.HeldPayments
{
public partial class HeldPaymentGatewaySaleResponse
{
public virtual string FailureType { get; set; }
public virtual bool IsDuplicate { get; set; }
public virtual bool IsSuccessful { get; set; }
public virtual string ErrorCode { get; set; }
public virtual string Message { get; set; }
public virtual int GatewayId { get; set; }
public virtual string ConfirmationNumber { get; set; }
public virtual string NetworkTransactionId { get; set; }
}
}
namespace BH.CloudAPI.DTO.HeldPayments.Api
{
public partial class HeldPaymentAchChargeDetails
{
public virtual string AccountType { get; set; }
public virtual string RoutingNumber { get; set; }
public virtual string AccountNumberLast4 { get; set; }
public virtual string BankName { get; set; }
public virtual AchChargeVerificationResult VerificationResult { get; set; }
}
public partial class HeldPaymentChargeDetails
{
public virtual string PaymentType { get; set; }
public virtual decimal Amount { get; set; }
public virtual string IntegrationType { get; set; }
public virtual string Currency { get; set; }
public virtual HeldPaymentCreditCardChargeDetails CardDetails { get; set; }
public virtual HeldPaymentAchChargeDetails AchDetails { get; set; }
}
public partial class HeldPaymentCreditCardChargeDetails
{
public virtual string CardType { get; set; }
public virtual int ExpMonth { get; set; }
public virtual int ExpYear { get; set; }
public virtual string Last4 { get; set; }
public virtual CreditCardBillingAddressItem Address { get; set; }
public virtual CreditCardChargeVerificationResult VerificationResult { get; set; }
}
public partial class HeldPaymentCreditCardChargeRefundDetails
{
public virtual string CardRef { get; set; }
public virtual int ExpMonth { get; set; }
public virtual int ExpYear { get; set; }
public virtual string CVV { get; set; }
public virtual string CardType { get; set; }
public virtual string NameOnCard { get; set; }
public virtual string Address1 { get; set; }
public virtual string Address2 { get; set; }
public virtual string City { get; set; }
public virtual string State { get; set; }
public virtual string PostalCode { get; set; }
public virtual string Country { get; set; }
}
}
namespace BH.CloudAPI.DTO.HeldPayments.Api.Request
{
public partial class HeldPaymentChargeRefundRq
{
public virtual string integrationType { get; set; }
public virtual int NationalId { get; set; }
public virtual int ChapterId { get; set; }
public virtual int UserId { get; set; }
public virtual int ContextIntegrationPartnerId { get; set; }
public virtual int CallerIntegrationPartnerId { get; set; }
public virtual int AuthenticationId { get; set; }
public virtual decimal Amount { get; set; }
public virtual string Description { get; set; }
public virtual string GatewayConfirmation { get; set; }
public virtual HeldPaymentCreditCardChargeRefundDetails CardInfo { get; set; }
}
}
namespace BH.CloudAPI.DTO.HeldPayments.Api.Response
{
public partial class HeldPaymentChargeRefundRs
{
public virtual int NationalId { get; set; }
public virtual int ChapterId { get; set; }
public virtual string IntegrationType { get; set; }
public virtual int ContextIntegrationPartnerId { get; set; }
public virtual int CallerIntegrationPartnerId { get; set; }
public virtual HeldPaymentGatewaySaleResponse GatewayResponse { get; set; }
public virtual HeldPaymentChargeDetails ChargeDetails { get; set; }
}
}
C# HeldPaymentChargeRefundRq DTOs
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 /integrations/api/{integrationType}/heldpayment/chargerefund HTTP/1.1
Host: devapi.billhighway.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
integrationType: String,
NationalId: 0,
ChapterId: 0,
UserId: 0,
ContextIntegrationPartnerId: 0,
CallerIntegrationPartnerId: 0,
AuthenticationId: 0,
Amount: 0,
Description: String,
GatewayConfirmation: String,
CardInfo:
{
CardRef: String,
ExpMonth: 0,
ExpYear: 0,
CVV: String,
CardType: String,
NameOnCard: String,
Address1: String,
Address2: String,
City: String,
State: String,
PostalCode: String,
Country: String
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
NationalId: 0,
ChapterId: 0,
IntegrationType: String,
ContextIntegrationPartnerId: 0,
CallerIntegrationPartnerId: 0,
GatewayResponse:
{
FailureType: String,
IsDuplicate: False,
IsSuccessful: False,
ErrorCode: String,
Message: String,
GatewayId: 0,
ConfirmationNumber: String,
NetworkTransactionId: String
},
ChargeDetails:
{
PaymentType: String,
Amount: 0,
IntegrationType: String,
Currency: String,
CardDetails:
{
CardType: String,
ExpMonth: 0,
ExpYear: 0,
Last4: String,
Address:
{
Address1: String,
Address2: String,
City: String,
PostalCode: String,
Region: String,
Country: String,
Attributes:
[
{
Name: String,
Value: String
}
]
},
VerificationResult:
{
NetworkVerificationAttempted: False,
CvvVerificationResult: String,
AddressVerificationResult: String,
PostalCodeVerificationResult: String
}
},
AchDetails:
{
AccountType: String,
RoutingNumber: String,
AccountNumberLast4: String,
BankName: String,
VerificationResult:
{
NetworkVerificationAttempted: False,
Result: String
}
}
}
}