Merchant Purchase

Update a Merchant Purchase

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.

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

Path parameters

idstring required

Id of the purchase entity.

Request body

amountinteger

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).

statusstring

This can be used to cancel or reverse the purchase by passing 'canceled' or 'reversed' as the status patch.

Response

Successful operation

object required

Changes

No recorded changes to this operation across all 1 revision of this API.