Contributions

get

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.

Authorizations
Query parameters
pageintegerOptional

A page number within the paginated result set.

page_sizeintegerOptional

Number of results to return per page.

Responses
200Success
application/json
get
GET /api/give/contributions HTTP/1.1
Host: prosper-api-test.churchpad.com
Authorization: Bearer JWT
Accept: */*
200Success
{
  "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"
    }
  ]
}
post
Authorizations
Body
user_idstring · uuidOptional
cardall ofWrite-onlyOptional
church_idstring · uuidOptional
cover_transaction_feesbooleanWrite-onlyOptionalDefault: false
start_datestring · dateOptional
payment_methodstringOptional
card_tokenstringOptional
cvvstringOptional
processor_idstringOptional
Responses
201Success
application/json
post
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"
}
201Success
{
  "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"
}
get
Authorizations
Path parameters
idstring · uuidRequired

A UUID string identifying this contribution.

Responses
200Success
application/json
get
GET /api/give/contributions/{id} HTTP/1.1
Host: prosper-api-test.churchpad.com
Authorization: Bearer JWT
Accept: */*
200Success
{
  "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"
}
put
Authorizations
Path parameters
idstring · uuidRequired

A UUID string identifying this contribution.

Body
user_idstring · uuidOptional
cardall ofWrite-onlyOptional
church_idstring · uuidOptional
cover_transaction_feesbooleanWrite-onlyOptionalDefault: false
start_datestring · dateOptional
payment_methodstringOptional
card_tokenstringOptional
cvvstringOptional
processor_idstringOptional
Responses
200Success
application/json
put
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"
}
200Success
{
  "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"
}
delete
Authorizations
Path parameters
idstring · uuidRequired

A UUID string identifying this contribution.

Responses
204
No response body
delete
DELETE /api/give/contributions/{id} HTTP/1.1
Host: prosper-api-test.churchpad.com
Authorization: Bearer JWT
Accept: */*
204

No response body

No content

patch
Authorizations
Path parameters
idstring · uuidRequired

A UUID string identifying this contribution.

Body
user_idstring · uuidOptional
cardall ofWrite-onlyOptional
church_idstring · uuidOptional
cover_transaction_feesbooleanWrite-onlyOptionalDefault: false
start_datestring · dateOptional
payment_methodstringOptional
card_tokenstringOptional
cvvstringOptional
processor_idstringOptional
Responses
200Success
application/json
patch
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"
}
200Success
{
  "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"
}