| POST | /integrations/api/{integrationType}/core/charge |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BH.CloudAPI.DTO.CoreCharges.Api.Request
Imports BH.CloudAPI.DTO
Imports BH.CloudAPI.DTO.CoreCharges.Api.Response
Imports BH.CloudAPI.DTO.CoreCharges
Imports BH.CloudAPI.DTO.Charges.Api
Imports BH.CloudAPI.Common4.DTO
Namespace Global
Namespace BH.CloudAPI.Common4.DTO
Public Partial Class AttributeItem
Public Overridable Property Name As String
Public Overridable Property Value As String
End Class
End Namespace
Namespace BH.CloudAPI.DTO
Public Partial Class ReferenceIdTypedAssociationItem
Public Overridable Property Value As String
Public Overridable Property Type As String
End Class
End Namespace
Namespace BH.CloudAPI.DTO.Charges.Api
Public Partial Class CreditCardBillingAddressItem
Public Sub New()
Attributes = New List(Of AttributeItem)
End Sub
Public Overridable Property Address1 As String
Public Overridable Property Address2 As String
Public Overridable Property City As String
Public Overridable Property PostalCode As String
Public Overridable Property Region As String
Public Overridable Property Country As String
Public Overridable Property Attributes As List(Of AttributeItem)
End Class
Public Partial Class CreditCardChargeVerificationResult
Public Overridable Property NetworkVerificationAttempted As Boolean
Public Overridable Property CvvVerificationResult As String
Public Overridable Property AddressVerificationResult As String
Public Overridable Property PostalCodeVerificationResult As String
End Class
End Namespace
Namespace BH.CloudAPI.DTO.CoreCharges
Public Partial Class CoreChargeDetails
Public Overridable Property PaymentType As String
Public Overridable Property Amount As Integer
Public Overridable Property IntegrationType As String
Public Overridable Property Currency As String
Public Overridable Property CardDetails As CoreCreditCardChargeDetails
End Class
Public Partial Class CoreChargeGatewaySaleResponse
Public Overridable Property FailureType As String
Public Overridable Property IsDuplicate As Boolean
Public Overridable Property IsSuccessful As Boolean
Public Overridable Property ErrorCode As String
Public Overridable Property Message As String
Public Overridable Property GatewayId As Integer
Public Overridable Property ConfirmationNumber As String
Public Overridable Property NetworkTransactionId As String
End Class
Public Partial Class CoreCreditCardChargeDetails
Public Overridable Property CardType As String
Public Overridable Property ExpMonth As Integer
Public Overridable Property ExpYear As Integer
Public Overridable Property Last4 As String
Public Overridable Property Address As CreditCardBillingAddressItem
Public Overridable Property VerificationResult As CreditCardChargeVerificationResult
End Class
End Namespace
Namespace BH.CloudAPI.DTO.CoreCharges.Api.Request
Public Partial Class CoreChargeRq
Implements IChargeRequest
Public Sub New()
Invoices = New Dictionary(Of Long, Decimal)
ReferenceIds = New List(Of ReferenceIdTypedAssociationItem)
End Sub
<ApiMember(ParameterType:="path")>
Public Overridable Property integrationType As String
Public Overridable Property NationalId As Integer
Public Overridable Property ChapterId As Integer
Public Overridable Property StoredAccountId As Long
Public Overridable Property ContextIntegrationPartnerId As Integer
Public Overridable Property CallerIntegrationPartnerId As Integer
Public Overridable Property UserId As Integer
Public Overridable Property AuthenticationId As Integer
Public Overridable Property ChargeType As String
Public Overridable Property Token As String
<ApiMember(Format:="decimal", ParameterType:="model")>
Public Overridable Property Amount As Decimal
Public Overridable Property Description As String
Public Overridable Property Invoices As Dictionary(Of Long, Decimal)
Public Overridable Property CreatedById As Integer
Public Overridable Property ReferenceIds As List(Of ReferenceIdTypedAssociationItem)
Public Overridable Property TransactionId As Long
End Class
End Namespace
Namespace BH.CloudAPI.DTO.CoreCharges.Api.Response
Public Partial Class CoreChargeRs
Public Overridable Property TransactionId As String
Public Overridable Property StoredAccountId As Long
Public Overridable Property NationalId As Integer
Public Overridable Property ChapterId As Integer
Public Overridable Property ChargeType As String
Public Overridable Property IntegrationType As String
Public Overridable Property ContextIntegrationPartnerId As Integer
Public Overridable Property CallerIntegrationPartnerId As Integer
Public Overridable Property GatewayResponse As CoreChargeGatewaySaleResponse
Public Overridable Property ChargeDetails As CoreChargeDetails
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /integrations/api/{integrationType}/core/charge HTTP/1.1
Host: devapi.billhighway.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"integrationType":"String","NationalId":0,"ChapterId":0,"StoredAccountId":0,"ContextIntegrationPartnerId":0,"CallerIntegrationPartnerId":0,"UserId":0,"AuthenticationId":0,"ChargeType":"String","Token":"String","Amount":0,"Description":"String","Invoices":{"0":0},"CreatedById":0,"ReferenceIds":[{"Value":"String","Type":"String"}],"TransactionId":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"TransactionId":"String","StoredAccountId":0,"NationalId":0,"ChapterId":0,"ChargeType":"String","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"}}}}