commercetools icon

commercetools

Interact with the commercetools API. Operations are auto-generated from the official Postman collection.

Actions671

Payment → Update Payment by ID

AI-generated

Summary

Update an existing Payment in commercetools by its unique Payment ID and version using specified update actions provided in JSON or through the UI.

Inputs

  • Payment ID (required) — The unique identifier of the Payment to update.
  • Version (required) — The current version number of the Payment resource, used for concurrency control.
  • Actions (JSON) — A raw JSON array of update actions to apply to the Payment; this overrides any UI-specified actions if provided.
  • Actions (UI) — One or more update actions configured via the UI, such as adding a transaction or changing the amount planned; ignored if Actions (JSON) is set.

Output shape

a single updated Payment object

Returns the full updated Payment object as JSON. Errors from the API are thrown; the operation supports continueOnFail to handle errors gracefully.

Examples

Example 1: Update Payment with custom actions via JSON

Set Payment ID and Version, provide a JSON array of actions like [{"action":"changeAmountPlanned","amount":{"currencyCode":"EUR","centAmount":1000}}] in Actions (JSON).

Example 2: Update Payment using UI actions

Set Payment ID and Version, add one or more update actions through UI (e.g., AddTransaction with transaction details) in Actions (UI).

Links

Discussion