Recurring Donations
Update recurring donation with provided ID
Changed onUpdates a recurring donation. Which fields you may send depends on who bills it.
Unmanaged — the non-billing fields plus amount_in_cents and status.
Managed — the non-billing fields only. Sending amount_in_cents or status returns 400, because NationBuilder bills the donor and the gateway owns them.
signup_id and frequency are create-only. merchant_account_id is read-only. canceled is not a status you can send; cancel with PATCH /api/v2/recurring_donations/{id}/cancel.
A membership relationship associates a membership with a recurring donation that has none. Sending the membership it already has changes nothing. See recurring_donation_membership_relationship.
patch/api/v2/recurring_donations/{id}
Request
- Base URLhttps://yournation.nationbuilder.com
- AuthHTTP bearer
Request body
Example request
{
"data": {
"id": "1",
"type": "recurring_donations",
"attributes": {
"amount_in_cents": 1000,
"description": "Monthly supporter",
"donation_tracking_code_id": "1",
"external_id": "sub_123",
"frequency": "monthly",
"page_id": "1",
"recruiter_id": "1",
"signup_id": "1",
"start_date": "2019-10-26T10:00:00-04:00",
"status": "active"
},
"relationships": {
"membership": {
"data": {
"type": "memberships",
"id": "5",
"temp-id": "new-id",
"method": "update"
}
}
}
}
}Response
The updated recurring donation.
Example response
{
"data": {
"id": "1",
"type": "recurring_donations",
"attributes": {
"amount_in_cents": 1000,
"description": "Monthly supporter",
"donation_tracking_code_id": "1",
"external_id": "sub_123",
"frequency": "monthly",
"page_id": "1",
"recruiter_id": "1",
"signup_id": "1",
"start_date": "2019-10-26T10:00:00-04:00",
"status": "active",
"canceled_date": "2019-10-26T10:00:00-04:00",
"created_at": "2019-10-26T10:00:00-04:00",
"last_pay_date": "2019-10-26T10:00:00-04:00",
"merchant_account_id": "1",
"next_bill_date": "2019-10-26T10:00:00-04:00",
"payment_type": "donation",
"updated_at": "2019-10-26T10:00:00-04:00"
}
},
"included": [
{
"id": "1"
}
]
}Changes
- info
endpoint added
- info