> ## Documentation Index
> Fetch the complete documentation index at: https://docs.overflow.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Contribution

> Creates a charge for the given payment method and donor



## OpenAPI

````yaml https://server.stage.overflow.co/api/docs/openapi.json post /api/v3/contributions
openapi: 3.0.0
info:
  title: Overflow Open API
  description: |

    The documentation for the Overflow Open APIs.

    To access the OpenAPI spec in JSON/YAML format, navigate to:

    * `/api/docs/openapi.json`
    * `/api/docs/openapi.yaml`
  version: '3.0'
  contact: {}
servers:
  - url: https://server.stage.overflow.co
    description: API server
security: []
tags: []
paths:
  /api/v3/contributions:
    post:
      tags:
        - Contributions
      summary: Create Contribution
      description: Creates a charge for the given payment method and donor
      operationId: OpenApiContributionsController_chargeCashPaymentMethod
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChargeCashPaymentMethodParams'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeCashPaymentMethodResponse'
        '400':
          description: Payment method is expired.
        '404':
          description: Nonprofit not found.
        '500':
          description: Failed to validate campaign.
      security:
        - ClientId: []
          ApiKey: []
components:
  schemas:
    ChargeCashPaymentMethodParams:
      type: object
      properties:
        donorId:
          type: string
          description: The ID of the donor
          example: 6710f34fd5061afeec3eab57
        paymentMethodId:
          type: string
          description: The ID of the payment method to charge
          example: 6710f34fd5061afeec3eab57
        amount:
          type: number
          minimum: 1
          description: The amount to charge to the payment method
          example: 50
        campaignId:
          type: string
          description: The ID of the campaign
          example: 6710f34fd5061afeec3eab57
        subcampaignId:
          type: string
          description: The ID of the subcampaign
          example: 6710f34fd5061afeec3eab57
        anonymous:
          type: boolean
          description: Indicates if the donation is anonymous
          example: true
        donorNotes:
          type: string
          minLength: 1
          maxLength: 500
          description: Notes from the donor
          example: >-
            Donor would like to give $1,000.00 to the playground project, and
            the …
      required:
        - donorId
        - paymentMethodId
        - amount
    ChargeCashPaymentMethodResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              description: Contribution Id
              example: 6710f34fd5061afeec3eab57
            createdAt:
              type: string
              format: date-time
              description: Contribution created at
              example: '2025-01-01T00:00:00.000Z'
            updatedAt:
              type: string
              format: date-time
              description: Contribution updated at
              example: '2025-01-01T00:00:00.000Z'
            type:
              type: string
              enum:
                - CASH
                - CRYPTO
                - DAF
                - MANUAL_CASH
                - STOCK
              description: Asset type
              example: CASH
            amount:
              type: number
              description: Contribution amount
              example: 1000
            donorCoveredFees:
              default: false
              type: boolean
              description: Whether the donor covered fees.
              example: false
            contributionDate:
              type: string
              format: date-time
              description: Contribution date
              example: '2025-01-01T00:00:00.000Z'
            contributionReceivedAt:
              type: string
              format: date-time
              nullable: true
              description: Contribution received at
            liquidationInitiatedAt:
              type: string
              format: date-time
              nullable: true
              description: Liquidation initiated at date for stock contributions
              example: null
            receivedTokensAt:
              type: string
              format: date-time
              nullable: true
              description: Received tokens at date for crypto contributions
              example: null
            status:
              type: string
              enum:
                - CHARGEBACK
                - CONFIRMED
                - FAILED
                - PAID_OUT
                - PENDING
                - PROCESSING
                - REFUNDED
                - VOIDED
                - PAYOUT_SENT
                - CONFIRMED
                - PENDING
                - PAID_OUT
                - ABANDONED
                - CANCELED
                - CONTRIBUTION_RECEIVED
                - FAILED
                - INITIATED
                - IN_PROCESS
                - PAYOUT_SENT
                - PAID_OUT
                - BILLED
                - CANCELED
                - COMPLETED
                - CONFIRMED
                - CONTRIBUTION_RECEIVED
                - DONOR_BROKERAGE_SENT_SHARES
                - DONOR_UNRESPONSIVE
                - INITIATED
                - IN_PROCESS
                - LIQUIDATION_COMPLETE
                - LIQUIDATION_INITIATED
                - PAYOUT_SENT
                - PAID_OUT
                - RECEIVED_FOR_LIQUIDATION
                - TROUBLESHOOTING
                - VERIFYING_INFORMATION
              description: Contribution status
              example: PAID_OUT
            stocks:
              type: object
              properties:
                quantity:
                  type: number
                tickers:
                  type: array
                  items:
                    type: string
              required:
                - quantity
                - tickers
              nullable: true
              description: Stock details
              example:
                quantity: 2
                tickers:
                  - AAPL
                  - MSFT
            crypto:
              type: object
              properties:
                quantity:
                  type: number
                token:
                  type: string
              required:
                - quantity
                - token
              nullable: true
              description: Crypto details
              example:
                quantity: 1
                token: BTC
            subscriptionId:
              type: string
              description: Subscription id for contributions related to recurring gifts
              example: 6710f34fd5061afeec3eab57
            frequency:
              type: string
              enum:
                - one-time
                - recurring
              nullable: true
              description: Gift frequency
              example: one-time
            paymentMethod:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - ACH
                    - Card
                    - Check
                    - Crypto
                    - Physical Cash
                    - Stock
                    - Other
                    - Apple Pay
                    - Google Pay
                    - Cash App
                    - Paypal
                    - DAF
                last4:
                  type: string
                logoUrl:
                  type: string
              nullable: true
              description: Contribution payment method information.
              example:
                type: Card
                logoUrl: https://example.com/logo.png
                last4: '4242'
            depositId:
              type: string
              nullable: true
              description: Deposit id for the contribution
              example: 8810f34fd5061afeec3eab67
            campaign:
              type: object
              properties:
                id:
                  type: string
                name:
                  type: string
              required:
                - id
                - name
              nullable: true
              description: Campaign details for the contribution
              example:
                id: 7710f34fd5061afeec3eab78
                name: Mission 2025
            subcampaign:
              type: object
              properties:
                id:
                  type: string
                name:
                  type: string
              required:
                - id
                - name
              nullable: true
              description: Subcampaign details for the contribution
              example:
                id: 7710f34fd5061afeec3eab79
                name: Toy Drive
            dedication:
              type: string
              nullable: true
              description: Dedication for the contribution
              example: In memory of Lois Lane
            donorNotes:
              type: string
              nullable: true
              description: Notes from the donor
              example: Happy to support this cause!
            anonymous:
              default: false
              type: boolean
              description: Whether the donor wants the contribution to be anonymous
              example: false
            locationId:
              type: string
              description: Location id for the contribution
              example: 6710f34fd5061afeec3eab58
            donor:
              type: object
              properties:
                id:
                  type: string
                  description: Donor Id
                  example: 6710f34fd5061afeec3eab57
                createdAt:
                  type: string
                  format: date-time
                  description: Donor created at
                  example: '2025-01-01T00:00:00.000Z'
                updatedAt:
                  type: string
                  format: date-time
                  description: Donor updated at
                  example: '2025-01-01T00:00:00.000Z'
                firstName:
                  type: string
                  description: Donor first name
                  example: John
                lastName:
                  type: string
                  description: Donor last name
                  example: Doe
                email:
                  type: string
                  format: email
                  description: Donor email
                  example: john.doe@example.com
                phone:
                  type: string
                  description: Donor phone number in E.164 format
                  example: '+1234567890'
                address:
                  type: object
                  properties:
                    city:
                      type: string
                      minLength: 1
                    country:
                      type: string
                    line1:
                      type: string
                      minLength: 1
                    line2:
                      type: string
                    state:
                      type: string
                      minLength: 1
                    timezone:
                      type: string
                    zip:
                      type: string
                      pattern: ^\d{5}(-\d{4})?$
                  required:
                    - city
                    - line1
                    - state
                    - zip
                  nullable: true
                  description: Donor address
                  example:
                    line1: 123 Main St
                    line2: Apt 1
                    city: Anytown
                    state: CA
                    zip: '12345'
                activeRecurringCount:
                  type: number
                  description: The number of active recurring donations
                  example: 1
                latestContributionDate:
                  type: string
                  format: date-time
                  description: The date of the latest contribution
                  example: '2025-01-01T00:00:00.000'
                locationIds:
                  type: array
                  items:
                    type: string
                  description: The location IDs associated with the donor
                  example:
                    - 6710f34fd5061afeec3eab57
                totalContributionsCount:
                  type: number
                  description: Total number of contributions made by the donor
                  example: 10
              required:
                - id
                - createdAt
                - updatedAt
                - firstName
                - lastName
                - email
                - phone
                - address
              description: Donor details for the contribution
            givingLinkId:
              type: string
              nullable: true
              description: Giving link id associated with the contribution
              example: 6710f34fd5061afeec3eab60
            pledgeId:
              type: string
              nullable: true
              description: Pledge id associated with the contribution
              example: 6710f34fd5061afeec3eab61
            metadata:
              type: object
              additionalProperties:
                type: string
              nullable: true
              description: >-
                Merchant-defined key-value metadata attached to the
                contribution.
              example:
                orderId: '12345'
                campaign: spring-2026
          required:
            - id
            - createdAt
            - updatedAt
            - type
            - amount
            - contributionDate
            - contributionReceivedAt
            - liquidationInitiatedAt
            - receivedTokensAt
            - status
            - stocks
            - crypto
            - frequency
            - paymentMethod
            - depositId
            - campaign
            - subcampaign
            - dedication
            - donorNotes
            - donor
            - givingLinkId
            - pledgeId
          description: The contribution for the charge
      required:
        - data
  securitySchemes:
    ClientId:
      type: apiKey
      in: header
      name: x-client-id
      description: Client ID for API authentication
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key for API authentication

````