---
title: "Update a Merchant Purchase"
method: PATCH
path: "/v2/merchant-purchase/{id}"
tags: ["Merchant Purchase"]
---

# Update a Merchant Purchase

`PATCH /v2/merchant-purchase/{id}`

## Request

- Base URL: `https://api.starkbank.com`
- URL: `https://api.starkbank.com/v2/merchant-purchase/{id}`
- Auth: API key in header `Digital-Signature`

Update a single purchase. If the purchase is currently approved, you can only update the status to canceled and set the amount to 0. This action cancels the authorization. If the purchase is currently confirmed, you can update the status to reversed and adjust the amount to a lower value. This action debits the difference and reverses the purchase, partially or totally. If the purchase is partially reversed, its status will remain confirmed. However, if the purchase is fully reversed, its status will be updated to voided.

## Path parameters

- `id` string, required

## Request body

- object
  - `amount` integer: New amount of the purchase. If the purchase is confirmed, this will debit and reverse the difference. If the purchase is authorized, only 0 is allowed and this will cancel the authorization. Example: 200 (R$2.00).
  - `status` string: This can be used to cancel or reverse the purchase by passing 'canceled' or 'reversed' as the status patch.

## Response `200`

Successful operation

- object

## Other responses

- `400`: Client error
- `500`: Server error

---

[API](https://skmtc.dev/starkbank/apis/stark-bank-api.md) - [All operations](https://skmtc.dev/starkbank/apis/stark-bank-api/llms.txt) - [OpenAPI document](https://skmtc.dev/starkbank/apis/stark-bank-api/revisions/aeff5068a5da?raw)
