> This page is for version API + Legacy Read.
> For other versions, use one of these documentation indexes:
> - API (default): https://docs.getthera.com/api/llms.txt
> - API + Legacy Read: https://docs.getthera.com/api-legacy-read/llms.txt
> - API + Legacy Full: https://docs.getthera.com/api-legacy-full/llms.txt

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

# Get Pay In Details

GET https://api.getthera.com/companies/{companyId}/pay-ins/{payInId}

One pay-in, with the invoices it settled, the amount charged, and any fees on top.

Reference: https://docs.getthera.com/thera-api/company/bank-api/get-pay-in-details

## Authentication

- `X-Thera-API-Key` header (required) — API Key authentication via header

## Servers

- `https://api.getthera.com` (Production, default)
- `https://api.staging.getthera.com` (Staging)

## Request

### Path parameters

- `companyId` (string, required)
- `payInId` (string, required)

## Response

### 200

- `time` (datetime, required)
- `status` (enum, required)
  - Allowed values: `PENDING`, `POSTED`
- `invoiceCount` (integer, required)
- `invoices` (list of HistoricalInvoice, required)
- `currency` (string, required)
- `total` (long, required)
- `invoicesTotal` (long, required) — The total amount charged excluding any fees.
- `subscriptionContractorCount` (integer, required)
- `subscriptionFeePerContractor` (long, required)
- `subscriptionTotal` (long, required)
- `fixedFee` (long, required)
- `variableFee` (long, required)
- `variableFeeFraction` (double, required)
- `exchangeRates` (map from string to double, required)
- `callingUserCanDelete` (boolean, required) — True if the calling user has permission to delete this payment.
- `paymentMethod` (PaymentMethod, optional)
- `paymentMethodId` (string, optional)

## Types

### HistoricalInvoice

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `INVOICE`, `MILESTONE`, `EXPENSE`, `BONUS`, `COMMISSION`, `OTHER`, `OVERTIME`
- `status` (enum, required)
  - Allowed values: `OPEN`, `PROCESSING`, `REQUIRES_ACTION`, `FAILED`, `PAYMENT_FAILED_BUT_TRANSFER_SUCCEEDED`, `PAYMENT_SUCCEEDED_BUT_TRANSFER_FAILED`, `TRANSFER_FAILED`, `TRANSFER_SUCCEEDED`, `SUCCEEDED`, `VOID`
- `wageType` (enum, required)
  - Allowed values: `HOURLY`, `DAILY`, `MONTHLY`, `SEMIMONTHLY`, `BIWEEKLY`, `WEEKLY`, `MILESTONE`
- `contractType` (enum, required)
  - Allowed values: `FIXED_RATE`, `FLEXIBLE_RATE`, `MILESTONE`, `TIME_TRACKING`
- `displayId` (string, required)
- `contractId` (string, required)
- `contractorFirstName` (string, required)
- `contractorLastName` (string, required)
- `contractJobTitle` (string, required)
- `payInCurrency` (string, required)
- `payInAmount` (long, required)
- `subscriptionFee` (long, required)
- `contractCurrency` (string, required)
- `contractAmount` (long, required)
- `autoPaid` (boolean, required)
- `startDate` (date, optional)
- `endDate` (date, optional)
- `date` (date, optional)
- `workUnitTotal` (double, optional)

### PaymentMethod

- `type`: `ach`
  - `accountNumber` (string, required)
- `type`: `offPlatform`
  - `reference` (string, required)

## Examples

**Response**

```json
{
  "time": "2024-01-15T09:30:00Z",
  "status": "PENDING",
  "invoiceCount": 1,
  "invoices": [
    {
      "id": "id",
      "type": "INVOICE",
      "status": "OPEN",
      "wageType": "HOURLY",
      "contractType": "FIXED_RATE",
      "displayId": "displayId",
      "contractId": "contractId",
      "contractorFirstName": "contractorFirstName",
      "contractorLastName": "contractorLastName",
      "contractJobTitle": "contractJobTitle",
      "payInCurrency": "payInCurrency",
      "payInAmount": 1000000,
      "subscriptionFee": 1000000,
      "contractCurrency": "contractCurrency",
      "contractAmount": 1000000,
      "autoPaid": true,
      "startDate": "2023-01-15",
      "endDate": "2023-01-15",
      "date": "2023-01-15",
      "workUnitTotal": 1.1
    },
    {
      "id": "id",
      "type": "INVOICE",
      "status": "OPEN",
      "wageType": "HOURLY",
      "contractType": "FIXED_RATE",
      "displayId": "displayId",
      "contractId": "contractId",
      "contractorFirstName": "contractorFirstName",
      "contractorLastName": "contractorLastName",
      "contractJobTitle": "contractJobTitle",
      "payInCurrency": "payInCurrency",
      "payInAmount": 1000000,
      "subscriptionFee": 1000000,
      "contractCurrency": "contractCurrency",
      "contractAmount": 1000000,
      "autoPaid": true,
      "startDate": "2023-01-15",
      "endDate": "2023-01-15",
      "date": "2023-01-15",
      "workUnitTotal": 1.1
    }
  ],
  "currency": "currency",
  "total": 1000000,
  "invoicesTotal": 1000000,
  "subscriptionContractorCount": 1,
  "subscriptionFeePerContractor": 1000000,
  "subscriptionTotal": 1000000,
  "fixedFee": 1000000,
  "variableFee": 1000000,
  "variableFeeFraction": 1.1,
  "exchangeRates": {
    "exchangeRates": 1.1
  },
  "callingUserCanDelete": true,
  "paymentMethod": {
    "type": "ach",
    "accountNumber": "accountNumber"
  },
  "paymentMethodId": "paymentMethodId"
}
```

**SDK Code**

```python
import requests

url = "https://api.getthera.com/companies/companyId/pay-ins/payInId"

headers = {"X-Thera-API-Key": "<apiKey>"}

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

print(response.json())
```

```javascript
const url = 'https://api.getthera.com/companies/companyId/pay-ins/payInId';
const options = {method: 'GET', headers: {'X-Thera-API-Key': '<apiKey>'}};

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://api.getthera.com/companies/companyId/pay-ins/payInId"

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

	req.Header.Add("X-Thera-API-Key", "<apiKey>")

	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.getthera.com/companies/companyId/pay-ins/payInId")

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

request = Net::HTTP::Get.new(url)
request["X-Thera-API-Key"] = '<apiKey>'

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://api.getthera.com/companies/companyId/pay-ins/payInId")
  .header("X-Thera-API-Key", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.getthera.com/companies/companyId/pay-ins/payInId', [
  'headers' => [
    'X-Thera-API-Key' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.getthera.com/companies/companyId/pay-ins/payInId");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Thera-API-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-Thera-API-Key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getthera.com/companies/companyId/pay-ins/payInId")! 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()
```