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

# Get Payment by Idempotency Key

> What became of a money request whose answer you lost, by the `Idempotency-Key` you sent it with. Keys are looked up within your business: requests made with your API keys are found by any of them, and a dashboard user finds only their own. Read-only: nothing is run or repeated.

## Overview

Find out what became of a money request whose answer you lost, such as a [Send Payment](https://docs.platnova.com/api-reference/payments/send.md) that timed out, by the `Idempotency-Key` you sent it with. It only reads: nothing is run or repeated. For a payout you sent with your own `reference`, [Verify Payment](https://docs.platnova.com/api-reference/payments/verify.md) by that reference does the same job.

* `payment` set: the payment exists. `payment.ref` is its `transaction_ref`, and `payment.status` is its status now.
* `nothing_created: true`: nothing was created and nothing can be. Send it again **under a new key**.
* `payment` null and `nothing_created: false`: we can't be sure yet (`in_progress`, or a request that stopped without an answer). Ask again later; don't send it again.


## OpenAPI

````yaml GET /v1/payments/by-key/{key}
openapi: 3.1.0
info:
  title: API
  version: 1.0.0
  description: >-
    Platnova's Business API: collect payments with hosted checkout, issue
    virtual accounts and cards, send payouts, and receive webhooks.


    # Authentication


    Send your API key in the `X-API-Key` header on every request. Do not send it
    as `Authorization: Bearer`, and do not send a dashboard session token
    alongside it. The `api_key` query parameter is deprecated.


    # Base URLs


    - Live: https://api.platnova.com

    - Sandbox: https://sandbox.api.platnova.co


    # Errors


    Most responses are `{status: boolean, data, error: [], message}`; branch on
    the HTTP status and `data.code`. Validation failures are HTTP 422 `{status:
    "error", message: "Validation failed", errors: {field: [messages]}}`. A
    missing or invalid key is 401 `un-authorized access`. See
    https://docs.platnova.com/errors.
servers:
  - url: https://api.platnova.com
    description: Production server
  - url: https://sandbox.api.platnova.co
    description: Development server
security:
  - apiKeyAuth: []
tags:
  - name: Customer
    description: Create and manage customers
  - name: Virtual Account
    description: Create and manage virtual accounts
  - name: Card
    description: Create and manage cards
  - name: Wallet
    description: List and manage wallets
  - name: Payment
    description: Send and verify payments
  - name: Transaction
    description: List transactions and generate receipts
  - name: Checkout
    description: Create and retrieve checkout sessions
  - name: Payment Link
    description: Create and manage payment links
  - name: Invoice
    description: Create and manage invoices
  - name: Bank
    description: Bank lists and account verification for bank transfers
  - name: Bills
    description: Betting wallet top-ups
  - name: Refunds
paths:
  /v1/payments/by-key/{key}:
    get:
      tags:
        - Payment
      summary: Get payment by idempotency key
      description: >-
        What became of a money request whose answer you lost, by the
        `Idempotency-Key` you sent it with. Keys are looked up within your
        business: requests made with your API keys are found by any of them, and
        a dashboard user finds only their own. Read-only: nothing is run or
        repeated.
      operationId: getPaymentByKey
      parameters:
        - name: key
          in: path
          required: true
          schema:
            type: string
            maxLength: 255
            pattern: ^[A-Za-z0-9_.:-]+$
          description: The `Idempotency-Key` the request was sent with.
      responses:
        '200':
          description: The request and what it created
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/PaymentByKeyResponse'
                  error:
                    type: array
                    items: {}
                  message:
                    type: string
              examples:
                created:
                  summary: The payout was created
                  value:
                    status: true
                    data:
                      key: payout-INV-2026-0042
                      state: answered
                      nothing_created: false
                      payment:
                        type: transaction
                        id: 6f1c2d9e-8a4b-4c1e-9b7a-2f5d3e8c1a90
                        ref: BTRNSF7HeRoy4CRl6hcOOqAzwAeo0WLLMMbtQ2
                        status: success
                        amount: '5000.00'
                        fee: '50.00'
                        created_at: '2026-11-03T09:15:02Z'
                    error: []
                    message: operation was successful
                nothing_created:
                  summary: Refused; nothing was sent
                  value:
                    status: true
                    data:
                      key: payout-INV-2026-0042
                      state: answered
                      nothing_created: true
                      payment: null
                    error: []
                    message: operation was successful
        '400':
          description: >-
            `data.code` `idempotency_key_invalid`: not 1–255 of letters, digits,
            `_`, `.`, `:`, `-`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: >-
            `data.code` `idempotency_key_not_found`: we have no request from you
            under this key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            `data.code` `lookup_unavailable`: we couldn't check just now. Try
            again; this never means nothing happened.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    PaymentByKeyResponse:
      type: object
      properties:
        key:
          type: string
        state:
          type: string
          enum:
            - answered
            - in_progress
            - no_answer
          description: >-
            `answered`: the request finished; the same key and body return the
            same answer. `in_progress`: it may still be running; ask again
            shortly. `no_answer`: it stopped without an answer (our error, or a
            crash). The key will never run again.
        nothing_created:
          type: boolean
          description: >-
            `true` only when the request can no longer create anything and
            created nothing: you may send the payment again **under a new key**.
            `false` with `payment` null means we can't be sure yet; ask again
            later rather than paying twice.
        payment:
          type:
            - object
            - 'null'
          description: What the request created, or null.
          properties:
            type:
              type: string
              description: >-
                `transaction` for a payout or conversion; `recurring_payment`;
                card routes answer `card`, `customer_card` or
                `customer_transaction`.
            id:
              type: string
            ref:
              type: string
              description: >-
                For a payout, the `transaction_ref` Send Payment would have
                answered.
            status:
              type: string
              description: The payment's status **now**.
            amount:
              type: string
              example: '5000.00'
            fee:
              type: string
              example: '50.00'
            created_at:
              type: string
              format: date-time
    Error:
      type: object
      properties:
        status:
          type: boolean
          example: false
        data:
          type: object
          description: Often empty. On coded errors holds `code` and details.
          properties:
            code:
              type: string
              example: request_in_progress
        error:
          type: array
          items:
            type: string
        message:
          type: string
          description: For people; don't parse.
  responses:
    Unauthorized:
      description: Missing or invalid API key (`un-authorized access`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication.

````

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