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

# List a contract payment history

GET https://ssuccessv2.com/app/api/v1/system/payment/contract/details/payment/history/{contract_id}

Returns collected and unallocated payments for a SchoolSet contract, including status, payer, payment method, allocations, and the running balance after each payment.

Reference: https://docs.schoolset.io/api-reference/school-set-api/payment-contracts/get-system-payment-contract-details-payment-history

## Authentication

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

## Request

### Path parameters

- `contract_id` (integer, required) — SchoolSet contract identifier whose payment history should be displayed.

## Response

### 200

Payment history was loaded for the contract.

- `status` (string, required)
- `message` (string, required)
- `data` (list of ApiV1SystemPaymentContractDetailsPaymentHistoryContractIdGetResponsesContentApplicationJsonSchemaDataItems, required)

## Errors

### 401 Unauthorized Error

Authentication is required to view contract payment history.

- `status` (string, required)
- `message` (string, required)
- `data` (any, optional, nullable)

### 403 Forbidden Error

The authenticated user lacks the view-contracts permission for this school.

- `status` (string, required)
- `message` (string, required)
- `data` (any, optional, nullable)

### 404 Not Found Error

No SchoolSet contract exists with the supplied contract identifier.

- `status` (string, required)
- `message` (string, required)
- `data` (any, optional, nullable)

### 500 Internal Server Error

The contract payment history could not be calculated because of a server error.

- `status` (string, required)
- `message` (string, required)
- `data` (any, optional, nullable)

## Types

### ApiV1SystemPaymentContractDetailsPaymentHistoryContractIdGetResponsesContentApplicationJsonSchemaDataItems

- `id` (integer, optional)
- `payer_id` (integer, optional, nullable)
- `payer_type` (string, optional, nullable)
- `can_edit_payer` (boolean, optional)
- `payer` (ApiV1SystemPaymentContractDetailsPaymentHistoryContractIdGetResponsesContentApplicationJsonSchemaDataItemsPayer, optional, nullable)
- `amount_payment` (double, optional)
- `base_amount_payment` (double, optional)
- `payment_date` (date, optional)
- `currency` (string, optional)
- `balance_after_collected_payment` (double, optional)
- `status` (ApiV1SystemPaymentContractDetailsPaymentHistoryContractIdGetResponsesContentApplicationJsonSchemaDataItemsStatus, optional)
- `method` (ApiV1SystemPaymentContractDetailsPaymentHistoryContractIdGetResponsesContentApplicationJsonSchemaDataItemsMethod, optional)
- `type` (ApiV1SystemPaymentContractDetailsPaymentHistoryContractIdGetResponsesContentApplicationJsonSchemaDataItemsType, optional)
- `allocations` (list of ApiV1SystemPaymentContractDetailsPaymentHistoryContractIdGetResponsesContentApplicationJsonSchemaDataItemsAllocationsItems, optional)

### ApiV1SystemPaymentContractDetailsPaymentHistoryContractIdGetResponsesContentApplicationJsonSchemaDataItemsPayer

- `id` (integer, optional)
- `name` (string, optional)
- `processing_fee_blocked` (boolean, optional)
- `is_processing_fee_blocked` (boolean, optional)

### ApiV1SystemPaymentContractDetailsPaymentHistoryContractIdGetResponsesContentApplicationJsonSchemaDataItemsStatus

- `id` (integer, optional)
- `title` (string, optional)
- `description` (string, optional, nullable)
- `group_name` (string, optional, nullable)

### ApiV1SystemPaymentContractDetailsPaymentHistoryContractIdGetResponsesContentApplicationJsonSchemaDataItemsMethod

- `id` (integer, optional)
- `title` (string, optional)
- `sysname` (string, optional)
- `description` (string, optional, nullable)

### ApiV1SystemPaymentContractDetailsPaymentHistoryContractIdGetResponsesContentApplicationJsonSchemaDataItemsType

- `id` (integer, optional)
- `title` (string, optional)
- `sysname` (string, optional)
- `group` (string, optional)
- `type` (string, optional)

### ApiV1SystemPaymentContractDetailsPaymentHistoryContractIdGetResponsesContentApplicationJsonSchemaDataItemsAllocationsItems

## Examples

**Response**

```json
{
  "status": "success",
  "message": "",
  "data": [
    {
      "id": 9012,
      "payer_id": 417,
      "payer_type": "family",
      "can_edit_payer": false,
      "payer": {
        "id": 417,
        "name": "Rivera Family",
        "processing_fee_blocked": false,
        "is_processing_fee_blocked": false
      },
      "amount_payment": 1250,
      "base_amount_payment": 1250,
      "payment_date": {},
      "currency": "USD",
      "balance_after_collected_payment": 3750,
      "status": {
        "id": 1,
        "title": "Completed",
        "description": "Payment completed",
        "group_name": "completed"
      },
      "method": {
        "id": 2,
        "title": "Credit card",
        "sysname": "credit_card",
        "description": "Card payment"
      },
      "type": {
        "id": 1,
        "title": "Tuition",
        "sysname": "tuition",
        "group": "school",
        "type": "one_time"
      },
      "allocations": [
        {}
      ]
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://ssuccessv2.com/app/api/v1/system/payment/contract/details/payment/history/1842"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://ssuccessv2.com/app/api/v1/system/payment/contract/details/payment/history/1842';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://ssuccessv2.com/app/api/v1/system/payment/contract/details/payment/history/1842"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	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/v1/system/payment/contract/details/payment/history/1842")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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.get("https://ssuccessv2.com/app/api/v1/system/payment/contract/details/payment/history/1842")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://ssuccessv2.com/app/api/v1/system/payment/contract/details/payment/history/1842', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://ssuccessv2.com/app/api/v1/system/payment/contract/details/payment/history/1842");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://ssuccessv2.com/app/api/v1/system/payment/contract/details/payment/history/1842")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```