| POST | /donations/creditcard |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| DonorInfo | body | DonationDonorInfo | No | Not required if MemberInfo is present on request |
| MemberInfo | body | DonationMemberInfo | No | Not required if DonorInfo is present on request |
| CampaignId | body | int? | No | Campaign to track donation against and to define fund allocation. Use GET /campaigns to retreive valid list of campaignIDs |
| CardReferenceOrCardNumber | body | string | Yes | CardRef 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. |
| CardType | body | string | No | Allowable Values
|
| Cvv | body | string | No | Credit Card Validation value. If Visa, Master Card or Discover, must be 3 digits. If AmEx, must be 4 digits. |
| ExpirationMonth | body | int | Yes | |
| ExpirationYear | body | int | Yes | Credit 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. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| GroupId | form | string | Yes | Client value for Group. String must already be configured in Billhighway system. |
| Amount | form | decimal | Yes | Amount of the payment. Must be an amount less than $10,000,000.00. |
| CurrencyCode | form | string | No | The currency the payment is being made in. Three digit currency code (see ISO 4217) for a valid currency supported by Billhighway. Defaults to USD |
| Memo | form | string | No | Notes about the donation. Maximum 70 characters. |
| DonationRecurringInfo | form | DonationRecurringInfo | No | |
| MetaData | form | JsonObject | No | Custom fields |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Frequency | form | string | Yes | How often donation is collected automaticallyAllowable Values
|
| NumberOfOccurrences | form | int | Yes | Number of recurring donation cycles. |
| FutureDonationDate | form | DateTime? | No | Allows the submitter to set a future date for the donation |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| FullName | form | string | Yes | Name of donor. Maximum 100 characters. Format must be Firstname {space} Lastname. |
| Address | form | string | Yes | Billing address. Maximum 100 characters. |
| City | form | string | Yes | Billing city. Maximum 100 characters. |
| State | form | string | Yes | Billing state. Two characters, must match valid US state code. |
| PostalCode | form | string | Yes | Credit Card billing address postal code. Maximum 10 characters. |
| EmailAddress | form | string | No | Email address of donor. Maximum 100 characters. If provided, must be valid email format. |
| Phone | form | string | No | Preferred phone number. Maximum 12 characters. |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| BhUserId | form | int | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ErrorCode | form | int | No | Legacy ErrorCode |
| ErrorMessage | form | string | No | |
| IsError | form | bool | No | |
| TransactionId | form | string | No | Donation Transaction ID |
| CardRef | form | string | No |
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 /donations/creditcard HTTP/1.1
Host: devapi.billhighway.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<DonationCreditCardRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Donations">
<Amount>0</Amount>
<CurrencyCode>String</CurrencyCode>
<DonationRecurringInfo>
<Frequency>String</Frequency>
<FutureDonationDate>0001-01-01T00:00:00</FutureDonationDate>
<NumberOfOccurrences>0</NumberOfOccurrences>
</DonationRecurringInfo>
<GroupId>String</GroupId>
<Memo>String</Memo>
<MetaData xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringstring>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value>String</d2p1:Value>
</d2p1:KeyValueOfstringstring>
</MetaData>
<CampaignId>0</CampaignId>
<CardReferenceOrCardNumber>String</CardReferenceOrCardNumber>
<CardType>String</CardType>
<Cvv>String</Cvv>
<DonorInfo>
<Address>String</Address>
<City>String</City>
<EmailAddress>String</EmailAddress>
<FullName>String</FullName>
<Phone>String</Phone>
<PostalCode>String</PostalCode>
<State>String</State>
</DonorInfo>
<ExpirationMonth>0</ExpirationMonth>
<ExpirationYear>0</ExpirationYear>
<MemberInfo>
<BhUserId>0</BhUserId>
</MemberInfo>
</DonationCreditCardRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <DonationCreditCardResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.Donations"> <CardRef>String</CardRef> <ErrorCode>0</ErrorCode> <ErrorMessage>String</ErrorMessage> <IsError>false</IsError> <TransactionId>String</TransactionId> </DonationCreditCardResponse>