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

# Complete a donation pledge

> 
    Completes a donation pledge by liquidating it, processing the donation, and returning the resulted donation.

    This endpoint:
    - Processes the pledge completion and returns the resulting donations
    - All donations will have the amount of 10 USDC
    



## OpenAPI

````yaml https://api.endaoment.org/oas-json post /v1/donation-pledges/{id}/complete
openapi: 3.0.0
info:
  title: Endaoment API
  description: The official Endaoment API endpoints
  version: 0.0.1
  contact: {}
servers:
  - url: https://api.endaoment.org
    description: Production
security: []
tags: []
paths:
  /v1/donation-pledges/{id}/complete:
    post:
      tags:
        - Donation Pledges
      summary: Complete a donation pledge
      description: |2-

            Completes a donation pledge by liquidating it, processing the donation, and returning the resulted donation.

            This endpoint:
            - Processes the pledge completion and returns the resulting donations
            - All donations will have the amount of 10 USDC
            
      operationId: DonationPledgesController_completePledge
      parameters:
        - name: x-api-key
          in: header
          description: API key used for authentication and authorization
          required: true
          schema:
            type: string
        - name: id
          required: true
          in: path
          description: The unique identifier of the fund
          example: 123e4567-e89b-12d3-a456-426614174000
          schema: {}
      responses:
        '201':
          description: Pledge successfully completed
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DonationDto'
        '401':
          description: >-
            Unauthorized: Missing or invalid API key, or organization does not
            have trustedCollaboratorApiAccess configured
        '404':
          description: Pledge not found or endpoint blocked in production
      security:
        - ApiKey: []
components:
  schemas:
    DonationDto:
      type: object
      properties:
        id:
          type: string
          description: ID of the Donation
          example: 9bc260c9-2724-48ac-802e-fcad3cf3fb88
        destinationEntity:
          type: string
          description: >-
            ID of the destination that received the donation. If this is set,
            all other destinations are null
          example: 4cc1500a-8dd0-4543-acf0-3b5433ef7a9a
        entityType:
          type: object
          description: Type of the entity that received the donation
          example: org
        transactionHash:
          type: string
          description: Transaction hash of the donation made to the target entity.
          example: '0xffa8b0ef694866c23ae004b51661215d6654068cb3e0d3afca8d077047718673'
        destinationContractAddress:
          type: string
          description: Endaoment contract that received the donation
          example: '0xa68bb66c56e99d3a8799907c02a77275a60bf4fe'
        donorUserId:
          type: object
          description: >-
            Id of the user that made the donation. Can be null in case of
            anonymous donations.
          example: 86a15444-e720-468d-a50d-e013ead44261
        donorAddress:
          type: string
          description: On-chain address that made the donation.
          example: '0x18682b92bfa61e6c2c200c449fb0041124f05427'
        inputAmount:
          type: string
          description: >-
            Input token of the donation. Denominated in the smallest currency
            unit of the input token. For stock donations, this will be the
            amount of shares donated.
          example: '250000'
        inputToken:
          type: object
          description: >-
            Input token of the donation. Will be null if donation is a stock
            donation.
          example:
            id: 1032
            symbol: FIAT.USD
            name: US Dollar
            decimals: 6
            logoUrl: >-
              https://assets.coingecko.com/coins/images/6319/thumb/USD_Coin_icon.png?1547042389
            type: Token
            featured: false
            popularity: 0
        inputStock:
          type: object
          description: >-
            Input stock of the donation. Will be null if donation is a crypto
            donation.
          example: null
        netOutputBaseToken:
          type: string
          description: >-
            Net Output Amount for the Donation, liquid of fees. Stored in USDC
            Units. 2'000'000 USDC units = 2.00 USD
          example: '1'
        fee:
          type: string
          description: >-
            Fees charged for the donation.  Stored in the smallest unit of the
            base token (currently USDC). 2'000'000 USDC units = 2.00 USD
          example: '0'
        outputBaseToken:
          description: Output token of the donation
          example:
            id: 18
            symbol: USDC
            name: USD//C
            decimals: 6
            logoUrl: >-
              https://assets.coingecko.com/coins/images/6319/thumb/USD_Coin_icon.png?1547042389
            type: EvmToken
            featured: false
            popularity: 0
            chainId: 31337
            contractAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
          allOf:
            - $ref: '#/components/schemas/TokenListingDto'
        createdAtUtc:
          type: string
          description: >-
            ISO-8601 string describing the UTC Date that this donation was
            registered in the database
          example: '2025-03-26T18:20:48.493Z'
        chainId:
          type: object
          description: Chain ID of the Donation.
          example: 31337
      required:
        - id
        - destinationEntity
        - entityType
        - transactionHash
        - destinationContractAddress
        - donorUserId
        - donorAddress
        - inputAmount
        - inputToken
        - inputStock
        - netOutputBaseToken
        - fee
        - outputBaseToken
        - createdAtUtc
        - chainId
    TokenListingDto:
      type: object
      properties:
        id:
          type: number
          description: Unique identifier of the token
          example: 1
        symbol:
          type: string
          description: Symbol of the token
          example: ETH
        name:
          type: string
          description: Full name of the token
          example: Ethereum
        decimals:
          type: number
          description: Number of decimal places used by the token
          example: 18
        logoUrl:
          type: string
          description: URL to the token logo image
          example: https://example.com/ethereum-logo.png
        type:
          type: string
          description: Type of token
          enum:
            - Token
            - EvmToken
            - OtcToken
          example: Token
        featured:
          type: boolean
          description: Whether the token is featured
          example: true
        popularity:
          type: number
          description: Popularity score of the token
          example: 10
        chainId:
          type: number
          description: Chain ID where the token exists (for EVM tokens)
          nullable: true
          example: 1
        contractAddress:
          type: string
          description: Contract address of the token (for EVM tokens)
          nullable: true
          example: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
        otcAddress:
          type: string
          description: >-
            Address for receiving the token over-the-counter, without automatic
            liquidation on the blockchain. The property is always present for
            OtcTokens, but may be undefined for EvmTokens if no OTC address is
            found.
          nullable: true
          example: bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh
        memo:
          type: string
          description: Optional memo/tag for token transfers
          nullable: true
          example: MEMO123456
        otcNetwork:
          type: object
          description: OTC Network information for the token, if available
          nullable: true
          example:
            id: ethereum
            type: mainnet
        otcChainId:
          type: number
          description: >-
            Chain ID mapped from OTC Network when the network corresponds to an
            EVM chain. This helps identify which chain the OTC address accepts
            deposits on.
          nullable: true
          example: 1
      required:
        - id
        - symbol
        - name
        - decimals
        - logoUrl
        - type
        - featured
        - popularity

````