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

# Authorize Payment

> This authorizes a payment by pre-approving the transaction before final validation. Authorization required could be PIN, OTP, 3DS, AVS, etc. 



## OpenAPI

````yaml post /payments/authorize
openapi: 3.1.0
info:
  title: Spotflow
  description: ''
  license:
    name: MIT
  version: 1.0.0
servers:
  - description: Production server
    url: https://api.spotflow.co/api/v1
security:
  - bearerAuth: []
paths:
  /payments/authorize:
    post:
      description: >-
        This authorizes a payment by pre-approving the transaction before final
        validation. Authorization required could be PIN, OTP, 3DS, AVS, etc. 
      operationId: AuthorizePayment
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reference:
                  type: string
                  example: string
                  description: >-
                    Specify a unique reference ID generated by your company to
                    identify each customer.
                authorization:
                  type: object
                  properties:
                    otp:
                      type: string
                      example: 0xxx
                    pin:
                      type: string
                      example: 01xx
                  description: >-
                    A confidential or secret code required to authenticate and
                    verify identity for card transactions.
              required:
                - reference
                - authorization
      responses:
        '200':
          description: A JSON array of authorize payment objects.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                  reference:
                    type: string
                    example: REF123456789
                  spotflowReference:
                    type: string
                    example: SPF-REF-001
                  amount:
                    type: number
                    example: 100
                  currency:
                    type: string
                    example: USD
                  localAmount:
                    type: number
                    example: 156000
                  totalFees:
                    type: number
                    example: 500
                  localCurrency:
                    type: string
                    example: NGN
                  channel:
                    type: string
                    example: card
                  status:
                    type: string
                    example: SUCCESS
                  providerMessage:
                    type: string
                    example: Please enter your OTP sent to your phone
                  rate:
                    type: number
                    example: 1560
                  region:
                    type: string
                    example: Nigeria
                  authorization:
                    type: object
                    properties:
                      mode:
                        type: string
                        example: otp
                  card:
                    type: object
                    properties:
                      type:
                        type: string
                        example: VISA
                      firstSix:
                        type: string
                        example: '412345'
                      lastFour:
                        type: string
                        example: '6789'
                  createdAt:
                    type: string
                    format: date-time
                    example: '2025-10-17T15:21:11.287Z'
                  metadata:
                    type: object
                    additionalProperties:
                      type: string
                    example:
                      orderId: ORD-000123
                      note: First payment
        '400':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized - Invalid or missing authentication token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
components:
  schemas:
    Error400:
      type: object
      properties:
        error:
          type: string
          example: Missing Parameter
        message:
          type: string
          example: missing_parameter
        status:
          type: integer
          format: float
          example: 400
    Error401:
      type: object
      properties:
        error:
          type: string
          example: Unauthorized
        message:
          type: string
          example: invalid_credentials
        status:
          type: integer
          format: float
          example: 401
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````