---
title: "Get a payment"
method: GET
path: "/payments/{payment_id}"
tags: ["Payments"]
---

# Get a payment

`GET /payments/{payment_id}`

## Request

- Base URL: `https://api.togai.com`
- URL: `https://api.togai.com/payments/{payment_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/togaihq/apis/togai-apis/docs/payments/:payment_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Get payment

## Path parameters

- `payment_id` string, required

## Query parameters

- `version` integer

## Response `200`

Response for POST payments requests

- Payment: Payment object
  - `id` string, required
  - `description` string
  - `notes` string
  - `accountId` string, required
  - `externalPaymentReferences` ExternalPaymentReference, required: external payment reference object
    - `sourceName` string, required
    - `sourceType` 'GATEWAY' | 'CASH' | 'CHEQUE' | 'BANK_TRANSFER' | 'CARD', required
    - `transactionNumber` string, required: Check number or Card transaction number
    - `description` string
    - `metadata` object
  - `lineItemRecords` PaymentLineItemRecord[], required
    - `type` 'INVOICE' | 'CREDIT' | 'WALLET_CREDIT', required
    - `togaiId` string
    - `amount` number
    - `order` integer, required
  - `totalAmount` number, required
  - `currency` string, required
  - `version` number, required
  - `createdBy` string, required
  - `createdAt` string, date-time, required

## Other responses

- `400`: Error response
- `401`: Error response
- `403`: Error response
- `404`: Error response
- `429`: Error response
- `default`: Error response

## Changes

- **2024-04-18** `f22fc08442b7`: 1 info
  - the response property `externalPaymentReferences` became required for the status `200`
- **2024-01-05** `ea9c4628bfdb`: 1 warning, 1 info
  - added the new `CHEQUE` enum value to the `externalPaymentReferences/sourceType` response property for the response status `200`
  - removed the `CHECK` enum value from the `externalPaymentReferences/sourceType` response property for the response status `200`
- **2023-12-21** `dbff52f9d224`: 2 breaking, 2 warning, 2 info
  - the response property `lineItemRecords/items/amount` became optional for the status `200`
  - the response property `lineItemRecords/items/togaiId` became optional for the status `200`
  - added the new `CREDIT` enum value to the `lineItemRecords/items/type` response property for the response status `200`
  - added the new `WALLET_CREDIT` enum value to the `lineItemRecords/items/type` response property for the response status `200`
  - …2 more
- **2023-12-08** `49b2a2e3f198`: 1 breaking
  - the `createdAt` response's property type changed from `date-time` to `string`, and format from no format to `date-time` for status `200`
- **2023-12-07** `9f3c4190595b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/togaihq/apis/togai-apis/changes/payments/:payment_id/get.md)

---

[API](https://skmtc.dev/togaihq/apis/togai-apis.md) - [All operations](https://skmtc.dev/togaihq/apis/togai-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/togaihq/apis/togai-apis/revisions/442f5d8f4aa0?raw)
