Contributions
List and filter contributions and their transactions for a user.
This function retrieves a list of contributions and related transactions based on several filtering criteria such as recurring contributions, contribution type, date range, amount range, card, source, and search parameters. It also calculates and returns monthly analytics for the transactions.
Filtering options:
- filter_by_user
: Admin users can filter contributions by a specific user.
- recurring
: Filters contributions based on whether they are recurring.
- type
: Filters contributions by contribution type.
- date_from
and date_to
: Filters contributions based on the creation date range.
- amount_min
and amount_max
: Filters contributions by amount.
- card_id
: Filters contributions by the card used in transactions.
- source
: Filters contributions by the source of the transaction.
- search
: Searches contributions by the source name, type name, or memo field.
The function paginates the results and appends monthly analytics data to the response.
:param request: The HTTP request object containing query parameters for filtering. :return: A paginated response with the filtered transactions and monthly analytics.
A page number within the paginated result set.
Number of results to return per page.
GET /api/give/contributions HTTP/1.1
Host: prosper-api-test.churchpad.com
Authorization: Bearer JWT
Accept: */*
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"results": [
{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"contributions": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"description": "text",
"interval_length": 1,
"interval_unit": "text",
"total_occurrences": 1,
"frequency": "text",
"start_date": "2025-07-23",
"amount": "text",
"legacy_id": "text",
"nextgen_legacy_id": "text",
"created_at": "2025-07-23T12:48:26.598Z",
"updated_at": "2025-07-23T12:48:26.598Z",
"processor": "stripe",
"payment_id": "text",
"status": "PENDING",
"memo": "text",
"date": "2025-07-23T12:48:26.598Z",
"user": "123e4567-e89b-12d3-a456-426614174000",
"type": "123e4567-e89b-12d3-a456-426614174000",
"church": "123e4567-e89b-12d3-a456-426614174000",
"guest": "123e4567-e89b-12d3-a456-426614174000"
}
],
"church_id": "123e4567-e89b-12d3-a456-426614174000",
"about_user": {
"first_name": "text",
"last_name": "text",
"email": "[email protected]",
"phone_number": "text"
},
"start_date": "2025-07-23",
"payment_method": "text",
"card_token": "text",
"cvv": "text",
"customer_acceptance": {
"ip_address": "text",
"user_agent": "text"
},
"card_details": {
"cc_number": "text",
"cc_expiration": "text",
"cvv": "text"
},
"bank_details": {
"account_number": "text",
"routing_number": "text"
},
"processor_id": "text"
}
]
}
false
POST /api/give/contributions HTTP/1.1
Host: prosper-api-test.churchpad.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 1360
{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"contributions": [
{
"recurring": false,
"description": "text",
"interval_length": 1,
"interval_unit": "text",
"total_occurrences": 1,
"frequency": "text",
"start_date": "2025-07-23",
"amount": "text",
"legacy_id": "text",
"nextgen_legacy_id": "text",
"created_at": "2025-07-23T12:48:26.598Z",
"processor": "stripe",
"memo": "text",
"date": "2025-07-23T12:48:26.598Z",
"type": "123e4567-e89b-12d3-a456-426614174000",
"guest": "123e4567-e89b-12d3-a456-426614174000"
}
],
"card": {
"user": "123e4567-e89b-12d3-a456-426614174000",
"legacy_id": "text",
"nextgen_legacy_id": "text",
"created_at": "2025-07-23T12:48:26.598Z",
"number": "text",
"cvv": "text",
"expiration_month": "text",
"expiration_year": "text",
"holder_name": "text",
"is_default": true,
"token": "text",
"brand": "text",
"type": "token",
"is_hidden": true,
"processor": "text",
"guest": "123e4567-e89b-12d3-a456-426614174000"
},
"church_id": "123e4567-e89b-12d3-a456-426614174000",
"about_user": {
"first_name": "text",
"last_name": "text",
"email": "[email protected]",
"phone_number": "text"
},
"cover_transaction_fees": false,
"start_date": "2025-07-23",
"payment_method": "text",
"card_token": "text",
"cvv": "text",
"customer_acceptance": {
"ip_address": "text",
"user_agent": "text"
},
"card_details": {
"cc_number": "text",
"cc_expiration": "text",
"cvv": "text"
},
"bank_details": {
"account_number": "text",
"routing_number": "text"
},
"processor_id": "text"
}
{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"contributions": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"description": "text",
"interval_length": 1,
"interval_unit": "text",
"total_occurrences": 1,
"frequency": "text",
"start_date": "2025-07-23",
"amount": "text",
"legacy_id": "text",
"nextgen_legacy_id": "text",
"created_at": "2025-07-23T12:48:26.598Z",
"updated_at": "2025-07-23T12:48:26.598Z",
"processor": "stripe",
"payment_id": "text",
"status": "PENDING",
"memo": "text",
"date": "2025-07-23T12:48:26.598Z",
"user": "123e4567-e89b-12d3-a456-426614174000",
"type": "123e4567-e89b-12d3-a456-426614174000",
"church": "123e4567-e89b-12d3-a456-426614174000",
"guest": "123e4567-e89b-12d3-a456-426614174000"
}
],
"church_id": "123e4567-e89b-12d3-a456-426614174000",
"about_user": {
"first_name": "text",
"last_name": "text",
"email": "[email protected]",
"phone_number": "text"
},
"start_date": "2025-07-23",
"payment_method": "text",
"card_token": "text",
"cvv": "text",
"customer_acceptance": {
"ip_address": "text",
"user_agent": "text"
},
"card_details": {
"cc_number": "text",
"cc_expiration": "text",
"cvv": "text"
},
"bank_details": {
"account_number": "text",
"routing_number": "text"
},
"processor_id": "text"
}
A UUID string identifying this contribution.
GET /api/give/contributions/{id} HTTP/1.1
Host: prosper-api-test.churchpad.com
Authorization: Bearer JWT
Accept: */*
{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"contributions": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"description": "text",
"interval_length": 1,
"interval_unit": "text",
"total_occurrences": 1,
"frequency": "text",
"start_date": "2025-07-23",
"amount": "text",
"legacy_id": "text",
"nextgen_legacy_id": "text",
"created_at": "2025-07-23T12:48:26.598Z",
"updated_at": "2025-07-23T12:48:26.598Z",
"processor": "stripe",
"payment_id": "text",
"status": "PENDING",
"memo": "text",
"date": "2025-07-23T12:48:26.598Z",
"user": "123e4567-e89b-12d3-a456-426614174000",
"type": "123e4567-e89b-12d3-a456-426614174000",
"church": "123e4567-e89b-12d3-a456-426614174000",
"guest": "123e4567-e89b-12d3-a456-426614174000"
}
],
"church_id": "123e4567-e89b-12d3-a456-426614174000",
"about_user": {
"first_name": "text",
"last_name": "text",
"email": "[email protected]",
"phone_number": "text"
},
"start_date": "2025-07-23",
"payment_method": "text",
"card_token": "text",
"cvv": "text",
"customer_acceptance": {
"ip_address": "text",
"user_agent": "text"
},
"card_details": {
"cc_number": "text",
"cc_expiration": "text",
"cvv": "text"
},
"bank_details": {
"account_number": "text",
"routing_number": "text"
},
"processor_id": "text"
}
A UUID string identifying this contribution.
false
PUT /api/give/contributions/{id} HTTP/1.1
Host: prosper-api-test.churchpad.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 1360
{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"contributions": [
{
"recurring": false,
"description": "text",
"interval_length": 1,
"interval_unit": "text",
"total_occurrences": 1,
"frequency": "text",
"start_date": "2025-07-23",
"amount": "text",
"legacy_id": "text",
"nextgen_legacy_id": "text",
"created_at": "2025-07-23T12:48:26.598Z",
"processor": "stripe",
"memo": "text",
"date": "2025-07-23T12:48:26.598Z",
"type": "123e4567-e89b-12d3-a456-426614174000",
"guest": "123e4567-e89b-12d3-a456-426614174000"
}
],
"card": {
"user": "123e4567-e89b-12d3-a456-426614174000",
"legacy_id": "text",
"nextgen_legacy_id": "text",
"created_at": "2025-07-23T12:48:26.598Z",
"number": "text",
"cvv": "text",
"expiration_month": "text",
"expiration_year": "text",
"holder_name": "text",
"is_default": true,
"token": "text",
"brand": "text",
"type": "token",
"is_hidden": true,
"processor": "text",
"guest": "123e4567-e89b-12d3-a456-426614174000"
},
"church_id": "123e4567-e89b-12d3-a456-426614174000",
"about_user": {
"first_name": "text",
"last_name": "text",
"email": "[email protected]",
"phone_number": "text"
},
"cover_transaction_fees": false,
"start_date": "2025-07-23",
"payment_method": "text",
"card_token": "text",
"cvv": "text",
"customer_acceptance": {
"ip_address": "text",
"user_agent": "text"
},
"card_details": {
"cc_number": "text",
"cc_expiration": "text",
"cvv": "text"
},
"bank_details": {
"account_number": "text",
"routing_number": "text"
},
"processor_id": "text"
}
{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"contributions": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"description": "text",
"interval_length": 1,
"interval_unit": "text",
"total_occurrences": 1,
"frequency": "text",
"start_date": "2025-07-23",
"amount": "text",
"legacy_id": "text",
"nextgen_legacy_id": "text",
"created_at": "2025-07-23T12:48:26.598Z",
"updated_at": "2025-07-23T12:48:26.598Z",
"processor": "stripe",
"payment_id": "text",
"status": "PENDING",
"memo": "text",
"date": "2025-07-23T12:48:26.598Z",
"user": "123e4567-e89b-12d3-a456-426614174000",
"type": "123e4567-e89b-12d3-a456-426614174000",
"church": "123e4567-e89b-12d3-a456-426614174000",
"guest": "123e4567-e89b-12d3-a456-426614174000"
}
],
"church_id": "123e4567-e89b-12d3-a456-426614174000",
"about_user": {
"first_name": "text",
"last_name": "text",
"email": "[email protected]",
"phone_number": "text"
},
"start_date": "2025-07-23",
"payment_method": "text",
"card_token": "text",
"cvv": "text",
"customer_acceptance": {
"ip_address": "text",
"user_agent": "text"
},
"card_details": {
"cc_number": "text",
"cc_expiration": "text",
"cvv": "text"
},
"bank_details": {
"account_number": "text",
"routing_number": "text"
},
"processor_id": "text"
}
A UUID string identifying this contribution.
DELETE /api/give/contributions/{id} HTTP/1.1
Host: prosper-api-test.churchpad.com
Authorization: Bearer JWT
Accept: */*
No response body
No content
A UUID string identifying this contribution.
false
PATCH /api/give/contributions/{id} HTTP/1.1
Host: prosper-api-test.churchpad.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 1360
{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"contributions": [
{
"recurring": false,
"description": "text",
"interval_length": 1,
"interval_unit": "text",
"total_occurrences": 1,
"frequency": "text",
"start_date": "2025-07-23",
"amount": "text",
"legacy_id": "text",
"nextgen_legacy_id": "text",
"created_at": "2025-07-23T12:48:26.598Z",
"processor": "stripe",
"memo": "text",
"date": "2025-07-23T12:48:26.598Z",
"type": "123e4567-e89b-12d3-a456-426614174000",
"guest": "123e4567-e89b-12d3-a456-426614174000"
}
],
"card": {
"user": "123e4567-e89b-12d3-a456-426614174000",
"legacy_id": "text",
"nextgen_legacy_id": "text",
"created_at": "2025-07-23T12:48:26.598Z",
"number": "text",
"cvv": "text",
"expiration_month": "text",
"expiration_year": "text",
"holder_name": "text",
"is_default": true,
"token": "text",
"brand": "text",
"type": "token",
"is_hidden": true,
"processor": "text",
"guest": "123e4567-e89b-12d3-a456-426614174000"
},
"church_id": "123e4567-e89b-12d3-a456-426614174000",
"about_user": {
"first_name": "text",
"last_name": "text",
"email": "[email protected]",
"phone_number": "text"
},
"cover_transaction_fees": false,
"start_date": "2025-07-23",
"payment_method": "text",
"card_token": "text",
"cvv": "text",
"customer_acceptance": {
"ip_address": "text",
"user_agent": "text"
},
"card_details": {
"cc_number": "text",
"cc_expiration": "text",
"cvv": "text"
},
"bank_details": {
"account_number": "text",
"routing_number": "text"
},
"processor_id": "text"
}
{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"contributions": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"description": "text",
"interval_length": 1,
"interval_unit": "text",
"total_occurrences": 1,
"frequency": "text",
"start_date": "2025-07-23",
"amount": "text",
"legacy_id": "text",
"nextgen_legacy_id": "text",
"created_at": "2025-07-23T12:48:26.598Z",
"updated_at": "2025-07-23T12:48:26.598Z",
"processor": "stripe",
"payment_id": "text",
"status": "PENDING",
"memo": "text",
"date": "2025-07-23T12:48:26.598Z",
"user": "123e4567-e89b-12d3-a456-426614174000",
"type": "123e4567-e89b-12d3-a456-426614174000",
"church": "123e4567-e89b-12d3-a456-426614174000",
"guest": "123e4567-e89b-12d3-a456-426614174000"
}
],
"church_id": "123e4567-e89b-12d3-a456-426614174000",
"about_user": {
"first_name": "text",
"last_name": "text",
"email": "[email protected]",
"phone_number": "text"
},
"start_date": "2025-07-23",
"payment_method": "text",
"card_token": "text",
"cvv": "text",
"customer_acceptance": {
"ip_address": "text",
"user_agent": "text"
},
"card_details": {
"cc_number": "text",
"cc_expiration": "text",
"cvv": "text"
},
"bank_details": {
"account_number": "text",
"routing_number": "text"
},
"processor_id": "text"
}