Mark paid (legacy) payout batches
curl --request PATCH \
--url https://www.referly.so/api/v1/payout-batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"action": "mark_paid",
"paymentReference": "<string>",
"paidAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://www.referly.so/api/v1/payout-batches"
payload = {
"id": "<string>",
"action": "mark_paid",
"paymentReference": "<string>",
"paidAt": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
action: 'mark_paid',
paymentReference: '<string>',
paidAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://www.referly.so/api/v1/payout-batches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.referly.so/api/v1/payout-batches",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'action' => 'mark_paid',
'paymentReference' => '<string>',
'paidAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.referly.so/api/v1/payout-batches"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"action\": \"mark_paid\",\n \"paymentReference\": \"<string>\",\n \"paidAt\": \"2023-11-07T05:31:56Z\"\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(string(body))
}HttpResponse<String> response = Unirest.patch("https://www.referly.so/api/v1/payout-batches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"action\": \"mark_paid\",\n \"paymentReference\": \"<string>\",\n \"paidAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.referly.so/api/v1/payout-batches")
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 \"id\": \"<string>\",\n \"action\": \"mark_paid\",\n \"paymentReference\": \"<string>\",\n \"paidAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"batch": {
"id": "batch_2f88a163",
"createdAt": "2026-09-30T02:00:00.000Z",
"updatedAt": "2026-09-30T02:00:00.000Z",
"status": "PAID",
"periodStart": "2026-09-01T00:00:00.000Z",
"periodEnd": "2026-09-30T23:59:59.000Z",
"affiliateProgramId": "prog_acme_partners",
"paidMethod": "INTEGRATION",
"payoutMethod": "WISE",
"rewardType": "CASH",
"externalBatchId": "bank-reference-2026-09-30",
"failedReason": null,
"manuallyPaidAt": "2026-09-30T10:00:00.000Z",
"isReferlyPayouts": false,
"payouts": [
{
"id": "pay_7c1e4b90",
"affiliateId": "aff_9f2c1e42",
"affiliateProgramId": "prog_acme_partners",
"amount": 342.75,
"currency": "USD",
"status": "PAID",
"paymentMethod": "WISE",
"rewardType": "CASH",
"nonCashRewardType": null,
"periodStart": "2026-09-01T00:00:00.000Z",
"periodEnd": "2026-09-30T23:59:59.000Z",
"createdAt": "2026-09-30T02:00:00.000Z",
"payoutBatchId": "batch_2f88a163",
"failedReason": null,
"externalId": null,
"manuallyPaid": true,
"paidAt": "2026-09-30T10:00:00.000Z",
"vatRate": 0,
"vatAmount": 0,
"amountLockedAt": null,
"referlyChargeId": null,
"commissions": [
{
"id": 4821,
"commissionEarned": 42.5
},
{
"id": 4903,
"commissionEarned": -12.5
}
]
}
]
}
}{
"error": {
"code": "invalid_json",
"message": "Invalid JSON body",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid, expired or revoked API key",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": {
"code": "insufficient_scope",
"message": "Requires payout-batches:write",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": {
"code": "batch_locked",
"message": "Batch is not eligible for manual settlement",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": {
"code": "body_too_large",
"message": "Request body must be at most 64 KiB",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": {
"code": "validation_error",
"message": "Invalid request parameters",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": "Too many requests. Please slow down.",
"retryAfter": 42
}{
"error": {
"code": "internal_error",
"message": "Request failed",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": {
"code": "webhook_provider_error",
"message": "The webhook provider request failed",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}Payout Batch Endpoints
Mark paid (legacy) payout batches
Requires payout-batches:write. See Payout batches behavior and common API rules.
PATCH
/
payout-batches
Mark paid (legacy) payout batches
curl --request PATCH \
--url https://www.referly.so/api/v1/payout-batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"action": "mark_paid",
"paymentReference": "<string>",
"paidAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://www.referly.so/api/v1/payout-batches"
payload = {
"id": "<string>",
"action": "mark_paid",
"paymentReference": "<string>",
"paidAt": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
action: 'mark_paid',
paymentReference: '<string>',
paidAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://www.referly.so/api/v1/payout-batches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.referly.so/api/v1/payout-batches",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'action' => 'mark_paid',
'paymentReference' => '<string>',
'paidAt' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.referly.so/api/v1/payout-batches"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"action\": \"mark_paid\",\n \"paymentReference\": \"<string>\",\n \"paidAt\": \"2023-11-07T05:31:56Z\"\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(string(body))
}HttpResponse<String> response = Unirest.patch("https://www.referly.so/api/v1/payout-batches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"action\": \"mark_paid\",\n \"paymentReference\": \"<string>\",\n \"paidAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.referly.so/api/v1/payout-batches")
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 \"id\": \"<string>\",\n \"action\": \"mark_paid\",\n \"paymentReference\": \"<string>\",\n \"paidAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"batch": {
"id": "batch_2f88a163",
"createdAt": "2026-09-30T02:00:00.000Z",
"updatedAt": "2026-09-30T02:00:00.000Z",
"status": "PAID",
"periodStart": "2026-09-01T00:00:00.000Z",
"periodEnd": "2026-09-30T23:59:59.000Z",
"affiliateProgramId": "prog_acme_partners",
"paidMethod": "INTEGRATION",
"payoutMethod": "WISE",
"rewardType": "CASH",
"externalBatchId": "bank-reference-2026-09-30",
"failedReason": null,
"manuallyPaidAt": "2026-09-30T10:00:00.000Z",
"isReferlyPayouts": false,
"payouts": [
{
"id": "pay_7c1e4b90",
"affiliateId": "aff_9f2c1e42",
"affiliateProgramId": "prog_acme_partners",
"amount": 342.75,
"currency": "USD",
"status": "PAID",
"paymentMethod": "WISE",
"rewardType": "CASH",
"nonCashRewardType": null,
"periodStart": "2026-09-01T00:00:00.000Z",
"periodEnd": "2026-09-30T23:59:59.000Z",
"createdAt": "2026-09-30T02:00:00.000Z",
"payoutBatchId": "batch_2f88a163",
"failedReason": null,
"externalId": null,
"manuallyPaid": true,
"paidAt": "2026-09-30T10:00:00.000Z",
"vatRate": 0,
"vatAmount": 0,
"amountLockedAt": null,
"referlyChargeId": null,
"commissions": [
{
"id": 4821,
"commissionEarned": 42.5
},
{
"id": 4903,
"commissionEarned": -12.5
}
]
}
]
}
}{
"error": {
"code": "invalid_json",
"message": "Invalid JSON body",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid, expired or revoked API key",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": {
"code": "insufficient_scope",
"message": "Requires payout-batches:write",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": {
"code": "batch_locked",
"message": "Batch is not eligible for manual settlement",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": {
"code": "body_too_large",
"message": "Request body must be at most 64 KiB",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": {
"code": "validation_error",
"message": "Invalid request parameters",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": "Too many requests. Please slow down.",
"retryAfter": 42
}{
"error": {
"code": "internal_error",
"message": "Request failed",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}{
"error": {
"code": "webhook_provider_error",
"message": "The webhook provider request failed",
"requestId": "5c1f7a2e-2b39-4c2d-9c31-7a6e0f6a9b21"
}
}Requires
payout-batches:write. See the payout batches guide for behavior and examples.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional retry key, unique within the selected program. Reuse the same key, method, path and validated payload; a conflicting reuse returns 409.
Required string length:
8 - 200Pattern:
^[\x21-\x7e]+$Select the key's original program or a program provisioned by this exact key. Other owned programs remain inaccessible.
Body
application/json
Response
Success. Monetary amounts use program currency; see companion documentation for resource fields.
Last modified on October 23, 2026
⌘I