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

# Verify a payment

> Canonical server-side lookup. Fulfill only when data.status is success and data.amount matches the order.



## OpenAPI

````yaml /openapi.yaml get /payment/verify/{reference}
openapi: 3.1.0
info:
  title: Vestrapay Payments API
  version: '1.0'
  description: >
    Initialize payments, collect card or bank transfer at checkout, and verify
    transactions. Amounts are major units as strings (100 naira is "100.00").
    Successful HTTP JSON is always `{ "status": "success", "data": … }`.
    Failures are `{ "status": "failed", "error", "message" }`. Webhook bodies
    are `{ "event", "data", "timestamp" }` and are not wrapped.
servers:
  - url: https://server.staging.vestrapay.app/v1
    description: Staging
  - url: https://api.vestrapay.com/v1
    description: Production
security:
  - SecretKey: []
tags:
  - name: Payments
    description: Server-to-server initialize and verify
  - name: Checkout
    description: Customer checkout session (access code)
paths:
  /payment/verify/{reference}:
    get:
      tags:
        - Payments
      summary: Verify a payment
      description: >-
        Canonical server-side lookup. Fulfill only when data.status is success
        and data.amount matches the order.
      operationId: verify-payment
      parameters:
        - name: reference
          in: path
          required: true
          schema:
            type: string
          example: VPY_TXN_ACME001
      responses:
        '200':
          description: Current payment state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyPaymentResponse'
              example:
                status: success
                data:
                  id: uuid
                  reference: VPY_TXN_ACME001
                  amount: '100.00'
                  total: '101.50'
                  amountSettled: '100.00'
                  currency: NGN
                  status: success
                  channel: card
                  fees: '1.50'
                  merchantBearsCost: false
                  paidAt: '2026-05-10T14:30:00.000Z'
                  metadata:
                    orderId: ORD_12345
        '404':
          description: Transaction not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    VerifyPaymentResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          enum:
            - success
        data:
          $ref: '#/components/schemas/VerifyPaymentData'
    ErrorEnvelope:
      type: object
      required:
        - status
        - error
        - message
      properties:
        status:
          type: string
          enum:
            - failed
        error:
          type: string
        message:
          type: string
    VerifyPaymentData:
      type: object
      properties:
        id:
          type: string
        reference:
          type: string
        amount:
          type: string
        total:
          type: string
        amountSettled:
          type: string
          nullable: true
        currency:
          type: string
        status:
          type: string
          enum:
            - pending
            - processing
            - success
            - failed
            - abandoned
        channel:
          type: string
          nullable: true
        fees:
          type: string
        merchantBearsCost:
          type: boolean
        paidAt:
          type: string
          format: date-time
          nullable: true
        metadata:
          type: object
          additionalProperties: true
        split:
          type: object
          additionalProperties: true
  securitySchemes:
    SecretKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Secret key (sk_test_ or sk_live_). Authorization Bearer with the same
        value is also accepted.

````