---
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
  - `refunded_at` string, date-time
  - `succeeded_at` string, date-time
  - `voided_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' | 'CUSTOMER'
  - `environment_id` string
  - `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' | 'UPI'
  - `payment_status` 'INITIATED' | 'PENDING' | 'PROCESSING' | 'SUCCEEDED' | 'OVERPAID' | 'FAILED' | 'REFUNDED' | 'PARTIALLY_REFUNDED' | 'VOIDED'
  - `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
  - `voided_at` string, date-time

## Other responses

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

## Changes

- **2026-07-31** `50b7421a9690` — 1 info
  - added the optional property `environment_id` to the response with the `200` status
- **2026-07-15** `f8ecf435d25d` — 3 warning
  - added the new `UPI` enum value to the `payment_method_type` response property for the response status `200`
  - added the new `not_implemented` enum value to the `code` response property for the response status `400`
  - added the new `not_implemented` enum value to the `code` response property for the response status `500`
- **2026-07-09** `646d6658479b` — 4 breaking
  - the `failed_at` request property type/format changed from `string`/`` to `string`/`date-time`
  - the `refunded_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`
  - the `voided_at` request property type/format changed from `string`/`` to `string`/`date-time`
- **2026-07-09** `7d57386313c7` — 7 breaking, 16 warning
  - the `metadata` request property type/format changed from ``/`` to `object`/``
  - the `attempts/items/metadata` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - the `destination_type` response's property type/format changed from ``/`` to `string`/`` for status `200`
  - the `gateway_metadata` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - …19 more
- …earlier changes not shown

[Full 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/562f13cf61dd/schema)
