Update bill payment
curl --request PATCH \
--url https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/bills/payments/{bill_payment_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"failure_reason": "<string>",
"payment_reference": "<string>",
"check_number": "<string>",
"description": "<string>",
"memo": "<string>",
"processing_fee_cents": 1,
"metadata": "<unknown>",
"allocations": [
{
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount_cents": 123,
"description": "<string>"
}
]
}
'import requests
url = "https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/bills/payments/{bill_payment_id}/"
payload = {
"failure_reason": "<string>",
"payment_reference": "<string>",
"check_number": "<string>",
"description": "<string>",
"memo": "<string>",
"processing_fee_cents": 1,
"metadata": "<unknown>",
"allocations": [
{
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount_cents": 123,
"description": "<string>"
}
]
}
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({
failure_reason: '<string>',
payment_reference: '<string>',
check_number: '<string>',
description: '<string>',
memo: '<string>',
processing_fee_cents: 1,
metadata: '<unknown>',
allocations: [
{
bill_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount_cents: 123,
description: '<string>'
}
]
})
};
fetch('https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/bills/payments/{bill_payment_id}/', 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}/bills/payments/{bill_payment_id}/",
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([
'failure_reason' => '<string>',
'payment_reference' => '<string>',
'check_number' => '<string>',
'description' => '<string>',
'memo' => '<string>',
'processing_fee_cents' => 1,
'metadata' => '<unknown>',
'allocations' => [
[
'bill_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount_cents' => 123,
'description' => '<string>'
]
]
]),
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}/bills/payments/{bill_payment_id}/"
payload := strings.NewReader("{\n \"failure_reason\": \"<string>\",\n \"payment_reference\": \"<string>\",\n \"check_number\": \"<string>\",\n \"description\": \"<string>\",\n \"memo\": \"<string>\",\n \"processing_fee_cents\": 1,\n \"metadata\": \"<unknown>\",\n \"allocations\": [\n {\n \"bill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount_cents\": 123,\n \"description\": \"<string>\"\n }\n ]\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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/bills/payments/{bill_payment_id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"failure_reason\": \"<string>\",\n \"payment_reference\": \"<string>\",\n \"check_number\": \"<string>\",\n \"description\": \"<string>\",\n \"memo\": \"<string>\",\n \"processing_fee_cents\": 1,\n \"metadata\": \"<unknown>\",\n \"allocations\": [\n {\n \"bill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount_cents\": 123,\n \"description\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/bills/payments/{bill_payment_id}/")
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 \"failure_reason\": \"<string>\",\n \"payment_reference\": \"<string>\",\n \"check_number\": \"<string>\",\n \"description\": \"<string>\",\n \"memo\": \"<string>\",\n \"processing_fee_cents\": 1,\n \"metadata\": \"<unknown>\",\n \"allocations\": [\n {\n \"bill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount_cents\": 123,\n \"description\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_name": "<string>",
"payment_reference": "<string>",
"external_id": "<string>",
"processor_payment_id": "<string>",
"check_number": "<string>",
"amount_cents": 123,
"currency": "<string>",
"processing_fee_cents": 123,
"net_amount_cents": 123,
"allocated_amount_cents": 123,
"unallocated_amount_cents": 123,
"is_fully_allocated": true,
"payment_method": "<string>",
"status": "<string>",
"payment_date": "2023-12-25",
"value_date": "2023-12-25",
"submitted_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"memo": "<string>",
"failure_reason": "<string>",
"metadata": "<unknown>",
"allocations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bill_number": "<string>",
"vendor_bill_number": "<string>",
"bill_status": "<string>",
"amount_cents": 123,
"allocation_date": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"vendor_refund_allocations": [
{
"vendor_refund_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount_cents": 123,
"allocated_at": "2023-11-07T05:31:56Z",
"reference_number": "<string>"
}
],
"reconciled_bank_transactions": [
{
"bank_transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bank_transaction_date": "2023-11-07T05:31:56Z",
"bank_transaction_amount_cents": 123,
"bank_transaction_direction": "<string>",
"reconciled_amount_cents": 123,
"reconciliation_link_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reconciled_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"payment_type": "<string>",
"bank_account_name": "<string>",
"notes": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}Bill Payments
Update bill payment
Update an existing bill payment’s status or details.
Updatable Fields:
status: Update payment status (with validation)failure_reason: Required when status is ‘failed’payment_reference: Update external referenceprocessing_fee_cents: Update processing fee
Status Transitions:
pending→processing,completed,failed,cancelledprocessing→completed,failedcompleted→ (no transitions allowed)failed→ (no transitions allowed)cancelled→ (no transitions allowed)
PATCH
/
v1
/
platform
/
businesses
/
{business_id}
/
bills
/
payments
/
{bill_payment_id}
/
Update bill payment
curl --request PATCH \
--url https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/bills/payments/{bill_payment_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"failure_reason": "<string>",
"payment_reference": "<string>",
"check_number": "<string>",
"description": "<string>",
"memo": "<string>",
"processing_fee_cents": 1,
"metadata": "<unknown>",
"allocations": [
{
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount_cents": 123,
"description": "<string>"
}
]
}
'import requests
url = "https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/bills/payments/{bill_payment_id}/"
payload = {
"failure_reason": "<string>",
"payment_reference": "<string>",
"check_number": "<string>",
"description": "<string>",
"memo": "<string>",
"processing_fee_cents": 1,
"metadata": "<unknown>",
"allocations": [
{
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount_cents": 123,
"description": "<string>"
}
]
}
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({
failure_reason: '<string>',
payment_reference: '<string>',
check_number: '<string>',
description: '<string>',
memo: '<string>',
processing_fee_cents: 1,
metadata: '<unknown>',
allocations: [
{
bill_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount_cents: 123,
description: '<string>'
}
]
})
};
fetch('https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/bills/payments/{bill_payment_id}/', 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}/bills/payments/{bill_payment_id}/",
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([
'failure_reason' => '<string>',
'payment_reference' => '<string>',
'check_number' => '<string>',
'description' => '<string>',
'memo' => '<string>',
'processing_fee_cents' => 1,
'metadata' => '<unknown>',
'allocations' => [
[
'bill_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount_cents' => 123,
'description' => '<string>'
]
]
]),
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}/bills/payments/{bill_payment_id}/"
payload := strings.NewReader("{\n \"failure_reason\": \"<string>\",\n \"payment_reference\": \"<string>\",\n \"check_number\": \"<string>\",\n \"description\": \"<string>\",\n \"memo\": \"<string>\",\n \"processing_fee_cents\": 1,\n \"metadata\": \"<unknown>\",\n \"allocations\": [\n {\n \"bill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount_cents\": 123,\n \"description\": \"<string>\"\n }\n ]\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://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/bills/payments/{bill_payment_id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"failure_reason\": \"<string>\",\n \"payment_reference\": \"<string>\",\n \"check_number\": \"<string>\",\n \"description\": \"<string>\",\n \"memo\": \"<string>\",\n \"processing_fee_cents\": 1,\n \"metadata\": \"<unknown>\",\n \"allocations\": [\n {\n \"bill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount_cents\": 123,\n \"description\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev-backend.thredfi.com/v1/platform/businesses/{business_id}/bills/payments/{bill_payment_id}/")
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 \"failure_reason\": \"<string>\",\n \"payment_reference\": \"<string>\",\n \"check_number\": \"<string>\",\n \"description\": \"<string>\",\n \"memo\": \"<string>\",\n \"processing_fee_cents\": 1,\n \"metadata\": \"<unknown>\",\n \"allocations\": [\n {\n \"bill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount_cents\": 123,\n \"description\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_name": "<string>",
"payment_reference": "<string>",
"external_id": "<string>",
"processor_payment_id": "<string>",
"check_number": "<string>",
"amount_cents": 123,
"currency": "<string>",
"processing_fee_cents": 123,
"net_amount_cents": 123,
"allocated_amount_cents": 123,
"unallocated_amount_cents": 123,
"is_fully_allocated": true,
"payment_method": "<string>",
"status": "<string>",
"payment_date": "2023-12-25",
"value_date": "2023-12-25",
"submitted_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"memo": "<string>",
"failure_reason": "<string>",
"metadata": "<unknown>",
"allocations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bill_number": "<string>",
"vendor_bill_number": "<string>",
"bill_status": "<string>",
"amount_cents": 123,
"allocation_date": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"vendor_refund_allocations": [
{
"vendor_refund_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount_cents": 123,
"allocated_at": "2023-11-07T05:31:56Z",
"reference_number": "<string>"
}
],
"reconciled_bank_transactions": [
{
"bank_transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bank_transaction_date": "2023-11-07T05:31:56Z",
"bank_transaction_amount_cents": 123,
"bank_transaction_direction": "<string>",
"reconciled_amount_cents": 123,
"reconciliation_link_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reconciled_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"payment_type": "<string>",
"bank_account_name": "<string>",
"notes": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}{
"error_code": "<string>",
"message": "<string>",
"detail": {},
"request_id": "<string>"
}Authorizations
BusinessScopedJWTPartnerJWTBasicAuthBearerUnscopedBearerBusinessScoped
Path Parameters
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Serializer for updating bill payment status and details.
Allows updating payment metadata, references, status transitions, and allocations.
Response
Detailed response serializer for bill payment with all related data.
Returns payment details along with vendor info and allocations. All amounts in cents.
Was this page helpful?