Billhighway Cloud API

<back to all web services

ChargeTokenRq

The following routes are available for this service:
POST/integrations/api/{tokenType}/charge/token
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class ChargeTokenRq extends ChargeTokenRqBase
    {
        
    }

    public static class ChargeTokenRqBase implements IChapterAuthorizationRequest, IApiResultErrorService
    {
        public String tokenType = null;
        public Integer Amount = null;
        public String Description = null;
        public ChargeTokenOptions Options = null;
        public CreditCardChargeItem CardInfo = null;
        public AchChargeItem AchInfo = null;
        public ArrayList<ReferenceIdTypedAssociationItem> ReferenceIds = null;
        
        public String getTokenType() { return tokenType; }
        public ChargeTokenRqBase setTokenType(String value) { this.tokenType = value; return this; }
        public Integer getAmount() { return Amount; }
        public ChargeTokenRqBase setAmount(Integer value) { this.Amount = value; return this; }
        public String getDescription() { return Description; }
        public ChargeTokenRqBase setDescription(String value) { this.Description = value; return this; }
        public ChargeTokenOptions getOptions() { return Options; }
        public ChargeTokenRqBase setOptions(ChargeTokenOptions value) { this.Options = value; return this; }
        public CreditCardChargeItem getCardInfo() { return CardInfo; }
        public ChargeTokenRqBase setCardInfo(CreditCardChargeItem value) { this.CardInfo = value; return this; }
        public AchChargeItem getAchInfo() { return AchInfo; }
        public ChargeTokenRqBase setAchInfo(AchChargeItem value) { this.AchInfo = value; return this; }
        public ArrayList<ReferenceIdTypedAssociationItem> getReferenceIds() { return ReferenceIds; }
        public ChargeTokenRqBase setReferenceIds(ArrayList<ReferenceIdTypedAssociationItem> value) { this.ReferenceIds = value; return this; }
    }

    public static class ChargeTokenOptions
    {
        public Integer Usages = null;
        public Integer Duration = null;
        
        public Integer getUsages() { return Usages; }
        public ChargeTokenOptions setUsages(Integer value) { this.Usages = value; return this; }
        public Integer getDuration() { return Duration; }
        public ChargeTokenOptions setDuration(Integer value) { this.Duration = value; return this; }
    }

    public static class CreditCardChargeItem
    {
        public String NameOnCard = null;
        public Integer ExpMonth = null;
        public Integer ExpYear = null;
        public String CardNumber = null;
        public String Cvv = null;
        public CreditCardBillingAddressItem Address = null;
        
        public String getNameOnCard() { return NameOnCard; }
        public CreditCardChargeItem setNameOnCard(String value) { this.NameOnCard = value; return this; }
        public Integer getExpMonth() { return ExpMonth; }
        public CreditCardChargeItem setExpMonth(Integer value) { this.ExpMonth = value; return this; }
        public Integer getExpYear() { return ExpYear; }
        public CreditCardChargeItem setExpYear(Integer value) { this.ExpYear = value; return this; }
        public String getCardNumber() { return CardNumber; }
        public CreditCardChargeItem setCardNumber(String value) { this.CardNumber = value; return this; }
        public String getCvv() { return Cvv; }
        public CreditCardChargeItem setCvv(String value) { this.Cvv = value; return this; }
        public CreditCardBillingAddressItem getAddress() { return Address; }
        public CreditCardChargeItem setAddress(CreditCardBillingAddressItem value) { this.Address = value; return this; }
    }

    public static class CreditCardBillingAddressItem
    {
        public String Address1 = null;
        public String Address2 = null;
        public String City = null;
        public String PostalCode = null;
        public String Region = null;
        public String Country = null;
        public ArrayList<AttributeItem> Attributes = null;
        
        public String getAddress1() { return Address1; }
        public CreditCardBillingAddressItem setAddress1(String value) { this.Address1 = value; return this; }
        public String getAddress2() { return Address2; }
        public CreditCardBillingAddressItem setAddress2(String value) { this.Address2 = value; return this; }
        public String getCity() { return City; }
        public CreditCardBillingAddressItem setCity(String value) { this.City = value; return this; }
        public String getPostalCode() { return PostalCode; }
        public CreditCardBillingAddressItem setPostalCode(String value) { this.PostalCode = value; return this; }
        public String getRegion() { return Region; }
        public CreditCardBillingAddressItem setRegion(String value) { this.Region = value; return this; }
        public String getCountry() { return Country; }
        public CreditCardBillingAddressItem setCountry(String value) { this.Country = value; return this; }
        public ArrayList<AttributeItem> getAttributes() { return Attributes; }
        public CreditCardBillingAddressItem setAttributes(ArrayList<AttributeItem> value) { this.Attributes = value; return this; }
    }

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

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

    public static class ReferenceIdTypedAssociationItem
    {
        public String Value = null;
        public String Type = null;
        
        public String getValue() { return Value; }
        public ReferenceIdTypedAssociationItem setValue(String value) { this.Value = value; return this; }
        public String getType() { return Type; }
        public ReferenceIdTypedAssociationItem setType(String value) { this.Type = value; return this; }
    }

    public static class ChargeTokenRs
    {
        public String Token = null;
        public Integer OrganizationId = null;
        public Integer ChapterId = null;
        public Integer Amount = null;
        public String TokenType = null;
        public String Description = null;
        public Date ExpiresOn = null;
        public String Currency = null;
        public Integer Usages = null;
        public CreditCardChargeDetails CardDetails = null;
        public AchChargeDetails AchDetails = null;
        
        public String getToken() { return Token; }
        public ChargeTokenRs setToken(String value) { this.Token = value; return this; }
        public Integer getOrganizationId() { return OrganizationId; }
        public ChargeTokenRs setOrganizationId(Integer value) { this.OrganizationId = value; return this; }
        public Integer getChapterId() { return ChapterId; }
        public ChargeTokenRs setChapterId(Integer value) { this.ChapterId = value; return this; }
        public Integer getAmount() { return Amount; }
        public ChargeTokenRs setAmount(Integer value) { this.Amount = value; return this; }
        public String getTokenType() { return TokenType; }
        public ChargeTokenRs setTokenType(String value) { this.TokenType = value; return this; }
        public String getDescription() { return Description; }
        public ChargeTokenRs setDescription(String value) { this.Description = value; return this; }
        public Date getExpiresOn() { return ExpiresOn; }
        public ChargeTokenRs setExpiresOn(Date value) { this.ExpiresOn = value; return this; }
        public String getCurrency() { return Currency; }
        public ChargeTokenRs setCurrency(String value) { this.Currency = value; return this; }
        public Integer getUsages() { return Usages; }
        public ChargeTokenRs setUsages(Integer value) { this.Usages = value; return this; }
        public CreditCardChargeDetails getCardDetails() { return CardDetails; }
        public ChargeTokenRs setCardDetails(CreditCardChargeDetails value) { this.CardDetails = value; return this; }
        public AchChargeDetails getAchDetails() { return AchDetails; }
        public ChargeTokenRs setAchDetails(AchChargeDetails value) { this.AchDetails = value; return this; }
    }

    public static class CreditCardChargeDetails
    {
        public String CardType = null;
        public Integer ExpMonth = null;
        public Integer ExpYear = null;
        public String Last4 = null;
        public CreditCardBillingAddressItem Address = null;
        public CreditCardChargeVerificationResult VerificationResult = null;
        
        public String getCardType() { return CardType; }
        public CreditCardChargeDetails setCardType(String value) { this.CardType = value; return this; }
        public Integer getExpMonth() { return ExpMonth; }
        public CreditCardChargeDetails setExpMonth(Integer value) { this.ExpMonth = value; return this; }
        public Integer getExpYear() { return ExpYear; }
        public CreditCardChargeDetails setExpYear(Integer value) { this.ExpYear = value; return this; }
        public String getLast4() { return Last4; }
        public CreditCardChargeDetails setLast4(String value) { this.Last4 = value; return this; }
        public CreditCardBillingAddressItem getAddress() { return Address; }
        public CreditCardChargeDetails setAddress(CreditCardBillingAddressItem value) { this.Address = value; return this; }
        public CreditCardChargeVerificationResult getVerificationResult() { return VerificationResult; }
        public CreditCardChargeDetails setVerificationResult(CreditCardChargeVerificationResult value) { this.VerificationResult = value; return this; }
    }

    public static class CreditCardChargeVerificationResult
    {
        public Boolean NetworkVerificationAttempted = null;
        public String CvvVerificationResult = null;
        public String AddressVerificationResult = null;
        public String PostalCodeVerificationResult = null;
        
        public Boolean isNetworkVerificationAttempted() { return NetworkVerificationAttempted; }
        public CreditCardChargeVerificationResult setNetworkVerificationAttempted(Boolean value) { this.NetworkVerificationAttempted = value; return this; }
        public String getCvvVerificationResult() { return CvvVerificationResult; }
        public CreditCardChargeVerificationResult setCvvVerificationResult(String value) { this.CvvVerificationResult = value; return this; }
        public String getAddressVerificationResult() { return AddressVerificationResult; }
        public CreditCardChargeVerificationResult setAddressVerificationResult(String value) { this.AddressVerificationResult = value; return this; }
        public String getPostalCodeVerificationResult() { return PostalCodeVerificationResult; }
        public CreditCardChargeVerificationResult setPostalCodeVerificationResult(String value) { this.PostalCodeVerificationResult = value; return this; }
    }

    public static class AchChargeDetails
    {
        public String AccountType = null;
        public String RoutingNumber = null;
        public String AccountNumberLast4 = null;
        public String BankName = null;
        public AchChargeVerificationResult VerificationResult = null;
        
        public String getAccountType() { return AccountType; }
        public AchChargeDetails setAccountType(String value) { this.AccountType = value; return this; }
        public String getRoutingNumber() { return RoutingNumber; }
        public AchChargeDetails setRoutingNumber(String value) { this.RoutingNumber = value; return this; }
        public String getAccountNumberLast4() { return AccountNumberLast4; }
        public AchChargeDetails setAccountNumberLast4(String value) { this.AccountNumberLast4 = value; return this; }
        public String getBankName() { return BankName; }
        public AchChargeDetails setBankName(String value) { this.BankName = value; return this; }
        public AchChargeVerificationResult getVerificationResult() { return VerificationResult; }
        public AchChargeDetails setVerificationResult(AchChargeVerificationResult value) { this.VerificationResult = value; return this; }
    }

    public static class AchChargeVerificationResult
    {
        public Boolean NetworkVerificationAttempted = null;
        public String Result = null;
        
        public Boolean isNetworkVerificationAttempted() { return NetworkVerificationAttempted; }
        public AchChargeVerificationResult setNetworkVerificationAttempted(Boolean value) { this.NetworkVerificationAttempted = value; return this; }
        public String getResult() { return Result; }
        public AchChargeVerificationResult setResult(String value) { this.Result = value; return this; }
    }

}

Java ChargeTokenRq DTOs

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

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /integrations/api/{tokenType}/charge/token HTTP/1.1 
Host: devapi.billhighway.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"tokenType":"String","Amount":0,"Description":"String","Options":{"Usages":0,"Duration":0},"CardInfo":{"NameOnCard":"String","ExpMonth":0,"ExpYear":0,"CardNumber":"String","Cvv":"String","Address":{"Address1":"String","Address2":"String","City":"String","PostalCode":"String","Region":"String","Country":"String","Attributes":[{"Name":"String","Value":"String"}]}},"AchInfo":{"AccountNumber":"String","RoutingNumber":"String","AccountType":"String","AccountHolderName":"String"},"ReferenceIds":[{"Value":"String","Type":"String"}]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Token":"String","OrganizationId":0,"ChapterId":0,"Amount":0,"TokenType":"String","Description":"String","ExpiresOn":"0001-01-01T00:00:00.0000000","Currency":"String","Usages":0,"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"}}}