> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.monite.com/v2023-09-01/api/transactions/patch-transactions-id/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.monite.com/_mcp/server. # Update a transaction PATCH https://api.sandbox.monite.com/v1/transactions/{transaction_id} Content-Type: application/json Reference: https://docs.monite.com/api/transactions/patch-transactions-id ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Servers - `https://api.sandbox.monite.com/v1` (sandbox, default) - `https://api.monite.com/v1` (eu_production) - `https://us.api.monite.com/v1` (na_production) ## Request ### Path parameters - `transaction_id` (string, required) ### Headers - `x-monite-version` (string, required) - `x-monite-entity-id` (string, required) — The ID of the entity that owns the requested resource. ### Body (application/json) This endpoint expects an object. - `amount` (integer, optional) — The transaction amount in [minor units](https://docs.monite.com/references/currencies#minor-units). Positive values for in-flow, negative values for out-flow. - `currency` (enum, optional) — ISO currency code. - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `SVC`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW` - `description` (string, optional) — A human-readable description of the transaction. - `entity_user_id` (string, optional) — ID of the entity user who made the transaction, if applicable. - `external_id` (string, optional) — External identifier for idempotency, if provided by the source system. - `merchant_amount` (integer, optional) — Original merchant transaction amount in minor units. - `merchant_currency` (enum, optional) — ISO currency code for the `merchant_amount`. - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `SVC`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW` - `merchant_location` (string, optional) — The merchant location. - `merchant_name` (string, optional) — The merchant name. - `partner_metadata` (map from string to string, optional) — Extensible key-value pairs for storing additional custom information for partner needs. - `payment_method` (TransactionPaymentMethod, optional) - `started_at` (datetime, optional) — Date and time when the transaction was initiated. - `status` (enum, optional) — The current processing status of the transaction. - Allowed values: `created`, `processing`, `succeeded`, `declined`, `refunded`, `failed` - `type` (enum, optional) — The nature of the transaction. - Allowed values: `capture`, `refund`, `cash_withdrawal`, `fee`, `adjustment`, `reversal` ## Response ### 200 Successful Response - `id` (string, required) — A unique Monite-generated ID assigned to this transaction. - `amount` (integer, required) — The transaction amount in [minor units](https://docs.monite.com/references/currencies#minor-units). Positive values for in-flow, negative values for out-flow. - `currency` (enum, required) — ISO currency code. - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `SVC`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW` - `entity_id` (string, required) — ID of the entity that owns this resource. - `merchant_amount` (integer, required) — Original merchant transaction amount in minor units. - `merchant_currency` (enum, required) — ISO currency code for the `merchant_amount`. - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `SVC`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW` - `merchant_location` (string, required) — The merchant location. - `merchant_name` (string, required) — The merchant name. - `payment_method` (TransactionPaymentMethod, required) - `started_at` (datetime, required) — Date and time when the transaction was initiated. - `type` (enum, required) — The nature of the transaction. - Allowed values: `capture`, `refund`, `cash_withdrawal`, `fee`, `adjustment`, `reversal` - `description` (string, optional) — A human-readable description of the transaction. - `entity_user_id` (string, optional) — ID of the entity user who made the transaction, if applicable. - `external_id` (string, optional) — External identifier for idempotency, if provided by the source system. - `partner_metadata` (map from string to string, optional) — Extensible key-value pairs for storing additional custom information for partner needs. - `receipt_id` (string, optional) — ID of the related receipt from payables service, if any. This field is read-only and system-managed. - `status` (enum, optional) — The current processing status of the transaction. - Allowed values: `created`, `processing`, `succeeded`, `declined`, `refunded`, `failed` ## Errors ### 400 Patch Transactions ID Request Bad Request Error Bad Request - `error` (ErrorSchema, required) ### 401 Patch Transactions ID Request Unauthorized Error Unauthorized - `error` (ErrorSchema, required) ### 403 Patch Transactions ID Request Forbidden Error Forbidden - `error` (ErrorSchema, required) ### 404 Patch Transactions ID Request Not Found Error Not found - `error` (ErrorSchema, required) ### 409 Patch Transactions ID Request Conflict Error Business logic error - `error` (ErrorSchema, required) ### 422 Patch Transactions ID Request Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ### 500 Patch Transactions ID Request Internal Server Error Internal Server Error - `error` (ErrorSchema, required) ## Types ### TransactionPaymentMethod - `type`: `card` - `details` (CardPaymentMethodDetails, required) - `type`: `bank_account` - `details` (BankAccountPaymentMethodDetails, required) ### ErrorSchema - `message` (string, required) ### ValidationError - `loc` (list of ValidationErrorLocItem, required) - `msg` (string, required) - `type` (string, required) ### CardPaymentMethodDetails - `brand` (string, required) — The card brand name. - `card_type` (enum, required) — The card type - Allowed values: `credit`, `debit`, `prepaid`, `unknown` - `expiry_month` (integer, required) — The card's expiration month (1 - January, 12 - December). - `expiry_year` (integer, required) — The card's expiration year. - `last4` (string, required) — The last four digits of the card number. ### BankAccountPaymentMethodDetails - `account_holder_name` (string, optional) — The name of the person or business that owns this bank account. - `account_number` (string, optional) — The bank account number. US account numbers contain 9 to 12 digits. UK account numbers typically contain 8 digits. - `bic` (string, optional) — The SWIFT/BIC code of the bank. Can be either 8 or 11 characters long. - `currency` (enum, optional) — ISO currency code of the bank account. - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `SVC`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW` - `iban` (string, optional) — The IBAN of the bank account, up to 34 characters. - `name` (string, optional) — The name of the bank account, if available. For example, "Primary account" or "Savings account". - `routing_number` (string, optional) — The bank's routing transit number (RTN). US routing numbers consist of 9 digits. - `sort_code` (string, optional) — The bank's sort code. ### ValidationErrorLocItem ## Examples **Request** ```json {} ``` **Response** ```json { "id": "id", "amount": 1, "currency": "AED", "entity_id": "entity_id", "merchant_amount": 1, "merchant_currency": "AED", "merchant_location": "Berlin, Germany", "merchant_name": "Acme Inc.", "payment_method": { "type": "card", "details": { "brand": "brand", "card_type": "credit", "expiry_month": 1, "expiry_year": 1, "last4": "last4" } }, "started_at": "2024-01-15T09:30:00Z", "type": "capture", "description": "description", "entity_user_id": "entity_user_id", "external_id": "external_id", "partner_metadata": { "key": "value" }, "receipt_id": "receipt_id", "status": "created" } ``` **SDK Code** ```python import requests url = "https://api.sandbox.monite.com/v1/transactions/transaction_id" payload = {} headers = { "x-monite-version": "2023-09-01", "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4", "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.sandbox.monite.com/v1/transactions/transaction_id'; const options = { method: 'PATCH', headers: { 'x-monite-version': '2023-09-01', 'x-monite-entity-id': '9d2b4c8f-2087-4738-ba91-7359683c49a4', Authorization: 'Bearer ', 'Content-Type': 'application/json' }, body: '{}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.sandbox.monite.com/v1/transactions/transaction_id" payload := strings.NewReader("{}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("x-monite-version", "2023-09-01") req.Header.Add("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4") req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.sandbox.monite.com/v1/transactions/transaction_id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["x-monite-version"] = '2023-09-01' request["x-monite-entity-id"] = '9d2b4c8f-2087-4738-ba91-7359683c49a4' request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.patch("https://api.sandbox.monite.com/v1/transactions/transaction_id") .header("x-monite-version", "2023-09-01") .header("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('PATCH', 'https://api.sandbox.monite.com/v1/transactions/transaction_id', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', 'x-monite-entity-id' => '9d2b4c8f-2087-4738-ba91-7359683c49a4', 'x-monite-version' => '2023-09-01', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.sandbox.monite.com/v1/transactions/transaction_id"); var request = new RestRequest(Method.PATCH); request.AddHeader("x-monite-version", "2023-09-01"); request.AddHeader("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4"); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-monite-version": "2023-09-01", "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4", "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.sandbox.monite.com/v1/transactions/transaction_id")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```