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

# Capture an Authorized Credit Card

> Captures funds from a credit card authorization created by the authorize endpoint. This is the
point at which money actually moves: the authorization only reserved the funds.

Pass the `transaction_number` returned by the authorize endpoint as `data.transaction_id`.
Omit `data.amount` to capture the full authorized amount, or pass a smaller amount to capture
part of it — useful when the final total came in below the original estimate. The capture
amount may not exceed the authorized amount.

**An authorization can only be captured once, and a partial capture closes it.** Capturing
$50 of a $100 hold settles $50 and releases the remaining $50 back to the cardholder — a
second call for the balance is refused with "Transaction is not an open authorization." If you
need to collect in more than one instalment (a split shipment, say), authorize each instalment
separately. Capture the true final amount in one call wherever you can.

Capture promptly, typically within 24 hours of authorizing: an uncaptured authorization is
released by the card issuer on its own schedule and can no longer be captured once it expires.

A captured transaction becomes an ordinary card payment and can be refunded or voided through
the refund and void endpoints. Note that the refund endpoint voids rather than refunds until
the transaction has settled, and reports `"message": "void"` when it does — that is the
correct handling for money that has not left the cardholder's account yet, and it emits a
Credit Card Void event rather than a Credit Card Refund one.

To release a hold without taking any money, do not call this endpoint — call
`PATCH /api/transaction/void` with `data.transaction_type` of `CC` and the authorization's
`transaction_number` as `data.transaction_id`. The refund and void endpoints are gated by
their own separate API key permission, not by this one.



## OpenAPI

````yaml https://app.dimepayments.com/openapi.yaml post /api/transaction/capture
openapi: 3.0.3
info:
  title: Dime Payments API Documentation
  description: >-
    A simple, basic API for managing Merchants through Dime Payments. JSON based
    REST API
  version: 1.0.0
servers:
  - url: https://app.dimepayments.com
security:
  - default: []
tags:
  - name: Merchant management
    description: ''
  - name: Transaction management
    description: >-

      APIs for managing transactions.  Depending on API KEY permissions, one
      should be able to

      charge credit cards, ACH, Google/Apple Pay wallets along with other
      functions.
  - name: Chargeback management
    description: ''
  - name: Document management
    description: ''
  - name: Addresses
    description: |-

      APIs for managing customer addresses
  - name: Customer management
    description: >-

      APIs for managing customers.  Depending on API KEY permissions, one should
      be able to

      list, create, update, and delete customers along with several other
      customer specific requests.
  - name: Deposit management
    description: ''
  - name: Held funds
    description: ''
  - name: Invoice management
    description: >-

      APIs for managing invoices. Depending on API KEY permissions, one should
      be

      able to list, create, update, delete, and send invoices, manage their line

      items, and manage recurring-invoice schedules. Every request is scoped to
      a

      single Merchant via the required `data.sid`.
  - name: Payment Method management
    description: >-

      APIs for managing payment methods associated with customers.  Depending on
      API KEY permissions, one should be able to

      list, show, create, update, and delete payment methods.
  - name: Recurring Payments management
    description: >-

      APIs for managing recurring payments.  Depending on API KEY permissions,
      one should be able to

      create, edit, pause, cancel along with other functions.
  - name: Subscription Plans management
    description: >-

      Merchant-facing API for subscription plans (recurring offerings customers

      subscribe to). The merchant is identified by `data.sid`; the token must
      carry

      the matching `subscription-plan:*` ability. Mirrors the recurring-payment
      and

      invoice API controllers.
  - name: Subscriptions management
    description: >-

      Merchant-facing API for individual customer subscriptions (enrollments in
      a

      plan). The merchant is identified by `data.sid`; the token must carry the

      matching `subscription:*` ability. Lifecycle transitions delegate to the

      {@see \App\Actions\Subscription} action classes so the matching
      `SUBSCRIPTION_*`

      webhook always fires. Mirrors the recurring-payment and subscription-plan
      API

      controllers.
  - name: Zapier
    description: >-

      APIs for use through Zapier.  Depending on API KEY permissions, one should
      be able to

      see customers and transactions data.
