Billhighway Cloud API

<back to all web services

DonationCreditCardRequest

The following routes are available for this service:
POST/donations/creditcard
DonationCreditCardRequest Parameters:
NameParameterData TypeRequiredDescription
DonorInfobodyDonationDonorInfoNoNot required if MemberInfo is present on request
MemberInfobodyDonationMemberInfoNoNot required if DonorInfo is present on request
CampaignIdbodyint?NoCampaign to track donation against and to define fund allocation. Use GET /campaigns to retreive valid list of campaignIDs
CardReferenceOrCardNumberbodystringYesCardRef returned from client-side tokenization. Also handles raw card number if your servers are PCI-DSS-compliant, and in that case this must be a valid card number for the CardType indicated.
CardTypebodystringNo

Allowable Values

  • AMEX
  • VISA
  • MC
  • DISC
  • DC
  • DCI
CvvbodystringNoCredit Card Validation value. If Visa, Master Card or Discover, must be 3 digits. If AmEx, must be 4 digits.
ExpirationMonthbodyintYes
ExpirationYearbodyintYesCredit Card expiration year. Four-digit Year. Value cannot be less than current year or more than 20 years in the future. ExpMonth + ExpYear must not be in the past.
DonationRequestBase Parameters:
NameParameterData TypeRequiredDescription
GroupIdformstringYesClient value for Group. String must already be configured in Billhighway system.
AmountformdecimalYesAmount of the payment. Must be an amount less than $10,000,000.00.
CurrencyCodeformstringNoThe currency the payment is being made in. Three digit currency code (see ISO 4217) for a valid currency supported by Billhighway. Defaults to USD
MemoformstringNoNotes about the donation. Maximum 70 characters.
DonationRecurringInfoformDonationRecurringInfoNo
MetaDataformJsonObjectNoCustom fields
DonationRecurringInfo Parameters:
NameParameterData TypeRequiredDescription
FrequencyformstringYesHow often donation is collected automatically

Allowable Values

  • Yearly
  • Monthly
  • Quarterly
NumberOfOccurrencesformintYesNumber of recurring donation cycles.
FutureDonationDateformDateTime?NoAllows the submitter to set a future date for the donation
DonationDonorInfo Parameters:
NameParameterData TypeRequiredDescription
FullNameformstringYesName of donor. Maximum 100 characters. Format must be Firstname {space} Lastname.
AddressformstringYesBilling address. Maximum 100 characters.
CityformstringYesBilling city. Maximum 100 characters.
StateformstringYesBilling state. Two characters, must match valid US state code.
PostalCodeformstringYesCredit Card billing address postal code. Maximum 10 characters.
EmailAddressformstringNoEmail address of donor. Maximum 100 characters. If provided, must be valid email format.
PhoneformstringNoPreferred phone number. Maximum 12 characters.
DonationMemberInfo Parameters:
NameParameterData TypeRequiredDescription
BhUserIdformintYes
DonationCreditCardResponse Parameters:
NameParameterData TypeRequiredDescription
ErrorCodeformintNoLegacy ErrorCode
ErrorMessageformstringNo
IsErrorformboolNo
TransactionIdformstringNoDonation Transaction ID
CardRefformstringNo

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 /donations/creditcard HTTP/1.1 
Host: devapi.billhighway.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	DonorInfo: 
	{
		FullName: String,
		Address: String,
		City: String,
		State: String,
		PostalCode: String,
		EmailAddress: String,
		Phone: String
	},
	MemberInfo: 
	{
		BhUserId: 0
	},
	CampaignId: 0,
	CardReferenceOrCardNumber: String,
	CardType: String,
	Cvv: String,
	ExpirationMonth: 0,
	ExpirationYear: 0,
	GroupId: String,
	Amount: 0,
	CurrencyCode: String,
	Memo: String,
	DonationRecurringInfo: 
	{
		Frequency: String,
		NumberOfOccurrences: 0,
		FutureDonationDate: 0001-01-01
	},
	MetaData: 
	{
		String: "String"
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ErrorCode: 0,
	ErrorMessage: String,
	IsError: False,
	TransactionId: String,
	CardRef: String
}