> This page is optimized for agents. Use the linked Markdown pages and llms.txt indexes for related API content.

# Update Transaction entity.

> Update the transaction, synchronize the status with the provider.

- Product: Transactions
- Section: Transaction
- Snapshot: Current
- Method: `PUT`
- Path: `/api/transactions/{id}`

## Path parameters

### `id`

Type: `number`  
Required: yes  

## Execute with TypeScript

Package: `@recranet/sdk`  

```ts
import { RecranetApiClient } from "@recranet/sdk";

const client = new RecranetApiClient({ apiKey: process.env.RECRANET_API_KEY! });

const result = await client.transactions.update({
  id: 0,
});
```

## Execute with curl

```bash
curl -X PUT "https://app.recranet.com/api/transactions/$ID" \
    -H "X-Api-Key: $RECRANET_API_KEY"
```

## Responses

### Response `200`

Category: success  

Successful response

#### `application/json`

##### Generated example

```json
{
  "id": 0,
  "processed": true,
  "cancelable": true,
  "refundable": true,
  "removable": true,
  "type": "payment",
  "status": "open",
  "amount": "-1581.00",
  "datetime": "datetime",
  "description": "description",
  "transactionId": "tr_7UhSN1zuXS",
  "paymentUrl": "paymentUrl",
  "created": "created",
  "modified": "modified"
}
```

##### Schema

###### Transaction

Type: `Transaction`  

###### `id`

Type: `number`  
Required: yes  

###### `type`

Type: `string`  
Required: no  
Allowed values: `payment`, `refund`, `chargeback`  

###### `status`

Type: `string`  
Required: no  
Allowed values: `open`, `cancelled`, `pending`, `authorized`, `expired`, `failed`, `paid`, `refunding`, `reclaimed`, `refunded`, `unknown`  

###### `amount`

Type: `string`  
Required: no  

###### `processed`

Type: `boolean`  
Required: yes  

Indicates whether the transaction has reached an end-state

###### `cancelable`

Type: `boolean`  
Required: yes  

###### `refundable`

Type: `boolean`  
Required: yes  

###### `removable`

Type: `boolean`  
Required: yes  

###### `datetime`

Type: `string`  
Format: `date-time`  
Required: no  

###### `description`

Type: `string`  
Required: no  

###### `transactionId`

Type: `string`  
Required: no  

###### `paymentUrl`

Type: `string`  
Required: no  

URL of the checkout/payment page for this transaction

###### `created`

Type: `string`  
Format: `date-time`  
Required: no  

###### `modified`

Type: `string`  
Format: `date-time`  
Required: no  

### Response `400`

Category: client-error  

Bad request

#### `application/json`

##### Example

```json
{
  "statusCode": 400,
  "description": "Bad request",
  "errors": [
    "Bad request"
  ]
}
```

##### Schema

###### object

Type: `object`  

### Response `404`

Category: client-error  

Not found

#### `application/json`

##### Example

```json
{
  "statusCode": 404,
  "description": "Not found",
  "errors": [
    "Not found"
  ]
}
```

##### Schema

###### object

Type: `object`  

## Related representations

- [Human documentation](/transactions/methods/update/)
- [TypeScript Markdown](/transactions/methods/update.md?lang=typescript)
- [curl Markdown](/transactions/methods/update.md?lang=curl)
- [site llms.txt](/llms.txt)
- [product llms.txt](/transactions/llms.txt)
- [snapshot llms.txt](/transactions/llms.txt)