paths:
  /api/transaction/capture:
    post:
      tags:
        - Transaction management
      summary: Capture an Authorized Credit Card
      description: >-
        Captures funds from a credit card authorization created by the authorize
        endpoint. This is the

        point at which money actually moves: the authorization only reserved the
        funds.


        Pass the `transaction_number` returned by the authorize endpoint as
        `data.transaction_id`.

        Omit `data.amount` to capture the full authorized amount, or pass a
        smaller amount to capture

        part of it — useful when the final total came in below the original
        estimate. The capture

        amount may not exceed the authorized amount.


        **An authorization can only be captured once, and a partial capture
        closes it.** Capturing

        $50 of a $100 hold settles $50 and releases the remaining $50 back to
        the cardholder — a

        second call for the balance is refused with "Transaction is not an open
        authorization." If you

        need to collect in more than one instalment (a split shipment, say),
        authorize each instalment

        separately. Capture the true final amount in one call wherever you can.


        Capture promptly, typically within 24 hours of authorizing: an
        uncaptured authorization is

        released by the card issuer on its own schedule and can no longer be
        captured once it expires.


        A captured transaction becomes an ordinary card payment and can be
        refunded or voided through

        the refund and void endpoints. Note that the refund endpoint voids
        rather than refunds until

        the transaction has settled, and reports `"message": "void"` when it
        does — that is the

        correct handling for money that has not left the cardholder's account
        yet, and it emits a

        Credit Card Void event rather than a Credit Card Refund one.


        To release a hold without taking any money, do not call this endpoint —
        call

        `PATCH /api/transaction/void` with `data.transaction_type` of `CC` and
        the authorization's

        `transaction_number` as `data.transaction_id`. The refund and void
        endpoints are gated by

        their own separate API key permission, not by this one.
      operationId: captureAnAuthorizedCreditCard
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  description: ''
                  example: []
                  properties:
                    sid:
                      type: number
                      description: The ID of the merchant that holds the authorization.
                      example: 1234567
                    transaction_id:
                      type: number
                      description: >-
                        The transaction_number returned by the authorize
                        endpoint.
                      example: 1234567890
                    amount:
                      type: number
                      description: >-
                        optional The amount to capture. Defaults to the full
                        authorized amount. Must be greater than 0 and no greater
                        than the authorized amount.
                      example: 100.5
                  required:
                    - sid
                    - transaction_id
              required:
                - data
      responses:
        '200':
          description: Successful Capture
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    message: Transaction captured successfully.
                properties:
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Transaction captured successfully.
                        description: >-
                          The message returned from the capture. Example:
                          Transaction captured successfully.
        '400':
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  - description: Field Validation Failed
                    type: object
                    example:
                      errors:
                        data.transaction_id:
                          - The data.transaction_id field is required.
                    properties:
                      errors:
                        type: object
                        properties:
                          data.transaction_id:
                            type: array
                            example:
                              - The data.transaction_id field is required.
                            items:
                              type: string
                  - description: Transaction not found
                    type: object
                    example:
                      data:
                        message: No transaction found.
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: No transaction found.
                            description: >-
                              The message returned from the capture. Example:
                              Transaction captured successfully.
                  - description: Not an open authorization
                    type: object
                    example:
                      data:
                        message: Transaction is not an open authorization.
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: Transaction is not an open authorization.
                            description: >-
                              The message returned from the capture. Example:
                              Transaction captured successfully.
                  - description: Amount exceeds the authorization
                    type: object
                    example:
                      data:
                        message: Amount cannot be greater than the authorized amount
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: >-
                              Amount cannot be greater than the authorized
                              amount
                            description: >-
                              The message returned from the capture. Example:
                              Transaction captured successfully.
                  - description: Processor could not capture
                    type: object
                    example:
                      data:
                        message: Error processing capture
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: Error processing capture
                            description: >-
                              The message returned from the capture. Example:
                              Transaction captured successfully.
                  - description: Unsupported Processor
                    type: object
                    example:
                      data:
                        message: Unsupported processor.
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: Unsupported processor.
                            description: >-
                              The message returned from the capture. Example:
                              Transaction captured successfully.
        '401':
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  - description: Bad API Key Permission
                    type: object
                    example:
                      data:
                        message: Permission Denied.
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: Permission Denied.
                            description: >-
                              The message returned from the capture. Example:
                              Transaction captured successfully.
                  - description: Invalid merchant or affiliate association
                    type: object
                    example:
                      data:
                        message: Not associated with Affiliate
                    properties:
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            example: Not associated with Affiliate
                            description: >-
                              The message returned from the capture. Example:
                              Transaction captured successfully.
        '404':
          description: Invalid sid
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    message: No such Merchant
                properties:
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: No such Merchant
                        description: >-
                          The message returned from the capture. Example:
                          Transaction captured successfully.
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: >-
        You can retrieve your token by visiting your dashboard and clicking
        <b>Generate API token under your profile in top right</b>.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.