| POST | /signup/api/nat/{natID}/group/{groupID}/subscription | ||
|---|---|---|---|
| POST | /signup/api/nat/{natID}/group/{groupID}/{userType}/user/{userID}/subscription |
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BH.CloudAPI.Common4.DTO.Subscriptions.Request
Imports BH.CloudAPI.Common4.DTO.Subscriptions
Imports BH.CloudAPI.Common4.DTO.SalesForce
Imports BH.CloudAPI.Common4.DTO.Subscriptions.Response
Namespace Global
Namespace BH.CloudAPI.Common4.DTO.SalesForce
Public Partial Class SubscriberFormField
Public Overridable Property Name As String
Public Overridable Property Value As String
End Class
End Namespace
Namespace BH.CloudAPI.Common4.DTO.Subscriptions
Public Partial Class AchPaymentInformation
Public Overridable Property AccountHolderName As String
Public Overridable Property CheckNumber As String
Public Overridable Property RoutingNumber As String
Public Overridable Property AccountNumber As String
Public Overridable Property AccountType As String
End Class
Public Partial Class BillMeLaterInformation
Public Sub New()
Campaigns = New List(Of CampaignInformation)
End Sub
Public Overridable Property IsBillMeLaterPayment As Boolean
Public Overridable Property IsBillMeLaterSubscription As Boolean
Public Overridable Property MemberSubscriptionInvId As Integer
Public Overridable Property Campaigns As List(Of CampaignInformation)
End Class
Public Partial Class CampaignInformation
Public Overridable Property CampaignId As Integer
Public Overridable Property CampaignName As String
Public Overridable Property Amount As Decimal
Public Overridable Property ChapPayID As String
End Class
Public Partial Class CcPaymentInformation
Public Overridable Property CardNumber As String
Public Overridable Property Cvv As String
Public Overridable Property ExpMonth As Integer
Public Overridable Property ExpYear As Integer
Public Overridable Property CardholderName As String
Public Overridable Property Country As String
Public Overridable Property BillingAddress As String
Public Overridable Property Address1 As String
Public Overridable Property Address2 As String
Public Overridable Property City As String
Public Overridable Property StateProvince As String
Public Overridable Property PostalCode As String
End Class
Public Partial Class ClientVerification
Public Overridable Property Provider As String
Public Overridable Property VerificationCode As String
End Class
Public Partial Class SubscriberFormData
Public Sub New()
FormFields = New List(Of SubscriberFormField)
End Sub
Public Overridable Property FormTemplateID As Integer
Public Overridable Property SignupTypeID As Integer
Public Overridable Property FormFields As List(Of SubscriberFormField)
End Class
Public Partial Class SubscriptionInformation
Public Overridable Property FrequencyID As Integer
Public Overridable Property SubscriptionInvoiceID As Integer
Public Overridable Property AutoRenew As Boolean
Public Overridable Property HasAgreedToTerms As Boolean
Public Overridable Property ClientSubscriberId As String
Public Overridable Property RenewedMemberSubscriptionInvID As Integer
End Class
End Namespace
Namespace BH.CloudAPI.Common4.DTO.Subscriptions.Request
Public Partial Class SubscriptionCreateRq
Public Sub New()
Campaigns = New List(Of CampaignInformation)
End Sub
Public Overridable Property NatID As Integer
Public Overridable Property GroupID As Integer
Public Overridable Property ClientGroupID As String
Public Overridable Property UserType As String
Public Overridable Property UserID As String
Public Overridable Property FormData As SubscriberFormData
Public Overridable Property SubscriptionInfo As SubscriptionInformation
Public Overridable Property VerificationInfo As ClientVerification
Public Overridable Property CcPaymentInfo As CcPaymentInformation
Public Overridable Property AchPaymentInfo As AchPaymentInformation
Public Overridable Property BillMeLater As BillMeLaterInformation
Public Overridable Property Campaigns As List(Of CampaignInformation)
End Class
End Namespace
Namespace BH.CloudAPI.Common4.DTO.Subscriptions.Response
Public Partial Class SubscriptionCreateRs
Public Overridable Property IsSuccess As Boolean
Public Overridable Property UniqueId As String
Public Overridable Property CreatedDateTime As Date
Public Overridable Property ClientId As Integer
Public Overridable Property BillhighwayUserId As Integer
Public Overridable Property ConfirmationNumber As String
Public Overridable Property PaymentConfirmationNumber As Long
Public Overridable Property SubscriptionConfirmationNumber As Long
Public Overridable Property ErrorCode As String
Public Overridable Property Message As String
Public Overridable Property FriendlyMessage As String
End Class
End Namespace
End Namespace
VB.NET SubscriptionCreateRq 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 /signup/api/nat/{natID}/group/{groupID}/subscription HTTP/1.1
Host: devapi.billhighway.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<SubscriptionCreateRq xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions.Request">
<AchPaymentInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions">
<d2p1:AccountHolderName>String</d2p1:AccountHolderName>
<d2p1:AccountNumber>String</d2p1:AccountNumber>
<d2p1:AccountType>String</d2p1:AccountType>
<d2p1:CheckNumber>String</d2p1:CheckNumber>
<d2p1:RoutingNumber>String</d2p1:RoutingNumber>
</AchPaymentInfo>
<BillMeLater xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions">
<d2p1:Campaigns>
<d2p1:CampaignInformation>
<d2p1:Amount>0</d2p1:Amount>
<d2p1:CampaignId>0</d2p1:CampaignId>
<d2p1:CampaignName>String</d2p1:CampaignName>
<d2p1:ChapPayID>String</d2p1:ChapPayID>
</d2p1:CampaignInformation>
</d2p1:Campaigns>
<d2p1:IsBillMeLaterPayment>false</d2p1:IsBillMeLaterPayment>
<d2p1:IsBillMeLaterSubscription>false</d2p1:IsBillMeLaterSubscription>
<d2p1:MemberSubscriptionInvId>0</d2p1:MemberSubscriptionInvId>
</BillMeLater>
<Campaigns xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions">
<d2p1:CampaignInformation>
<d2p1:Amount>0</d2p1:Amount>
<d2p1:CampaignId>0</d2p1:CampaignId>
<d2p1:CampaignName>String</d2p1:CampaignName>
<d2p1:ChapPayID>String</d2p1:ChapPayID>
</d2p1:CampaignInformation>
</Campaigns>
<CcPaymentInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions">
<d2p1:Address1>String</d2p1:Address1>
<d2p1:Address2>String</d2p1:Address2>
<d2p1:BillingAddress>String</d2p1:BillingAddress>
<d2p1:CardNumber>String</d2p1:CardNumber>
<d2p1:CardholderName>String</d2p1:CardholderName>
<d2p1:City>String</d2p1:City>
<d2p1:Country>String</d2p1:Country>
<d2p1:Cvv>String</d2p1:Cvv>
<d2p1:ExpMonth>0</d2p1:ExpMonth>
<d2p1:ExpYear>0</d2p1:ExpYear>
<d2p1:PostalCode>String</d2p1:PostalCode>
<d2p1:StateProvince>String</d2p1:StateProvince>
</CcPaymentInfo>
<ClientGroupID>String</ClientGroupID>
<FormData xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions">
<d2p1:FormFields>
<d2p1:SubscriberFormField>
<d2p1:_x003C_FormTemplateFieldID_x003E_k__BackingField>0</d2p1:_x003C_FormTemplateFieldID_x003E_k__BackingField>
<d2p1:_x003C_Name_x003E_k__BackingField>String</d2p1:_x003C_Name_x003E_k__BackingField>
<d2p1:_x003C_Value_x003E_k__BackingField>String</d2p1:_x003C_Value_x003E_k__BackingField>
</d2p1:SubscriberFormField>
</d2p1:FormFields>
<d2p1:FormTemplateID>0</d2p1:FormTemplateID>
<d2p1:SignupTypeID>0</d2p1:SignupTypeID>
</FormData>
<GroupID>0</GroupID>
<NatID>0</NatID>
<SubscriptionInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions">
<d2p1:AutoRenew>false</d2p1:AutoRenew>
<d2p1:ClientSubscriberId>String</d2p1:ClientSubscriberId>
<d2p1:FrequencyID>0</d2p1:FrequencyID>
<d2p1:HasAgreedToTerms>false</d2p1:HasAgreedToTerms>
<d2p1:RenewedMemberSubscriptionInvID>0</d2p1:RenewedMemberSubscriptionInvID>
<d2p1:SubscriptionInvoiceID>0</d2p1:SubscriptionInvoiceID>
</SubscriptionInfo>
<UserID>String</UserID>
<UserType>String</UserType>
<VerificationInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions">
<d2p1:Provider>String</d2p1:Provider>
<d2p1:VerificationCode>String</d2p1:VerificationCode>
</VerificationInfo>
</SubscriptionCreateRq>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <SubscriptionCreateRs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Subscriptions.Response"> <BillhighwayUserId>0</BillhighwayUserId> <ClientId>0</ClientId> <ConfirmationNumber>String</ConfirmationNumber> <CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime> <ErrorCode>String</ErrorCode> <FriendlyMessage>String</FriendlyMessage> <IsSuccess>false</IsSuccess> <Message>String</Message> <PaymentConfirmationNumber>0</PaymentConfirmationNumber> <SubscriptionConfirmationNumber>0</SubscriptionConfirmationNumber> <UniqueId>String</UniqueId> </SubscriptionCreateRs>