---
title: "Update payment"
method: PUT
path: "/payments/{id}"
tags: ["Payments"]
---

# Update payment

`PUT /payments/{id}`

Use when updating payment status or metadata (e.g. after reconciliation or adding a reference).

## Path parameters

- `id` string, required

## Request body

- UpdatePaymentRequest
  - `error_message` string
  - `failed_at` string, date-time
  - `gateway_payment_id` string
  - `metadata` TypesMetadata
  - `payment_gateway` string
  - `payment_method_id` string
  - `payment_status` string
  - `succeeded_at` string, date-time

## Response `200`

Updated payment

- PaymentResponse
  - `amount` string
  - `attempts` PaymentAttemptResponse[]
    - `attempt_number` integer
    - `created_at` string, date-time
    - `created_by` string
    - `error_message` string
    - `id` string
    - `metadata` TypesMetadata
    - `payment_id` string
    - `tenant_id` string
    - `updated_at` string, date-time
    - `updated_by` string
  - `created_at` string, date-time
  - `created_by` string
  - `currency` string
  - `destination_id` string
  - `destination_type` 'INVOICE'
  - `error_message` string
  - `failed_at` string, date-time
  - `gateway_metadata` TypesMetadata
  - `gateway_payment_id` string
  - `gateway_tracking_id` string
  - `id` string
  - `idempotency_key` string
  - `invoice_number` string
  - `metadata` TypesMetadata
  - `payment_gateway` string
  - `payment_method_id` string
  - `payment_method_type` 'CARD' | 'ACH' | 'OFFLINE' | 'CREDITS' | 'PAYMENT_LINK'
  - `payment_status` 'INITIATED' | 'PENDING' | 'PROCESSING' | 'SUCCEEDED' | 'OVERPAID' | 'FAILED' | 'REFUNDED' | 'PARTIALLY_REFUNDED'
  - `payment_url` string
  - `refunded_at` string, date-time
  - `save_card_and_make_default` boolean
  - `succeeded_at` string, date-time
  - `tenant_id` string
  - `track_attempts` boolean
  - `updated_at` string, date-time
  - `updated_by` string

## Other responses

- `400` — Invalid request
- `500` — Server error

## Changes

- **2026-05-18** `8ec2edea6b20` — 4 warning
  - removed the optional property `details` from the response with the `400` status
  - removed the optional property `details` from the response with the `500` status
  - added the new `too_many_requests` enum value to the `code` response property for the response status `400`
  - added the new `too_many_requests` enum value to the `code` response property for the response status `500`
- **2026-04-06** `95af41a12111` — 4 warning, 8 info
  - removed the optional property `error` from the response with the `400` status
  - removed the optional property `error` from the response with the `500` status
  - removed the optional property `success` from the response with the `400` status
  - removed the optional property `success` from the response with the `500` status
  - …8 more
- **2026-04-04** `9013edc21339` — 2 breaking
  - the `failed_at` request property type/format changed from `string`/`` to `string`/`date-time`
  - the `succeeded_at` request property type/format changed from `string`/`` to `string`/`date-time`

[Change history](https://skmtc.dev/flexprice/apis/flexprice-api/changes/payments/:id/put.md)

---

[API](https://skmtc.dev/flexprice/apis/flexprice-api.md) · [All operations](https://skmtc.dev/flexprice/apis/flexprice-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/flexprice/flexprice-api/revisions/2a40f94de722/schema)
