cURL
curl -X POST https://api.metrifox.com/api/v1/invoices/5e5d2f9a-4f4e-4f1d-8c9c-2f1c4e3b9a01/record-manual-payment \
-H "x-api-key: $METRIFOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"payment_method_type": "cash",
"amount_in_standard_unit": 100.0,
"payment_date": "2026-05-29"
}'import requests
url = "https://{defaultHost}/api/v1/invoices/{invoice_id}/record-manual-payment"
payload = {
"payment_method_type": "cash",
"amount_in_standard_unit": 100,
"payment_date": "2026-05-29"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payment_method_type: 'cash',
amount_in_standard_unit: 100,
payment_date: '2026-05-29'
})
};
fetch('https://{defaultHost}/api/v1/invoices/{invoice_id}/record-manual-payment', 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://{defaultHost}/api/v1/invoices/{invoice_id}/record-manual-payment",
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([
'payment_method_type' => 'cash',
'amount_in_standard_unit' => 100,
'payment_date' => '2026-05-29'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://{defaultHost}/api/v1/invoices/{invoice_id}/record-manual-payment"
payload := strings.NewReader("{\n \"payment_method_type\": \"cash\",\n \"amount_in_standard_unit\": 100,\n \"payment_date\": \"2026-05-29\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://{defaultHost}/api/v1/invoices/{invoice_id}/record-manual-payment")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"payment_method_type\": \"cash\",\n \"amount_in_standard_unit\": 100,\n \"payment_date\": \"2026-05-29\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/api/v1/invoices/{invoice_id}/record-manual-payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment_method_type\": \"cash\",\n \"amount_in_standard_unit\": 100,\n \"payment_date\": \"2026-05-29\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Manual payment recorded successfully",
"meta": {},
"data": {
"id": "8d3f1b21-3a91-4e64-8e2a-1d4d7f2b9a01",
"payment_method_type": "cash",
"amount_in_standard_unit": 100,
"amount_in_base_unit": 10000,
"currency": "USD",
"created_at": "2026-05-29T18:42:11Z",
"updated_at": "2026-05-29T18:42:11Z"
},
"errors": {}
}Invoices
Record a manual payment
Record a payment that was collected outside of Metrifox (cash, bank transfer, or check) against an invoice.
POST
/
api
/
v1
/
invoices
/
{invoice_id}
/
record-manual-payment
cURL
curl -X POST https://api.metrifox.com/api/v1/invoices/5e5d2f9a-4f4e-4f1d-8c9c-2f1c4e3b9a01/record-manual-payment \
-H "x-api-key: $METRIFOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"payment_method_type": "cash",
"amount_in_standard_unit": 100.0,
"payment_date": "2026-05-29"
}'import requests
url = "https://{defaultHost}/api/v1/invoices/{invoice_id}/record-manual-payment"
payload = {
"payment_method_type": "cash",
"amount_in_standard_unit": 100,
"payment_date": "2026-05-29"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payment_method_type: 'cash',
amount_in_standard_unit: 100,
payment_date: '2026-05-29'
})
};
fetch('https://{defaultHost}/api/v1/invoices/{invoice_id}/record-manual-payment', 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://{defaultHost}/api/v1/invoices/{invoice_id}/record-manual-payment",
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([
'payment_method_type' => 'cash',
'amount_in_standard_unit' => 100,
'payment_date' => '2026-05-29'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://{defaultHost}/api/v1/invoices/{invoice_id}/record-manual-payment"
payload := strings.NewReader("{\n \"payment_method_type\": \"cash\",\n \"amount_in_standard_unit\": 100,\n \"payment_date\": \"2026-05-29\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://{defaultHost}/api/v1/invoices/{invoice_id}/record-manual-payment")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"payment_method_type\": \"cash\",\n \"amount_in_standard_unit\": 100,\n \"payment_date\": \"2026-05-29\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/api/v1/invoices/{invoice_id}/record-manual-payment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment_method_type\": \"cash\",\n \"amount_in_standard_unit\": 100,\n \"payment_date\": \"2026-05-29\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Manual payment recorded successfully",
"meta": {},
"data": {
"id": "8d3f1b21-3a91-4e64-8e2a-1d4d7f2b9a01",
"payment_method_type": "cash",
"amount_in_standard_unit": 100,
"amount_in_base_unit": 10000,
"currency": "USD",
"created_at": "2026-05-29T18:42:11Z",
"updated_at": "2026-05-29T18:42:11Z"
},
"errors": {}
}The currency of the payment is taken from the invoice β you donβt pass it. The invoice must be in
open or overdue status, and amount_in_standard_unit must not exceed the invoiceβs current outstanding amount. Partial payments are supported: call this endpoint multiple times until the invoice is fully paid.Authorizations
Path Parameters
ID of the invoice the payment should be applied to.
Body
application/json
How the payment was collected outside of Metrifox. Must be one of:
cashbank_transfercheck
Available options:
cash, bank_transfer, check The amount paid, expressed in standard units of the invoice's currency
(e.g. 100.00 means 100.00 USD on a USD invoice). Must be greater than 0
and must not exceed the invoice's current outstanding amount.
Required range:
x >= 0.01The date the payment was actually received (YYYY-MM-DD). Used as the effective date of the payment for accounting purposes.

