Billhighway Cloud API

<back to all web services

DonationAchRequest

The following routes are available for this service:
POST/donations/ach
namespace BH.CloudAPI.Common4.DTO.Donations

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type DonationAchResponse() = 
        ///<summary>
        ///Legacy ErrorCode
        ///</summary>
        [<ApiMember(Description="Legacy ErrorCode", ExcludeInSchema=true)>]
        [<Ignore>]
        member val ErrorCode:Int32 = new Int32() with get,set

        member val ErrorMessage:String = null with get,set
        member val IsError:Boolean = new Boolean() with get,set
        ///<summary>
        ///Donation Transaction ID
        ///</summary>
        [<ApiMember(Description="Donation Transaction ID")>]
        member val TransactionId:String = null with get,set

    [<AllowNullLiteral>]
    type DonationRecurringInfo() = 
        ///<summary>
        ///How often donation is collected automatically
        ///</summary>
        [<ApiMember(Description="How often donation is collected automatically", IsRequired=true, Name="Frequency")>]
        member val Frequency:String = null with get,set

        ///<summary>
        ///Number of recurring donation cycles.
        ///</summary>
        [<ApiMember(Description="Number of recurring donation cycles.", IsRequired=true, Name="NumberOfOccurrences")>]
        member val NumberOfOccurrences:Int32 = new Int32() with get,set

        ///<summary>
        ///Allows the submitter to set a future date for the donation
        ///</summary>
        [<ApiMember(Description="Allows the submitter to set a future date for the donation", Name="FutureDonationDate")>]
        member val FutureDonationDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set

    [<AllowNullLiteral>]
    type JsonObject() = 
        inherit Dictionary<String, String>()

    [<AllowNullLiteral>]
    type DonationRequestBase() = 
        ///<summary>
        ///Client value for Group. String must already be configured in Billhighway system.
        ///</summary>
        [<ApiMember(Description="Client value for Group. String must already be configured in Billhighway system.", IsRequired=true, Name="GroupID")>]
        member val GroupId:String = null with get,set

        ///<summary>
        ///Amount of the payment. Must be an amount less than $10,000,000.00.
        ///</summary>
        [<ApiMember(Description="Amount of the payment. Must be an amount less than $10,000,000.00.", IsRequired=true, Name="Amount")>]
        member val Amount:Decimal = new Decimal() with get,set

        ///<summary>
        ///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
        ///</summary>
        [<ApiMember(Description="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", ExcludeInSchema=true, Name="CurrencyCode")>]
        member val CurrencyCode:String = null with get,set

        ///<summary>
        ///Notes about the donation. Maximum 70 characters.
        ///</summary>
        [<ApiMember(Description="Notes about the donation. Maximum 70 characters.", Name="Memo")>]
        member val Memo:String = null with get,set

        [<ApiMember>]
        member val DonationRecurringInfo:DonationRecurringInfo = null with get,set

        ///<summary>
        ///Custom fields
        ///</summary>
        [<ApiMember(Description="Custom fields", Name="MetaData")>]
        member val MetaData:JsonObject = null with get,set

    [<AllowNullLiteral>]
    type DonationDonorInfo() = 
        ///<summary>
        ///Name of donor. Maximum 100 characters. Format must be Firstname {space} Lastname.
        ///</summary>
        [<ApiMember(Description="Name of donor. Maximum 100 characters. Format must be Firstname {space} Lastname.", IsRequired=true, Name="FullName")>]
        member val FullName:String = null with get,set

        ///<summary>
        ///Billing address. Maximum 100 characters.
        ///</summary>
        [<ApiMember(Description="Billing address. Maximum 100 characters.", IsRequired=true, Name="Address")>]
        member val Address:String = null with get,set

        ///<summary>
        ///Billing city. Maximum 100 characters.
        ///</summary>
        [<ApiMember(Description="Billing city. Maximum 100 characters.", IsRequired=true, Name="City")>]
        member val City:String = null with get,set

        ///<summary>
        ///Billing state. Two characters, must match valid US state code.
        ///</summary>
        [<ApiMember(Description="Billing state. Two characters, must match valid US state code.", IsRequired=true, Name="State")>]
        member val State:String = null with get,set

        ///<summary>
        ///Credit Card billing address postal code. Maximum 10 characters.
        ///</summary>
        [<ApiMember(Description="Credit Card billing address postal code. Maximum 10 characters.", IsRequired=true, Name="PostalCode")>]
        member val PostalCode:String = null with get,set

        ///<summary>
        ///Email address of donor. Maximum 100 characters. If provided, must be valid email format.
        ///</summary>
        [<ApiMember(Description="Email address of donor. Maximum 100 characters. If provided, must be valid email format.", Name="EmailAddress")>]
        member val EmailAddress:String = null with get,set

        ///<summary>
        ///Preferred phone number. Maximum 12 characters.
        ///</summary>
        [<ApiMember(Description="Preferred phone number. Maximum 12 characters.", Name="Phone")>]
        member val Phone:String = null with get,set

    [<AllowNullLiteral>]
    type DonationMemberInfo() = 
        [<ApiMember(IsRequired=true)>]
        member val BhUserId:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type DonationAchRequest() = 
        inherit DonationRequestBase()
        ///<summary>
        ///Not required if MemberInfo is present on request
        ///</summary>
        [<ApiMember(Description="Not required if MemberInfo is present on request")>]
        member val DonorInfo:DonationDonorInfo = null with get,set

        ///<summary>
        ///Not required if DonorInfo is present on request
        ///</summary>
        [<ApiMember(Description="Not required if DonorInfo is present on request")>]
        member val MemberInfo:DonationMemberInfo = null with get,set

        ///<summary>
        ///Use GET /campaigns to retreive valid list of campaignIDs
        ///</summary>
        [<ApiMember(Description="Use GET /campaigns to retreive valid list of campaignIDs")>]
        member val CampaignId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///RoutingNumber and AccountNumber are not required if AchRef is provided
        ///</summary>
        [<ApiMember(Description="RoutingNumber and AccountNumber are not required if AchRef is provided")>]
        member val AchRef:String = null with get,set

        ///<summary>
        ///Required if AchRef is not provided
        ///</summary>
        [<ApiMember(Description="Required if AchRef is not provided")>]
        member val RoutingNumber:String = null with get,set

        ///<summary>
        ///Required if AchRef is not provided
        ///</summary>
        [<ApiMember(Description="Required if AchRef is not provided")>]
        member val AccountNumber:String = null with get,set

F# DonationAchRequest 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 /donations/ach HTTP/1.1 
Host: devapi.billhighway.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"DonorInfo":{"FullName":"String","Address":"String","City":"String","State":"String","PostalCode":"String","EmailAddress":"String","Phone":"String"},"MemberInfo":{"BhUserId":0},"CampaignId":0,"AchRef":"String","RoutingNumber":"String","AccountNumber":"String","GroupId":"String","Amount":0,"CurrencyCode":"String","Memo":"String","DonationRecurringInfo":{"Frequency":"String","NumberOfOccurrences":0,"FutureDonationDate":"0001-01-01T00:00:00.0000000"},"MetaData":{"String":"String"}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ErrorCode":0,"ErrorMessage":"String","IsError":false,"TransactionId":"String"}