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
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class SubscriptionCreateRq
    {
        public Integer NatID = null;
        public Integer GroupID = null;
        public String ClientGroupID = null;
        public String UserType = null;
        public String UserID = null;
        public SubscriberFormData FormData = null;
        public SubscriptionInformation SubscriptionInfo = null;
        public ClientVerification VerificationInfo = null;
        public CcPaymentInformation CcPaymentInfo = null;
        public AchPaymentInformation AchPaymentInfo = null;
        public BillMeLaterInformation BillMeLater = null;
        public ArrayList<CampaignInformation> Campaigns = null;
        
        public Integer getNatID() { return NatID; }
        public SubscriptionCreateRq setNatID(Integer value) { this.NatID = value; return this; }
        public Integer getGroupID() { return GroupID; }
        public SubscriptionCreateRq setGroupID(Integer value) { this.GroupID = value; return this; }
        public String getClientGroupID() { return ClientGroupID; }
        public SubscriptionCreateRq setClientGroupID(String value) { this.ClientGroupID = value; return this; }
        public String getUserType() { return UserType; }
        public SubscriptionCreateRq setUserType(String value) { this.UserType = value; return this; }
        public String getUserID() { return UserID; }
        public SubscriptionCreateRq setUserID(String value) { this.UserID = value; return this; }
        public SubscriberFormData getFormData() { return FormData; }
        public SubscriptionCreateRq setFormData(SubscriberFormData value) { this.FormData = value; return this; }
        public SubscriptionInformation getSubscriptionInfo() { return SubscriptionInfo; }
        public SubscriptionCreateRq setSubscriptionInfo(SubscriptionInformation value) { this.SubscriptionInfo = value; return this; }
        public ClientVerification getVerificationInfo() { return VerificationInfo; }
        public SubscriptionCreateRq setVerificationInfo(ClientVerification value) { this.VerificationInfo = value; return this; }
        public CcPaymentInformation getCcPaymentInfo() { return CcPaymentInfo; }
        public SubscriptionCreateRq setCcPaymentInfo(CcPaymentInformation value) { this.CcPaymentInfo = value; return this; }
        public AchPaymentInformation getAchPaymentInfo() { return AchPaymentInfo; }
        public SubscriptionCreateRq setAchPaymentInfo(AchPaymentInformation value) { this.AchPaymentInfo = value; return this; }
        public BillMeLaterInformation getBillMeLater() { return BillMeLater; }
        public SubscriptionCreateRq setBillMeLater(BillMeLaterInformation value) { this.BillMeLater = value; return this; }
        public ArrayList<CampaignInformation> getCampaigns() { return Campaigns; }
        public SubscriptionCreateRq setCampaigns(ArrayList<CampaignInformation> value) { this.Campaigns = value; return this; }
    }

    public static class SubscriberFormData
    {
        public Integer FormTemplateID = null;
        public Integer SignupTypeID = null;
        public ArrayList<SubscriberFormField> FormFields = null;
        
        public Integer getFormTemplateID() { return FormTemplateID; }
        public SubscriberFormData setFormTemplateID(Integer value) { this.FormTemplateID = value; return this; }
        public Integer getSignupTypeID() { return SignupTypeID; }
        public SubscriberFormData setSignupTypeID(Integer value) { this.SignupTypeID = value; return this; }
        public ArrayList<SubscriberFormField> getFormFields() { return FormFields; }
        public SubscriberFormData setFormFields(ArrayList<SubscriberFormField> value) { this.FormFields = value; return this; }
    }

    public static class SubscriberFormField
    {
        public String Name = null;
        public String Value = null;
        
        public String getName() { return Name; }
        public SubscriberFormField setName(String value) { this.Name = value; return this; }
        public String getValue() { return Value; }
        public SubscriberFormField setValue(String value) { this.Value = value; return this; }
    }

    public static class SubscriptionInformation
    {
        public Integer FrequencyID = null;
        public Integer SubscriptionInvoiceID = null;
        public Boolean AutoRenew = null;
        public Boolean HasAgreedToTerms = null;
        public String ClientSubscriberId = null;
        public Integer RenewedMemberSubscriptionInvID = null;
        
        public Integer getFrequencyID() { return FrequencyID; }
        public SubscriptionInformation setFrequencyID(Integer value) { this.FrequencyID = value; return this; }
        public Integer getSubscriptionInvoiceID() { return SubscriptionInvoiceID; }
        public SubscriptionInformation setSubscriptionInvoiceID(Integer value) { this.SubscriptionInvoiceID = value; return this; }
        public Boolean isAutoRenew() { return AutoRenew; }
        public SubscriptionInformation setAutoRenew(Boolean value) { this.AutoRenew = value; return this; }
        public Boolean isHasAgreedToTerms() { return HasAgreedToTerms; }
        public SubscriptionInformation setHasAgreedToTerms(Boolean value) { this.HasAgreedToTerms = value; return this; }
        public String getClientSubscriberId() { return ClientSubscriberId; }
        public SubscriptionInformation setClientSubscriberId(String value) { this.ClientSubscriberId = value; return this; }
        public Integer getRenewedMemberSubscriptionInvID() { return RenewedMemberSubscriptionInvID; }
        public SubscriptionInformation setRenewedMemberSubscriptionInvID(Integer value) { this.RenewedMemberSubscriptionInvID = value; return this; }
    }

    public static class ClientVerification
    {
        public String Provider = null;
        public String VerificationCode = null;
        
        public String getProvider() { return Provider; }
        public ClientVerification setProvider(String value) { this.Provider = value; return this; }
        public String getVerificationCode() { return VerificationCode; }
        public ClientVerification setVerificationCode(String value) { this.VerificationCode = value; return this; }
    }

    public static class CcPaymentInformation
    {
        public String CardNumber = null;
        public String Cvv = null;
        public Integer ExpMonth = null;
        public Integer ExpYear = null;
        public String CardholderName = null;
        public String Country = null;
        public String BillingAddress = null;
        public String Address1 = null;
        public String Address2 = null;
        public String City = null;
        public String StateProvince = null;
        public String PostalCode = null;
        
        public String getCardNumber() { return CardNumber; }
        public CcPaymentInformation setCardNumber(String value) { this.CardNumber = value; return this; }
        public String getCvv() { return Cvv; }
        public CcPaymentInformation setCvv(String value) { this.Cvv = value; return this; }
        public Integer getExpMonth() { return ExpMonth; }
        public CcPaymentInformation setExpMonth(Integer value) { this.ExpMonth = value; return this; }
        public Integer getExpYear() { return ExpYear; }
        public CcPaymentInformation setExpYear(Integer value) { this.ExpYear = value; return this; }
        public String getCardholderName() { return CardholderName; }
        public CcPaymentInformation setCardholderName(String value) { this.CardholderName = value; return this; }
        public String getCountry() { return Country; }
        public CcPaymentInformation setCountry(String value) { this.Country = value; return this; }
        public String getBillingAddress() { return BillingAddress; }
        public CcPaymentInformation setBillingAddress(String value) { this.BillingAddress = value; return this; }
        public String getAddress1() { return Address1; }
        public CcPaymentInformation setAddress1(String value) { this.Address1 = value; return this; }
        public String getAddress2() { return Address2; }
        public CcPaymentInformation setAddress2(String value) { this.Address2 = value; return this; }
        public String getCity() { return City; }
        public CcPaymentInformation setCity(String value) { this.City = value; return this; }
        public String getStateProvince() { return StateProvince; }
        public CcPaymentInformation setStateProvince(String value) { this.StateProvince = value; return this; }
        public String getPostalCode() { return PostalCode; }
        public CcPaymentInformation setPostalCode(String value) { this.PostalCode = value; return this; }
    }

    public static class AchPaymentInformation
    {
        public String AccountHolderName = null;
        public String CheckNumber = null;
        public String RoutingNumber = null;
        public String AccountNumber = null;
        public String AccountType = null;
        
        public String getAccountHolderName() { return AccountHolderName; }
        public AchPaymentInformation setAccountHolderName(String value) { this.AccountHolderName = value; return this; }
        public String getCheckNumber() { return CheckNumber; }
        public AchPaymentInformation setCheckNumber(String value) { this.CheckNumber = value; return this; }
        public String getRoutingNumber() { return RoutingNumber; }
        public AchPaymentInformation setRoutingNumber(String value) { this.RoutingNumber = value; return this; }
        public String getAccountNumber() { return AccountNumber; }
        public AchPaymentInformation setAccountNumber(String value) { this.AccountNumber = value; return this; }
        public String getAccountType() { return AccountType; }
        public AchPaymentInformation setAccountType(String value) { this.AccountType = value; return this; }
    }

    public static class BillMeLaterInformation
    {
        public Boolean IsBillMeLaterPayment = null;
        public Boolean IsBillMeLaterSubscription = null;
        public Integer MemberSubscriptionInvId = null;
        public ArrayList<CampaignInformation> Campaigns = null;
        
        public Boolean getIsBillMeLaterPayment() { return IsBillMeLaterPayment; }
        public BillMeLaterInformation setIsBillMeLaterPayment(Boolean value) { this.IsBillMeLaterPayment = value; return this; }
        public Boolean getIsBillMeLaterSubscription() { return IsBillMeLaterSubscription; }
        public BillMeLaterInformation setIsBillMeLaterSubscription(Boolean value) { this.IsBillMeLaterSubscription = value; return this; }
        public Integer getMemberSubscriptionInvId() { return MemberSubscriptionInvId; }
        public BillMeLaterInformation setMemberSubscriptionInvId(Integer value) { this.MemberSubscriptionInvId = value; return this; }
        public ArrayList<CampaignInformation> getCampaigns() { return Campaigns; }
        public BillMeLaterInformation setCampaigns(ArrayList<CampaignInformation> value) { this.Campaigns = value; return this; }
    }

    public static class CampaignInformation
    {
        public Integer CampaignId = null;
        public String CampaignName = null;
        public BigDecimal Amount = null;
        public String ChapPayID = null;
        
        public Integer getCampaignId() { return CampaignId; }
        public CampaignInformation setCampaignId(Integer value) { this.CampaignId = value; return this; }
        public String getCampaignName() { return CampaignName; }
        public CampaignInformation setCampaignName(String value) { this.CampaignName = value; return this; }
        public BigDecimal getAmount() { return Amount; }
        public CampaignInformation setAmount(BigDecimal value) { this.Amount = value; return this; }
        public String getChapPayID() { return ChapPayID; }
        public CampaignInformation setChapPayID(String value) { this.ChapPayID = value; return this; }
    }

    public static class SubscriptionCreateRs
    {
        public Boolean IsSuccess = null;
        public String UniqueId = null;
        public Date CreatedDateTime = null;
        public Integer ClientId = null;
        public Integer BillhighwayUserId = null;
        public String ConfirmationNumber = null;
        public Long PaymentConfirmationNumber = null;
        public Long SubscriptionConfirmationNumber = null;
        public String ErrorCode = null;
        public String Message = null;
        public String FriendlyMessage = null;
        
        public Boolean getIsSuccess() { return IsSuccess; }
        public SubscriptionCreateRs setIsSuccess(Boolean value) { this.IsSuccess = value; return this; }
        public String getUniqueId() { return UniqueId; }
        public SubscriptionCreateRs setUniqueId(String value) { this.UniqueId = value; return this; }
        public Date getCreatedDateTime() { return CreatedDateTime; }
        public SubscriptionCreateRs setCreatedDateTime(Date value) { this.CreatedDateTime = value; return this; }
        public Integer getClientId() { return ClientId; }
        public SubscriptionCreateRs setClientId(Integer value) { this.ClientId = value; return this; }
        public Integer getBillhighwayUserId() { return BillhighwayUserId; }
        public SubscriptionCreateRs setBillhighwayUserId(Integer value) { this.BillhighwayUserId = value; return this; }
        public String getConfirmationNumber() { return ConfirmationNumber; }
        public SubscriptionCreateRs setConfirmationNumber(String value) { this.ConfirmationNumber = value; return this; }
        public Long getPaymentConfirmationNumber() { return PaymentConfirmationNumber; }
        public SubscriptionCreateRs setPaymentConfirmationNumber(Long value) { this.PaymentConfirmationNumber = value; return this; }
        public Long getSubscriptionConfirmationNumber() { return SubscriptionConfirmationNumber; }
        public SubscriptionCreateRs setSubscriptionConfirmationNumber(Long value) { this.SubscriptionConfirmationNumber = value; return this; }
        public String getErrorCode() { return ErrorCode; }
        public SubscriptionCreateRs setErrorCode(String value) { this.ErrorCode = value; return this; }
        public String getMessage() { return Message; }
        public SubscriptionCreateRs setMessage(String value) { this.Message = value; return this; }
        public String getFriendlyMessage() { return FriendlyMessage; }
        public SubscriptionCreateRs setFriendlyMessage(String value) { this.FriendlyMessage = value; return this; }
    }

}

Java SubscriptionCreateRq DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + 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>