# Update a charge

`PUT https://app.shuttleglobal.com/c/api/instances/{instance_key}/charges/{charge_id}`

Update specific properties of a charge. Only certain fields can be modified:
- status: Toggle between ACTIVE or WRITTENOFF
- amount: New amount due (cannot be less than amount already paid)
- due: Due date (if set to past date, payment may be taken immediately)

## Authentication

- basicAuth: Basic Authentication using secret key
- bearerAuth: OAuth 2.0 Bearer Token Authentication

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `charge_id` | path | string | yes | The charge's ID (`cg_...`), or the `alt_key` you gave it. |

## Request body (`application/json`), required

- `charge` (object)
  - `status` (string) One of: `ACTIVE`, `WRITTENOFF`.
  - `amount` (string): New amount due, cannot be less than amount already paid
  - `due` (string (date-time)): When the charge is due

## Responses

### 200: Updated charge

```json
{
  "charge": {
    "id": "string",
    "amount": "string",
    "alt_key": "string",
    "charge_number": 0,
    "extra_charge": true,
    "completed": "2026-01-01T12:00:00Z",
    "contract": "string",
    "created": "2026-01-01T12:00:00Z",
    "created_session": "string",
    "due": "2026-01-01T12:00:00Z",
    "initiated": "2026-01-01T12:00:00Z",
    "outstanding_amount": "string",
    "overdue_amount": "string",
    "recurring": true,
    "paid_amount": "string",
    "status": "ACTIVE",
    "updated": "2026-01-01T12:00:00Z",
    "updated_session": "string",
    "writtenoff_amount": "string",
    "v": 0
  }
}
```

### 400: Bad request

```json
{
  "code": "string",
  "message": "string"
}
```

### 401: Unauthorised: the API key is missing or not valid

```json
{
  "code": "UNAUTHORIZED",
  "message": "Unauthorised"
}
```

### 404: Resource not found

```json
{
  "code": "string",
  "message": "string"
}
```

## Example request

```sh
curl --request PUT \
  --url https://app.shuttleglobal.com/c/api/instances/YOUR_INSTANCE_KEY/charges/CHARGE_ID \
  --header 'Authorization: Basic <base64 of SECRET_KEY:>' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

Reference page: https://docs.shuttleglobal.com/merchants/reference/operations/updatecharge/