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

# Capture

> Captures a payment if supported by the payment method.



## OpenAPI

````yaml https://raw.githubusercontent.com/seerbit/openapi/master/specs/external-api.yml post /payments/capture
openapi: 3.0.1
info:
  title: SeerBit API Reference
  contact: {}
  version: '1.0'
servers:
  - url: https://seerbitapi.com/api/v2
security: []
tags:
  - name: AUTHENTICATION
  - name: STANDARD CHECKOUT
  - name: ORDER CHECKOUT
  - name: PAYMENT METHOD
  - name: MOMO
  - name: NON 3DS PAYMENT
  - name: CARD
  - name: ACCOUNT
  - name: TOKENIZE
  - name: AUTHORISE
  - name: PREAUTHORIZATION
  - name: RECURRENT
paths:
  /payments/capture:
    post:
      tags:
        - PREAUTHORIZATION
      summary: Capture
      description: Captures a payment if supported by the payment method.
      operationId: Capture
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CaptureRequest'
        required: true
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
              examples:
                CaptureResponse:
                  $ref: '#/components/examples/Capture201Response'
                CaptureResponse1:
                  $ref: '#/components/examples/Capture201Response1'
        '400':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                type: object
              examples:
                400Response:
                  $ref: '#/components/examples/400Response'
                400Response2:
                  $ref: '#/components/examples/400Response2'
                400Response3:
                  $ref: '#/components/examples/400Response3'
                400Response4:
                  $ref: '#/components/examples/400Response4'
                400Response5:
                  $ref: '#/components/examples/400Response5'
                400Response6:
                  $ref: '#/components/examples/400Response6'
                400Response8:
                  $ref: '#/components/examples/400Response8'
                400Response11:
                  $ref: '#/components/examples/400Response11'
        '403':
          description: Missing Header Token
          content:
            application/json:
              schema:
                type: object
              examples:
                403Response:
                  $ref: '#/components/examples/403Response'
                403Response2:
                  $ref: '#/components/examples/403Response2'
                403Response3:
                  $ref: '#/components/examples/403Response3'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
              examples:
                400Response:
                  $ref: '#/components/examples/404Response1'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
              examples:
                500Response:
                  $ref: '#/components/examples/500Response'
      deprecated: false
      security:
        - Basic: []
components:
  schemas:
    CaptureRequest:
      title: CaptureRequest
      required:
        - amount
        - country
        - currency
        - paymentReference
        - productDescription
        - publicKey
      type: object
      properties:
        paymentReference:
          type: string
          description: >-
            This is the unique identifier for a transaction, to be generated by
            merchant.
        currency:
          type: string
          description: This is the currency the transaction is to be carried out in.
        country:
          type: string
          description: This is the country the customer is doing the transaction from
        productDescription:
          type: string
          description: This is the product description supplied by the merchant.
        amount:
          type: string
          description: This is the amount to be paid.
        publicKey:
          type: string
          description: This is the merchant public key.
      example:
        paymentReference: PREAUTH124456789798765k321CB0
        currency: NGN
        country: NG
        productDescription: preauth test capture
        amount: '5.10'
        publicKey: SBTESTPUBK_dhrpzbRpR34l6VmqkCFOKA94L5E1jSTu
  examples:
    Capture201Response:
      summary: An example of A Capture 201 Response payload
      value:
        status: SUCCESS
        data:
          code: '00'
          payments:
            paymentReference: PREAUTH1244567890987654321CB0
            status: PARTIALLY_CAPTURED
            card:
              bin: '512345'
              last4: '0008'
              token: tk_40a0503d-4586-4220-a69e-c69cc9293016
          message: APPROVED
    Capture201Response1:
      summary: An example of A Capture 201 Response payload
      value:
        status: SUCCESS
        data:
          code: S12
          payments:
            paymentReference: PREAUTH1244567890987654321CB0
            card:
              bin: '512345'
              last4: '0008'
              token: tk_40a0503d-4586-4220-a69e-c69cc9293016
          message: >-
            INVALID_REQUEST = Transaction already exists. Retry not supported as
            it is not the last transaction on the order.
    400Response:
      summary: An example of 400 response payload
      value:
        message: Bad Request
        error: There has been a problem with reading or understanding the request.
    400Response2:
      summary: An example of 400 response payload
      value:
        status: ERROR
        data:
          code: S12
          message: Invalid/Missing parameters = publicKey
    400Response3:
      summary: An example of 400 response payload
      value:
        status: ERROR
        data:
          code: S12
          message: Invalid/Missing parameters = amount
    400Response4:
      summary: An example of 400 response payload
      value:
        status: ERROR
        data:
          code: S12
          message: Invalid/Missing parameters = paymentReference
    400Response5:
      summary: An example of 400 response payload
      value:
        status: ERROR
        data:
          code: S12
          message: Invalid/Missing parameters = currency
    400Response6:
      summary: An example of 400 response payload
      value:
        status: ERROR
        data:
          code: S12
          message: Invalid/Missing parameters = country
    400Response8:
      summary: An example of 400 response payload
      value:
        status: ERROR
        data:
          code: S12
          message: Incomplete Card details
    400Response11:
      summary: An example of 400 response payload
      value:
        status: ERROR
        data:
          code: S12
          message: No authorised transaction found for this reference
    403Response:
      summary: An example of 403 response payload
      value:
        message: Confirm Merchant Environment
        error: PERMISSION
    403Response2:
      summary: An example of 403 response payload
      value:
        status: ERROR
        data:
          code: S12
          message: Bad credentials = invalid public key
    403Response3:
      summary: An example of 403 response payload
      value:
        status: ERROR
        data:
          code: S12
          message: Bad credentials
    404Response1:
      summary: An example of 404 response payload
      value:
        message: Not Found
        error: The server can not find the requested resource
    500Response:
      summary: An example of 500 response payload
      value:
        message: Internal Server Error
        error: PROCESSING
  securitySchemes:
    Basic:
      type: http
      scheme: basic

````

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