Skip to content

donations

Records a donation that has already been collected on the partner platform against the fundraiser identified by source.fundraiserId. ASF creates an internal donation record and returns its donationReferenceId — partners should persist this for later remittance reconciliation.

POST /donations

client_id and client_secret headers. See Authentication.

ParameterRequiredTypeDescription
X-Correlation-IDYesuuidFresh UUID per request.
FieldRequiredTypeDescription
sourceYesSourcePartner channel + fundraiser identifiers.
source.channelYesSourceChannelPartner platform making the request.
source.fundraiserIdYesstringASF Member Number
donorYesDonorDonor details.
donor.emailYesstringDonor email.
donor.firstNameYesstringDonor first name.
donor.lastNameYesstringDonor last name.
donor.mobileNostringE.164 preferred; local Australian format accepted.
donor.billingAddressYes (postalCode)BillingAddressStreet, city, state, postalCode, country.
donor.businessNameNostringSet if the donation is on behalf of a company.
donor.verifiedEmailNostringEmail verified by the partner platform, if different from email.
transactionYesTransactionPartner-side transaction record.
transaction.idNostringPartner transaction identifier.
transaction.dateNodate-timeISO 8601 timestamp.
transaction.amountNostringDecimal string in AUD.
sourceMetadataNoobjectFree-form metadata stored verbatim.

SuccessEnvelope with data.items:

FieldTypeDescription
donationReferenceIdstringASF-issued reference for the recorded donation. Persist this — it is the key for createRemittances.
import os
import uuid
import requests
BASE_URL = "https://sit.api.asf.org.au/fundraisers/api/v1"
body = {
"source": {
"channel": "XYZ Platform",
"fundraiserId": "ASF123456",
},
"donor": {
"email": "john@example.com",
"firstName": "John",
"lastName": "Smith",
"mobile": "0438000222",
"billingAddress": {
"street": "1 Flinders Street",
"city": "Melbourne",
"state": "VIC",
"postalCode": "3000",
"country": "AU",
},
},
"transaction": {
"id": "56789",
"date": "2024-03-13T16:09:54-04:00",
"amount": "250",
},
"sourceMetadata": {"orderNumber": "2026-1234"},
}
response = requests.post(
f"{BASE_URL}/donations",
json=body,
headers={
"client_id": os.environ["ASF_CLIENT_ID"],
"client_secret": os.environ["ASF_CLIENT_SECRET"],
"X-Correlation-ID": str(uuid.uuid4()),
},
timeout=10,
)
response.raise_for_status()
reference_id = response.json()["data"]["items"]["donationReferenceId"]
{
"apiVersion": "1.0.0",
"correlationId": "210c68180-2ac6-11ee-b000-111",
"method": "/donations",
"data": {
"items": {
"donationReferenceId": "0000468-000788"
}
}
}
StatusCodeWhen it fires
400FUNDRAISER:VALIDATIONFundraiser isn’t enrolled with the channel, or required fields failed validation.
401Basic credentials or client_id/client_secret are invalid.
429Request quota exhausted.
500FUNDRAISER:UNKNOWNUnhandled server error. Retry with backoff.
503Server temporarily unavailable.