> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.schoolset.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.schoolset.io/_mcp/server.

# Update a payment or recurring payment plan

PATCH https://ssuccessv2.com/app/api/v2/payment/update/{id}
Content-Type: application/json

Updates payment payer, amount, date, method, allocations, or recurring-plan data submitted by the payment editor.

Reference: https://docs.schoolset.io/api-reference/school-set-api/payments/update-payment

## Authentication

- `Authorization` header (bearer token, required) — The signed-in SchoolSet user token sent by the frontend.

## Request

### Path parameters

- `id` (integer, required)

### Query parameters

- `_method` (enum, required)
  - Allowed values: `patch`

### Body (application/json)

This endpoint expects an object.

- `payer_id` (integer, required)
- `payer_type` (enum, required)
  - Allowed values: `parent`, `family`, `entity`, `donor`, `guest`, `student`, `form_submission`
- `amount_payment` (double, optional)
- `payment_amount` (double, optional)
- `payment_date` (datetime, optional)
- `payment_type_id` (integer, optional)
- `payment_status_id` (integer, optional)
- `payment_method_id` (integer, optional)
- `group` (enum, optional)
  - Allowed values: `chargeNow`, `recurring`, `upcoming`, `manual`
- `note` (string, optional)
- `allocations` (list of map from string to any, optional)
- `plan_id` (integer, optional)
- `payment_plan` (list of map from string to any, optional)
- `payment_recurring_period_id` (integer, optional)
- `of_installments` (integer, optional)
- `grace_period` (integer, optional)
- `secondary_wallet_id` (integer, optional)
- `payment_data` (map from string to any, optional)
- `wallet_id` (integer, optional)
- `credit_type_id` (integer, optional)
- `fundraising_fund_id` (integer, optional)
- `fundraising_id` (integer, optional)
- `fee_coverage` (boolean, optional)
- `fee_coverage_apply_to` (list of enum, optional)
  - Allowed values: `tuition`, `fundraising`
- `send_receipt` (boolean, optional)

## Response

### 200

Payment saved.

- `status` (string, optional)
- `message` (string, optional)
- `data` (map from string to any, optional)

## Errors

### 400 Bad Request Error

- `any`

### 401 Unauthorized Error

- `any`

### 403 Forbidden Error

- `any`

### 422 Unprocessable Entity Error

- `any`

## Examples

**Request**

```json
{
  "payer_id": 42,
  "payer_type": "family"
}
```

**Response**

```json
{
  "status": "success",
  "message": "Saved",
  "data": {}
}
```

**SDK Code**

```python
import requests

url = "https://ssuccessv2.com/app/api/v2/payment/update/874"

querystring = {"_method":"patch"}

payload = {
    "payer_id": 42,
    "payer_type": "family"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://ssuccessv2.com/app/api/v2/payment/update/874?_method=patch';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"payer_id":42,"payer_type":"family"}'
};

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://ssuccessv2.com/app/api/v2/payment/update/874?_method=patch"

	payload := strings.NewReader("{\n  \"payer_id\": 42,\n  \"payer_type\": \"family\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	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://ssuccessv2.com/app/api/v2/payment/update/874?_method=patch")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"payer_id\": 42,\n  \"payer_type\": \"family\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://ssuccessv2.com/app/api/v2/payment/update/874?_method=patch")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"payer_id\": 42,\n  \"payer_type\": \"family\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://ssuccessv2.com/app/api/v2/payment/update/874?_method=patch', [
  'body' => '{
  "payer_id": 42,
  "payer_type": "family"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://ssuccessv2.com/app/api/v2/payment/update/874?_method=patch");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"payer_id\": 42,\n  \"payer_type\": \"family\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "payer_id": 42,
  "payer_type": "family"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://ssuccessv2.com/app/api/v2/payment/update/874?_method=patch")! 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()
```