Billhighway Cloud API

<back to all web services

SubscriptionCreateRq

The following routes are available for this service:
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 .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	NatID: 0,
	GroupID: 0,
	ClientGroupID: String,
	UserType: String,
	UserID: String,
	FormData: 
	{
		FormTemplateID: 0,
		SignupTypeID: 0,
		FormFields: 
		[
			{
				FormTemplateFieldID: 0,
				Name: String,
				Value: String
			}
		]
	},
	SubscriptionInfo: 
	{
		FrequencyID: 0,
		SubscriptionInvoiceID: 0,
		AutoRenew: False,
		HasAgreedToTerms: False,
		ClientSubscriberId: String,
		RenewedMemberSubscriptionInvID: 0
	},
	VerificationInfo: 
	{
		Provider: String,
		VerificationCode: String
	},
	CcPaymentInfo: 
	{
		CardNumber: String,
		Cvv: String,
		ExpMonth: 0,
		ExpYear: 0,
		CardholderName: String,
		Country: String,
		BillingAddress: String,
		Address1: String,
		Address2: String,
		City: String,
		StateProvince: String,
		PostalCode: String
	},
	AchPaymentInfo: 
	{
		AccountHolderName: String,
		CheckNumber: String,
		RoutingNumber: String,
		AccountNumber: String,
		AccountType: String
	},
	BillMeLater: 
	{
		IsBillMeLaterPayment: False,
		IsBillMeLaterSubscription: False,
		MemberSubscriptionInvId: 0,
		Campaigns: 
		[
			{
				CampaignId: 0,
				CampaignName: String,
				Amount: 0,
				ChapPayID: String
			}
		]
	},
	Campaigns: 
	[
		{
			CampaignId: 0,
			CampaignName: String,
			Amount: 0,
			ChapPayID: String
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	IsSuccess: False,
	UniqueId: String,
	CreatedDateTime: 0001-01-01,
	ClientId: 0,
	BillhighwayUserId: 0,
	ConfirmationNumber: String,
	PaymentConfirmationNumber: 0,
	SubscriptionConfirmationNumber: 0,
	ErrorCode: String,
	Message: String,
	FriendlyMessage: String
}