Transaction fee

post

Calculate the transaction fee for a given set of contributions.

This action takes in the contribution data, calculates the Stripe transaction fee based on the total contribution amount, and returns the transaction fee and the new total amount.

The Stripe fee is calculated as 2.9% of the total amount plus a fixed fee of $0.30.

:param request: The HTTP request object containing the contribution data in the request body. :return: A success response with the calculated transaction fee and updated total amount.

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
200Success
application/json
post
POST /api/give/contributions/transaction-fee 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:32:22.361Z",
      "processor": "stripe",
      "memo": "text",
      "date": "2025-07-23T12:32:22.361Z",
      "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:32:22.361Z",
    "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:32:22.361Z",
      "updated_at": "2025-07-23T12:32:22.361Z",
      "processor": "stripe",
      "payment_id": "text",
      "status": "PENDING",
      "memo": "text",
      "date": "2025-07-23T12:32:22.361Z",
      "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"
}