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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.dintero.com/feedback

```json
{
  "path": "/api-reference/transactions/capture-pending-transaction",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Capture pending transaction

> Capture a pending Transaction, thereby collection the amount
withheld by the pending transaction.

Option to specify an amount that should be captured. 
Defaults to capture the full transaction.
When the amount specified is less than the reserved/pending, 
the remaining amount will still be reserved/pending and can be captured later.

scopes:
- admin:wallets
- write:wallets
- write:wallets:/transactions




## OpenAPI

````yaml /mintlify-docs/openapi/spec-wallets.yaml post /accounts/{aid}/wallets/transactions/{transaction_id}/capture
openapi: 3.0.0
info:
  title: Wallet / Cards API
  description: >
    API for managing virtual cards, digital gift cards and transactions


    # Changelog


    All notable changes to the API.


    ## 2026-06-06


    > **new**: Add support for batch create cards that can be activated.
    Intended

    > for use case where physical cards will be issued from the Wallet cards.
    The

    > cards created will all have status `created` and needs to be activated
    before

    > use

    >

    > - [POST
    /v1/accounts/{aid}/wallets/cards/batch](#tag/cards/operation/aid_cards_batch_post)

    > - [POST
    /v1/accounts/{aid}/wallets/cards/{card_id}/activate](#tag/cards/operation/aid_cards_cardid_activate_post)


    ## 2025-02-06


    > **new**: Add optional query parameter `includes` and extend card details
    with pin and token format

    > - [GET
    /v1/accounts/{aid}/wallets/cards/{card_id}](#tag/cards/operation/aid_cards_cardid_get)


    ## 2025-01-30


    > **new**: Add endpoint for rotating or generating pin for card

    > - [POST
    /v1/accounts/{aid}/wallets/cards/{card_id}/rotate-pin](#tag/cards/operation/aid_cards_cardid_rotate_pin_post)


    ## 2024-12-16


    > **new**: Add `amount_reserved` on card balance, add `status` to card
    properties

    >

    > - [GET
    /v1/accounts/{aid}/wallets/cards](#tag/cards/operation/aid_cards_get)

    > - [GET
    /v1/accounts/{aid}/wallets/cards/{card_id}](#tag/cards/operation/aid_cards_cardid_get)


    ## 2024-12-11


    > **new**: Add `amount_available` query param filter on getting cards

    >

    > - [GET
    /v1/accounts/{aid}/wallets/cards](#tag/cards/operation/aid_cards_get)


    ## 2024-12-05


    > **new**: Add `amount_funds`, `amount_drawdown`, `amount_pending` on card
    balance

    > 

    >

    > - [GET
    /v1/accounts/{aid}/wallets/cards](#tag/cards/operation/aid_cards_get)

    > - [GET
    /v1/accounts/{aid}/wallets/cards/{card_id}](#tag/cards/operation/aid_cards_cardid_get)


    ## 2024-11-28


    > **update**: Revert adding deletion properties to cards

    >

    > **new**: Add `originated_by` to card and transaction properties

    >

    > - [GET
    /v1/accounts/{aid}/wallets/cards](#tag/cards/operation/aid_cards_get)

    > - [GET
    /v1/accounts/{aid}/wallets/cards/{card_id}](#tag/cards/operation/aid_cards_cardid_get)

    > - [GET
    /v1/accounts/{aid}/wallets/cards/{card_id}/transactions](#tag/cards/operation/aid_cards_cardid_transactions_tid_get)

    > - [POST
    /v1/accounts/{aid}/wallets/transactions](#tag/transactions/operation/aid_cards_transactions_post)

    > - [POST
    /v1/accounts/{aid}/wallets/transactions/{transaction_id}/capture](#tag/transactions/operation/aid_cards_cardid_transactions_capture_post)

    > - [POST
    /v1/accounts/{aid}/wallets/transactions/{transaction_id}/void](#tag/transactions/operation/aid_cards_cardid_transactions_void_post)


    ## 2024-11-27


    > **new**: Add endpoint for deleting a card

    > 

    > **new**: `include_deleted` query parameter for including deleted cards

    >

    > - [DELETE
    /v1/accounts/{aid}/wallets/cards/{card_id}](#tag/cards/operation/aid_cards_cardid_delete)

    > - [GET
    /v1/accounts/{aid}/wallets/cards](#tag/cards/operation/aid_cards_get)


    ## 2024-11-13


    > **new**: Add endpoint for getting cards on account

    >

    > **new**: Add support for defining type of card

    >

    > - [GET
    /v1/accounts/{aid}/wallets/cards](#tag/cards/operation/aid_cards_get)

    > - [POST
    /v1/accounts/{aid}/wallets/cards](#tag/cards/operation/aid_cards_post)


    ## 2024-11-01


    > **update**: Adjust minimum length of PIN when creating a new card from 6
    to 4.

    >

    > - [POST
    /v1/accounts/{aid}/wallets/cards](#tag/cards/operation/aid_cards_post)


    ## 2024-06-10


    > **new**: Allow more currencies: `SEK`, `DKK`, `EUR`, and `USD`.

    >

    > - [POST
    /v1/accounts/{aid}/wallets/cards](#tag/cards/operation/aid_cards_post)

    > - [POST
    /v1/accounts/{aid}/wallets/transactions](#tag/transactions/operation/aid_cards_transactions_post)

    > - [GET
    /v1/accounts/{aid}/wallets/cards/{card_id}](#tag/cards/operation/aid_cards_cardid_get)

    > - [GET
    /v1/accounts/{aid}/wallets/customers/{customer_id}/cards/{card_id}](#tag/customers/operation/aid_customers_cid_card_cid_get)


    ## 2024-02-01


    > **new**: Add option to create card with `pin` and support for

    > including pin when getting card info and when creating new

    > transaction

    >

    > - [POST
    /v1/accounts/{aid}/wallets/cards](#tag/cards/operation/aid_cards_post)

    > - [POST /v1/accounts/{aid}/wallets/info](#operation/aid_cards_token_post)

    > - [POST
    /v1/accounts/{aid}/wallets/transactions](#operation/aid_cards_transactions_post)


    ## 2023-07-07


    > **new**: Add optional `name` field to `Card`.

    >

    > - [POST
    /v1/accounts/{aid}/wallets/cards](#tag/cards/operation/aid_cards_post)

    > - [GET
    /v1/accounts/{aid}/wallets/cards/{card_id}](#tag/cards/operation/aid_cards_cardid_get)

    > - [GET
    /v1/accounts/{aid}/wallets/customers/{customer_id}/cards](#tag/customers/operation/aid_customers_cid_cards_get)

    > - [GET
    /v1/accounts/{aid}/wallets/customers/{customer_id}/cards/{card_id}](#tag/customers/operation/aid_customers_cid_card_cid_get)


    ## 2023-06-12


    > **new**: Get details on customer card using `customer_id` and `card_id`.

    >

    > - [GET
    /v1/accounts/{aid}/wallets/customers/{customer_id}/cards/{card_id}](#tag/customers/operation/aid_customers_cid_card_cid_get)


    ## 2023-06-01


    > **new** Support creating card with `active_from` to control when

    > the created card is activated and allows `drawdown` transactions to be

    > created

    >

    > - [POST
    /v1/accounts/{aid}/wallets/cards](#tag/cards/operation/aid_cards_post)


    > **new** Support creating fund transaction using `type` property.

    >

    > - [POST
    /v1/accounts/{aid}/wallets/transactions](#tag/transactions/operation/aid_cards_transactions_post)


    > **new** Support creating transaction using `card_id`.

    >

    > - [POST
    /v1/accounts/{aid}/wallets/transactions](#tag/transactions/operation/aid_cards_transactions_post)


    > **new**: Support listing cards by customer_id, allow customer with

    > access to `user:wallets` scope to list their cards with balance

    >

    > - [GET
    /v1/accounts/{aid}/wallets/customers/{cid}/cards](#tag/customers/operation/aid_customers_cid_cards_get)
  contact:
    name: API Integration Support
    email: integration@dintero.com
  version: 1.0.0
  license:
    name: UNLICENSED
    url: https://dintero.com
servers:
  - url: https://api.dintero.com/v1
security:
  - JWT: []
paths:
  /accounts/{aid}/wallets/transactions/{transaction_id}/capture:
    post:
      tags:
        - transactions
      summary: Capture pending transaction
      description: >
        Capture a pending Transaction, thereby collection the amount

        withheld by the pending transaction.


        Option to specify an amount that should be captured. 

        Defaults to capture the full transaction.

        When the amount specified is less than the reserved/pending, 

        the remaining amount will still be reserved/pending and can be captured
        later.


        scopes:

        - admin:wallets

        - write:wallets

        - write:wallets:/transactions
      operationId: aid_cards_cardid_transactions_capture_post
      parameters:
        - $ref: '#/components/parameters/accountId'
        - $ref: '#/components/parameters/transactionId'
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/Metadata'
                - $ref: '#/components/schemas/BaseOperation'
                - $ref: '#/components/schemas/OptionalAmount'
        description: capture details
        required: true
      responses:
        '200':
          description: Transaction created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transaction'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - JWT: []
components:
  parameters:
    accountId:
      name: aid
      description: |
        An id that uniquely identifies the account.
      in: path
      required: true
      schema:
        type: string
        format: ^[PT]{1}\d{8}$
        minLength: 9
        maxLength: 9
    transactionId:
      name: transaction_id
      description: |
        An id that uniqely idetifies a transaction
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    Metadata:
      type: object
      properties:
        metadata:
          type: object
          description: |
            A key-value JSON object to store any additional
            information. The dintero_* namespace for keys
            is reserved
          example:
            order_id: xk39592f
    BaseOperation:
      type: object
      required:
        - ref_id
      properties:
        ref_id:
          type: string
          description: |
            Unique ref ID provided by the client to support safely retrying
            requests without accidentally performing the same operation twice

            All card transaction must have a unique ref ID, but it is not
            required that the ref ID is globally unique.
    OptionalAmount:
      type: object
      properties:
        amount:
          type: integer
          example: 50000
          minimum: 0
          description: |
            Monetary amount in smallest unit for the currency
    Transaction:
      type: object
      allOf:
        - $ref: '#/components/schemas/TransactionInput'
        - properties:
            type:
              type: string
              description: |
                The type of the Transaction:
                  - *fund*: the amount has been funded to the card
                  - *drawdown*: the amount has been drawn from the card
                  - *pending_capture*: the amount has been locked until it is either captured or voided
                  - *voided*: the amount locked by pending Transaction is unlocked
              enum:
                - drawdown
                - pending_capture
                - voided
                - fund
              readOnly: true
            parent_id:
              type: string
              format: uuid
              readOnly: true
              description: |
                The ID of the original Transaction for a void or
                capture transaction
    TransactionInput:
      type: object
      allOf:
        - $ref: '#/components/schemas/ImmutableEntity'
        - $ref: '#/components/schemas/Metadata'
        - $ref: '#/components/schemas/BaseOperation'
        - $ref: '#/components/schemas/Operation'
        - $ref: '#/components/schemas/OriginatedBy'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
          properties:
            code:
              type: string
              description: The code used to identify the error/warning
            errors:
              type: array
              description: The nested error(s) encountered during validation
              items:
                type: object
            message:
              type: string
              description: The human readable description of the error/warning
    ImmutableEntity:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: |
            An UUID that uniquely identifies the resource
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: |
            The date-time when the resource was created
          readOnly: true
        created_by:
          type: string
          example: 1c92f7e1-2897-4d46-bdcc-c127a914fb4e
          description: |
            The ID of the user/client that created the resource
          readOnly: true
    Operation:
      type: object
      allOf:
        - required:
            - amount
            - currency
          properties:
            amount:
              type: integer
              example: 50000
              minimum: 0
              description: |
                Monetary amount in smallest unit for the currency
            currency:
              type: string
              example: NOK
              enum:
                - NOK
                - SEK
                - DKK
                - EUR
                - USD
              description: |
                The three-character ISO-4217 currency.
                https://en.wikipedia.org/wiki/ISO_4217
    OriginatedBy:
      type: object
      properties:
        originated_by:
          type: string
          description: |
            The reference to where the entity was created.
            (must not have trailing or leading spaces)
          maxLength: 255
  responses:
    BadRequest:
      description: Bad / Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    AccessForbidden:
      description: Access forbidden, invalid JWT token was used
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Unexpected Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    JWT:
      type: http
      description: >
        Bearer authentication (token authentication) should be used for
        accessing the API.


        Use [Get
        Token](https://docs.dintero.com/api.html#operation/aid_auths_oauth_token_post)
        to get an access token for client credentials.

        Pass the token in the request header:

            Authorization: Bearer {access_token}

        where the **access_token** is JSON Web Tokens (JWT).
      scheme: bearer
      bearerFormat: JWT

````