f59881dadecd
Update a donation and its associated recurring plan
This request allows you to update the details of a donation that was made through an API call.
You can make updates to:
- Enrich data.
- Modify parameter values.
- Remove parameter values.
The donation ID must belong to the account associated with the API key.
Donations from subaccounts cannot be updated using the API key of the parent account. Attempting to do so will result in an error. To update a donation in a subaccount, you must use the API key of that subaccount.
For the update to be successful, the donation object must match the current campaign settings, otherwise the operation will fail with a validation error.
Parallel requests to update one object are not allowed and will result in an error.
Any parameters or child parameters that are not provided will remain unchanged.
A successful update will modify the donation receipt, but no emails will be sent as a result.
If you update recurring plan, the changes will apply to both the specific installment and all future installments.
Path parameters
Unique identifier of the donation, formatted as D[A-Z]{7}.
Request body
Example request
{
"campaign": "FUNXXXXXXXX",
"custom_fields": [
{
"name": "Field1",
"value": "Value1"
}
],
"designation": "EXXXXXXX",
"livemode": true,
"questions": [
{
"id": "QXXXXXXX",
"checked": true,
"date": "1990-05-15",
"options": [
"Option 1",
"Option 2"
],
"text": "Example answer"
}
],
"supporter": {
"address": {
"city": "Nashville",
"country": "us",
"line1": "123 Main St",
"line2": "Apt 1",
"postal_code": "111111",
"region": "Tennessee"
},
"email": "example@example.com",
"employer": {
"name": "Fundraise Up Inc."
},
"employment_status": "employed",
"first_name": "Alex",
"last_name": "Garcia",
"occupation": "Software Engineer",
"phone": "+1 (111) 111111",
"title": "mr"
}
}Response
On success, the API returns the donation object. If the parameters are invalid, the call will return an error.
Example response
{
"account": {
"code": "Code-1",
"id": "AXXXXXXX",
"name": "Example Account"
},
"amount": "99.99",
"amount_before_fees_covered": "99.99",
"amount_before_fees_covered_in_default_currency": "59.99",
"amount_in_default_currency": "59.99",
"benefit": {
"code": "TSHIRT-001",
"fair_market_value": "25.99",
"fair_market_value_currency": "usd",
"id": "GXXXXXXX",
"name": "T-shirt",
"option": {
"code": "SIZE-M",
"name": "Size",
"value": "M"
},
"shipping": {
"address": {
"city": "Nashville",
"country": "us",
"line1": "123 Example St.",
"line2": "Apt. 1",
"postal_code": "111111",
"region": "Tennessee"
},
"recipient_first_name": "Alex",
"recipient_last_name": "Garcia"
}
},
"campaign": {
"code": "Code-1",
"id": "FUNXXXXXXXX",
"name": "My Campaign"
},
"comment": "Comment example.",
"consent": {
"customized": {
"email": "opted_in",
"phone_calls": "opted_out",
"postal_mail": "opted_in",
"sms": "opted_in",
"social_media": "opted_out"
},
"general": "opted_in"
},
"created_at": "2024-12-20T00:00:00.000Z",
"currency": "usd",
"custom_fields": [
{
"name": "Field1",
"value": "Value1"
}
],
"designation": {
"code": "Code-1",
"id": "EXXXXXXX",
"name": "My Designation"
},
"device": {
"browser": "Chrome",
"ip": {
"address": "111.111.111.111",
"city": "Nashville",
"country_name": "United States",
"region": "Tennessee"
},
"os": "MacOS",
"type": "desktop",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"
},
"element": {
"id": "XXXXXXXX",
"name": "My Element",
"type": "donationForm"
},
"failed_at": "2024-12-20T00:00:00.000Z",
"fundraiser": {
"id": "NXXXXXXX",
"name": "Run for hope"
},
"gift_aid": {
"claimed": true,
"legal_text": "I am a UK taxpayer and want to claim Gift Aid."
},
"id": "DXXXXXXX",
"installment": "3",
"livemode": true,
"on_behalf_of": "Example Inc.",
"payment": {
"bank_account": {
"last4": "1234"
},
"credit_card": {
"exp_month": "12",
"exp_year": "2023",
"last4": "1234",
"type": "Visa"
},
"daf_external_id": "010c5aa7-28f5-426f-b31f-9ba77754055f",
"daf_sponsor_fund": "Fidelity Charitable",
"daf_tracking_id": "1e60800e-849b-43d1-870e-57afc8d75473",
"email": "example@example.com",
"error_message": "Something went wrong",
"id": "ch_1I9nHHHUtU5Pnu8b93DuxyzE",
"method": "paypal",
"processor": "stripe"
},
"payout": {
"amount": "99.99",
"amount_in_default_currency": "59.99",
"currency": "usd"
},
"platform_fee": {
"amount": "99.99",
"amount_in_default_currency": "59.99",
"currency": "usd"
},
"processing_fee": {
"amount": "99.99",
"amount_in_default_currency": "59.99",
"currency": "usd"
},
"questions": [
{
"code": "Code-1",
"id": "QXXXXXXX",
"checked": true,
"options": [
"OK",
"Good"
],
"text": "Example answer"
}
],
"recurring_plan": {
"created_at": "2024-12-20T00:00:00.000Z",
"ended_at": "2024-12-20T00:00:00.000Z",
"frequency": "monthly",
"id": "RXXXXXXX",
"next_installment_at": "2024-12-20T00:00:00.000Z",
"status": "active"
},
"refunded_at": "2024-12-20T00:00:00.000Z",
"source": "website",
"status": "succeeded",
"succeeded_at": "2024-12-20T00:00:00.000Z",
"supporter": {
"address": {
"city": "Nashville",
"country": "us",
"line1": "123 Example St.",
"line2": "Apt. 1",
"postal_code": "111111",
"region": "Tennessee"
},
"email": "example@example.com",
"employer": {
"name": "Fundraise Up Inc."
},
"employment_status": "employed",
"first_name": "Alex",
"id": "SXXXXXXXX",
"language": "en-CA",
"last_name": "Garcia",
"occupation": "Software Engineer",
"phone": "+1 (111) 111111",
"title": "mr"
},
"supporter_covered_fee": "99.9",
"supporter_covered_fee_in_default_currency": "99.9",
"tribute": {
"honoree": "Zhang Wei",
"id": "TXXXXXXX",
"sharing": {
"from": "Alex Garcia",
"message": "In loving memory of Jordan",
"recipient": {
"address": {
"city": "Nashville",
"country": "us",
"line1": "123 Example St.",
"line2": "Apt. 1",
"postal_code": "111111",
"region": "Tennessee"
},
"email": "example@example.com",
"first_name": "Sidney",
"last_name": "Jones",
"title": "mr"
},
"type": "email"
},
"type": "in_honor"
},
"url": "https://example.com/DXXXXXXX",
"utm": {
"campaign": "giving_tuesday",
"content": "textlink",
"medium": "email",
"source": "google",
"term": "how_to_support_penguins"
}
}