curl --request POST \
--url https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/payouts/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "stripe_po_2024_12_20",
"processor": "stripe",
"processor_payout_id": "po_1OeYZb2eZvKYlo2C6KqhQWxE",
"paid_out_amount_cents": 920000,
"fee_cents": 30000,
"additional_refunds_amount_cents": 0,
"currency": "GBP",
"status": "paid",
"completed_at": "2024-12-20T14:30:45Z",
"payment_ids": [
"3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d",
"4d81d4dd-9d14-5d2b-ad8b-9f6dad4c5g3e"
],
"refund_payment_ids": [
"5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f"
],
"reference_number": "PAYOUT-2024-W51",
"memo": "Weekly Stripe settlement",
"metadata": {
"batch_id": "w51",
"settlement_period": "2024-12-14_to_2024-12-20"
}
}
'import requests
url = "https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/payouts/"
payload = {
"external_id": "stripe_po_2024_12_20",
"processor": "stripe",
"processor_payout_id": "po_1OeYZb2eZvKYlo2C6KqhQWxE",
"paid_out_amount_cents": 920000,
"fee_cents": 30000,
"additional_refunds_amount_cents": 0,
"currency": "GBP",
"status": "paid",
"completed_at": "2024-12-20T14:30:45Z",
"payment_ids": ["3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d", "4d81d4dd-9d14-5d2b-ad8b-9f6dad4c5g3e"],
"refund_payment_ids": ["5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f"],
"reference_number": "PAYOUT-2024-W51",
"memo": "Weekly Stripe settlement",
"metadata": {
"batch_id": "w51",
"settlement_period": "2024-12-14_to_2024-12-20"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: 'stripe_po_2024_12_20',
processor: 'stripe',
processor_payout_id: 'po_1OeYZb2eZvKYlo2C6KqhQWxE',
paid_out_amount_cents: 920000,
fee_cents: 30000,
additional_refunds_amount_cents: 0,
currency: 'GBP',
status: 'paid',
completed_at: '2024-12-20T14:30:45Z',
payment_ids: ['3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d', '4d81d4dd-9d14-5d2b-ad8b-9f6dad4c5g3e'],
refund_payment_ids: ['5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f'],
reference_number: 'PAYOUT-2024-W51',
memo: 'Weekly Stripe settlement',
metadata: {batch_id: 'w51', settlement_period: '2024-12-14_to_2024-12-20'}
})
};
fetch('https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/payouts/', 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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/payouts/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_id' => 'stripe_po_2024_12_20',
'processor' => 'stripe',
'processor_payout_id' => 'po_1OeYZb2eZvKYlo2C6KqhQWxE',
'paid_out_amount_cents' => 920000,
'fee_cents' => 30000,
'additional_refunds_amount_cents' => 0,
'currency' => 'GBP',
'status' => 'paid',
'completed_at' => '2024-12-20T14:30:45Z',
'payment_ids' => [
'3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d',
'4d81d4dd-9d14-5d2b-ad8b-9f6dad4c5g3e'
],
'refund_payment_ids' => [
'5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f'
],
'reference_number' => 'PAYOUT-2024-W51',
'memo' => 'Weekly Stripe settlement',
'metadata' => [
'batch_id' => 'w51',
'settlement_period' => '2024-12-14_to_2024-12-20'
]
]),
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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/payouts/"
payload := strings.NewReader("{\n \"external_id\": \"stripe_po_2024_12_20\",\n \"processor\": \"stripe\",\n \"processor_payout_id\": \"po_1OeYZb2eZvKYlo2C6KqhQWxE\",\n \"paid_out_amount_cents\": 920000,\n \"fee_cents\": 30000,\n \"additional_refunds_amount_cents\": 0,\n \"currency\": \"GBP\",\n \"status\": \"paid\",\n \"completed_at\": \"2024-12-20T14:30:45Z\",\n \"payment_ids\": [\n \"3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d\",\n \"4d81d4dd-9d14-5d2b-ad8b-9f6dad4c5g3e\"\n ],\n \"refund_payment_ids\": [\n \"5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f\"\n ],\n \"reference_number\": \"PAYOUT-2024-W51\",\n \"memo\": \"Weekly Stripe settlement\",\n \"metadata\": {\n \"batch_id\": \"w51\",\n \"settlement_period\": \"2024-12-14_to_2024-12-20\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/payouts/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"stripe_po_2024_12_20\",\n \"processor\": \"stripe\",\n \"processor_payout_id\": \"po_1OeYZb2eZvKYlo2C6KqhQWxE\",\n \"paid_out_amount_cents\": 920000,\n \"fee_cents\": 30000,\n \"additional_refunds_amount_cents\": 0,\n \"currency\": \"GBP\",\n \"status\": \"paid\",\n \"completed_at\": \"2024-12-20T14:30:45Z\",\n \"payment_ids\": [\n \"3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d\",\n \"4d81d4dd-9d14-5d2b-ad8b-9f6dad4c5g3e\"\n ],\n \"refund_payment_ids\": [\n \"5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f\"\n ],\n \"reference_number\": \"PAYOUT-2024-W51\",\n \"memo\": \"Weekly Stripe settlement\",\n \"metadata\": {\n \"batch_id\": \"w51\",\n \"settlement_period\": \"2024-12-14_to_2024-12-20\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/payouts/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"stripe_po_2024_12_20\",\n \"processor\": \"stripe\",\n \"processor_payout_id\": \"po_1OeYZb2eZvKYlo2C6KqhQWxE\",\n \"paid_out_amount_cents\": 920000,\n \"fee_cents\": 30000,\n \"additional_refunds_amount_cents\": 0,\n \"currency\": \"GBP\",\n \"status\": \"paid\",\n \"completed_at\": \"2024-12-20T14:30:45Z\",\n \"payment_ids\": [\n \"3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d\",\n \"4d81d4dd-9d14-5d2b-ad8b-9f6dad4c5g3e\"\n ],\n \"refund_payment_ids\": [\n \"5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f\"\n ],\n \"reference_number\": \"PAYOUT-2024-W51\",\n \"memo\": \"Weekly Stripe settlement\",\n \"metadata\": {\n \"batch_id\": \"w51\",\n \"settlement_period\": \"2024-12-14_to_2024-12-20\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "be90c3cc-7d18-4e2d-8e6e-9f5d7e4a5c3b",
"business_id": "3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d",
"external_id": "stripe_po_2024_12_20",
"processor": "stripe",
"processor_payout_id": "po_1OeYZb2eZvKYlo2C6KqhQWxE",
"paid_out_amount_cents": 920000,
"fee_cents": 30000,
"additional_refunds_amount_cents": 0,
"net_amount_cents": 890000,
"currency": "GBP",
"status": "paid",
"completed_at": "2024-12-20T14:30:45Z",
"imported_at": "2024-12-20T15:00:12Z",
"reference_number": "PAYOUT-2024-W51",
"memo": "Weekly Stripe settlement",
"metadata": {
"batch_id": "w51"
},
"payment_count": 2,
"refund_payment_count": 1,
"gross_payments_amount_cents": 1000000,
"total_refunds_amount_cents": 50000,
"expected_net_amount_cents": 920000,
"amount_variance_cents": 0,
"payments": [
{
"id": "3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d",
"external_id": "stripe_pi_xyz123",
"payment_reference": "PAY-2024-0042",
"customer_name": "The Red Lion Pub Ltd",
"payment_date": "2024-12-15",
"total_amount_cents": 450000,
"currency": "GBP"
}
],
"refund_payments": [
{
"id": "5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f",
"external_id": "stripe_re_abc456",
"refund_id": "6f03f6ff-bf36-7f4d-cf0d-bh8fcf6e7i5g",
"customer_name": "The Red Lion Pub Ltd",
"refunded_amount_cents": 50000,
"completed_at": "2024-12-16T10:00:00Z"
}
],
"reconciliation_status": "unreconciled",
"settlement_file_id": null,
"created_at": "2024-12-20T15:00:12Z",
"updated_at": "2024-12-20T15:00:12Z"
}Create or update a payout
Create a new payout or update an existing one via external_id. Partners send completed processor settlements (Stripe, Adyen, etc.) with associated invoice payments and refund payments. Returns 201 for new payouts, 200 for updates. Updates are blocked if payout is already reconciled to a bank transaction.
curl --request POST \
--url https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/payouts/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "stripe_po_2024_12_20",
"processor": "stripe",
"processor_payout_id": "po_1OeYZb2eZvKYlo2C6KqhQWxE",
"paid_out_amount_cents": 920000,
"fee_cents": 30000,
"additional_refunds_amount_cents": 0,
"currency": "GBP",
"status": "paid",
"completed_at": "2024-12-20T14:30:45Z",
"payment_ids": [
"3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d",
"4d81d4dd-9d14-5d2b-ad8b-9f6dad4c5g3e"
],
"refund_payment_ids": [
"5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f"
],
"reference_number": "PAYOUT-2024-W51",
"memo": "Weekly Stripe settlement",
"metadata": {
"batch_id": "w51",
"settlement_period": "2024-12-14_to_2024-12-20"
}
}
'import requests
url = "https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/payouts/"
payload = {
"external_id": "stripe_po_2024_12_20",
"processor": "stripe",
"processor_payout_id": "po_1OeYZb2eZvKYlo2C6KqhQWxE",
"paid_out_amount_cents": 920000,
"fee_cents": 30000,
"additional_refunds_amount_cents": 0,
"currency": "GBP",
"status": "paid",
"completed_at": "2024-12-20T14:30:45Z",
"payment_ids": ["3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d", "4d81d4dd-9d14-5d2b-ad8b-9f6dad4c5g3e"],
"refund_payment_ids": ["5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f"],
"reference_number": "PAYOUT-2024-W51",
"memo": "Weekly Stripe settlement",
"metadata": {
"batch_id": "w51",
"settlement_period": "2024-12-14_to_2024-12-20"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: 'stripe_po_2024_12_20',
processor: 'stripe',
processor_payout_id: 'po_1OeYZb2eZvKYlo2C6KqhQWxE',
paid_out_amount_cents: 920000,
fee_cents: 30000,
additional_refunds_amount_cents: 0,
currency: 'GBP',
status: 'paid',
completed_at: '2024-12-20T14:30:45Z',
payment_ids: ['3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d', '4d81d4dd-9d14-5d2b-ad8b-9f6dad4c5g3e'],
refund_payment_ids: ['5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f'],
reference_number: 'PAYOUT-2024-W51',
memo: 'Weekly Stripe settlement',
metadata: {batch_id: 'w51', settlement_period: '2024-12-14_to_2024-12-20'}
})
};
fetch('https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/payouts/', 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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/payouts/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_id' => 'stripe_po_2024_12_20',
'processor' => 'stripe',
'processor_payout_id' => 'po_1OeYZb2eZvKYlo2C6KqhQWxE',
'paid_out_amount_cents' => 920000,
'fee_cents' => 30000,
'additional_refunds_amount_cents' => 0,
'currency' => 'GBP',
'status' => 'paid',
'completed_at' => '2024-12-20T14:30:45Z',
'payment_ids' => [
'3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d',
'4d81d4dd-9d14-5d2b-ad8b-9f6dad4c5g3e'
],
'refund_payment_ids' => [
'5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f'
],
'reference_number' => 'PAYOUT-2024-W51',
'memo' => 'Weekly Stripe settlement',
'metadata' => [
'batch_id' => 'w51',
'settlement_period' => '2024-12-14_to_2024-12-20'
]
]),
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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/payouts/"
payload := strings.NewReader("{\n \"external_id\": \"stripe_po_2024_12_20\",\n \"processor\": \"stripe\",\n \"processor_payout_id\": \"po_1OeYZb2eZvKYlo2C6KqhQWxE\",\n \"paid_out_amount_cents\": 920000,\n \"fee_cents\": 30000,\n \"additional_refunds_amount_cents\": 0,\n \"currency\": \"GBP\",\n \"status\": \"paid\",\n \"completed_at\": \"2024-12-20T14:30:45Z\",\n \"payment_ids\": [\n \"3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d\",\n \"4d81d4dd-9d14-5d2b-ad8b-9f6dad4c5g3e\"\n ],\n \"refund_payment_ids\": [\n \"5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f\"\n ],\n \"reference_number\": \"PAYOUT-2024-W51\",\n \"memo\": \"Weekly Stripe settlement\",\n \"metadata\": {\n \"batch_id\": \"w51\",\n \"settlement_period\": \"2024-12-14_to_2024-12-20\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/payouts/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"stripe_po_2024_12_20\",\n \"processor\": \"stripe\",\n \"processor_payout_id\": \"po_1OeYZb2eZvKYlo2C6KqhQWxE\",\n \"paid_out_amount_cents\": 920000,\n \"fee_cents\": 30000,\n \"additional_refunds_amount_cents\": 0,\n \"currency\": \"GBP\",\n \"status\": \"paid\",\n \"completed_at\": \"2024-12-20T14:30:45Z\",\n \"payment_ids\": [\n \"3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d\",\n \"4d81d4dd-9d14-5d2b-ad8b-9f6dad4c5g3e\"\n ],\n \"refund_payment_ids\": [\n \"5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f\"\n ],\n \"reference_number\": \"PAYOUT-2024-W51\",\n \"memo\": \"Weekly Stripe settlement\",\n \"metadata\": {\n \"batch_id\": \"w51\",\n \"settlement_period\": \"2024-12-14_to_2024-12-20\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/payouts/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"stripe_po_2024_12_20\",\n \"processor\": \"stripe\",\n \"processor_payout_id\": \"po_1OeYZb2eZvKYlo2C6KqhQWxE\",\n \"paid_out_amount_cents\": 920000,\n \"fee_cents\": 30000,\n \"additional_refunds_amount_cents\": 0,\n \"currency\": \"GBP\",\n \"status\": \"paid\",\n \"completed_at\": \"2024-12-20T14:30:45Z\",\n \"payment_ids\": [\n \"3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d\",\n \"4d81d4dd-9d14-5d2b-ad8b-9f6dad4c5g3e\"\n ],\n \"refund_payment_ids\": [\n \"5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f\"\n ],\n \"reference_number\": \"PAYOUT-2024-W51\",\n \"memo\": \"Weekly Stripe settlement\",\n \"metadata\": {\n \"batch_id\": \"w51\",\n \"settlement_period\": \"2024-12-14_to_2024-12-20\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "be90c3cc-7d18-4e2d-8e6e-9f5d7e4a5c3b",
"business_id": "3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d",
"external_id": "stripe_po_2024_12_20",
"processor": "stripe",
"processor_payout_id": "po_1OeYZb2eZvKYlo2C6KqhQWxE",
"paid_out_amount_cents": 920000,
"fee_cents": 30000,
"additional_refunds_amount_cents": 0,
"net_amount_cents": 890000,
"currency": "GBP",
"status": "paid",
"completed_at": "2024-12-20T14:30:45Z",
"imported_at": "2024-12-20T15:00:12Z",
"reference_number": "PAYOUT-2024-W51",
"memo": "Weekly Stripe settlement",
"metadata": {
"batch_id": "w51"
},
"payment_count": 2,
"refund_payment_count": 1,
"gross_payments_amount_cents": 1000000,
"total_refunds_amount_cents": 50000,
"expected_net_amount_cents": 920000,
"amount_variance_cents": 0,
"payments": [
{
"id": "3c90c3cc-8c03-4c1a-9c7a-8e5c9a3b4f2d",
"external_id": "stripe_pi_xyz123",
"payment_reference": "PAY-2024-0042",
"customer_name": "The Red Lion Pub Ltd",
"payment_date": "2024-12-15",
"total_amount_cents": 450000,
"currency": "GBP"
}
],
"refund_payments": [
{
"id": "5e92e5ee-ae25-6e3c-be9c-ag7ebe5d6h4f",
"external_id": "stripe_re_abc456",
"refund_id": "6f03f6ff-bf36-7f4d-cf0d-bh8fcf6e7i5g",
"customer_name": "The Red Lion Pub Ltd",
"refunded_amount_cents": 50000,
"completed_at": "2024-12-16T10:00:00Z"
}
],
"reconciliation_status": "unreconciled",
"settlement_file_id": null,
"created_at": "2024-12-20T15:00:12Z",
"updated_at": "2024-12-20T15:00:12Z"
}Authorizations
Partner-level JWT token (unscoped). Token payload includes partner_id. Business access is validated via partner ownership. Format: Bearer <your-jwt-token>
Use this for: Multi-business operations where the business_id is specified in the URL and partner has access to multiple businesses.
Body
Serializer for creating or updating payouts All amounts in cents (integers)
Response
Full payout serializer for detail views and create responses Includes all computed fields and expanded payment/refund arrays
Was this page helpful?