Create Platform Transaction
curl --request POST \
--url https://api.numeralhq.com/tax/platform/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Version: <x-api-version>' \
--data '
{
"platform_calculation_id": "plat_calc_abc123",
"reference_order_id": "order_12345",
"reference_payment_id": "pay_67890",
"transaction_processed_at": 1736300000
}
'import requests
url = "https://api.numeralhq.com/tax/platform/transactions"
payload = {
"platform_calculation_id": "plat_calc_abc123",
"reference_order_id": "order_12345",
"reference_payment_id": "pay_67890",
"transaction_processed_at": 1736300000
}
headers = {
"X-API-Version": "<x-api-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-Version': '<x-api-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
platform_calculation_id: 'plat_calc_abc123',
reference_order_id: 'order_12345',
reference_payment_id: 'pay_67890',
transaction_processed_at: 1736300000
})
};
fetch('https://api.numeralhq.com/tax/platform/transactions', 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://api.numeralhq.com/tax/platform/transactions",
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([
'platform_calculation_id' => 'plat_calc_abc123',
'reference_order_id' => 'order_12345',
'reference_payment_id' => 'pay_67890',
'transaction_processed_at' => 1736300000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-API-Version: <x-api-version>"
],
]);
$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://api.numeralhq.com/tax/platform/transactions"
payload := strings.NewReader("{\n \"platform_calculation_id\": \"plat_calc_abc123\",\n \"reference_order_id\": \"order_12345\",\n \"reference_payment_id\": \"pay_67890\",\n \"transaction_processed_at\": 1736300000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Version", "<x-api-version>")
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://api.numeralhq.com/tax/platform/transactions")
.header("X-API-Version", "<x-api-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platform_calculation_id\": \"plat_calc_abc123\",\n \"reference_order_id\": \"order_12345\",\n \"reference_payment_id\": \"pay_67890\",\n \"transaction_processed_at\": 1736300000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numeralhq.com/tax/platform/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Version"] = '<x-api-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"platform_calculation_id\": \"plat_calc_abc123\",\n \"reference_order_id\": \"order_12345\",\n \"reference_payment_id\": \"pay_67890\",\n \"transaction_processed_at\": 1736300000\n}"
response = http.request(request)
puts response.read_body{
"object": "list",
"transactions": [
{
"id": "tr_abc123",
"object": "tax.transaction",
"calculation_id": "plat_calc_abc123",
"reference_order_id": "order_12345",
"type": "order",
"client_role": [
"payment_processor"
],
"merchant": {
"id": "merch_abc123",
"reference_merchant_id": "my-seller-123"
},
"testmode": false
},
{
"id": "tr_def456",
"object": "tax.transaction",
"calculation_id": "plat_calc_abc123",
"reference_order_id": "order_12345",
"type": "fee",
"client_role": [],
"merchant": {
"id": "merch_abc123",
"reference_merchant_id": "my-seller-123"
},
"testmode": false
}
]
}Platform
Create Platform Transactions
Record completed sales from a platform calculation. For payment processors, this creates two transactions: one for the order and one for the fee. For marketplace providers or merchants of record, only the order transaction is created.
POST
/
tax
/
platform
/
transactions
Create Platform Transaction
curl --request POST \
--url https://api.numeralhq.com/tax/platform/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Version: <x-api-version>' \
--data '
{
"platform_calculation_id": "plat_calc_abc123",
"reference_order_id": "order_12345",
"reference_payment_id": "pay_67890",
"transaction_processed_at": 1736300000
}
'import requests
url = "https://api.numeralhq.com/tax/platform/transactions"
payload = {
"platform_calculation_id": "plat_calc_abc123",
"reference_order_id": "order_12345",
"reference_payment_id": "pay_67890",
"transaction_processed_at": 1736300000
}
headers = {
"X-API-Version": "<x-api-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-Version': '<x-api-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
platform_calculation_id: 'plat_calc_abc123',
reference_order_id: 'order_12345',
reference_payment_id: 'pay_67890',
transaction_processed_at: 1736300000
})
};
fetch('https://api.numeralhq.com/tax/platform/transactions', 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://api.numeralhq.com/tax/platform/transactions",
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([
'platform_calculation_id' => 'plat_calc_abc123',
'reference_order_id' => 'order_12345',
'reference_payment_id' => 'pay_67890',
'transaction_processed_at' => 1736300000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-API-Version: <x-api-version>"
],
]);
$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://api.numeralhq.com/tax/platform/transactions"
payload := strings.NewReader("{\n \"platform_calculation_id\": \"plat_calc_abc123\",\n \"reference_order_id\": \"order_12345\",\n \"reference_payment_id\": \"pay_67890\",\n \"transaction_processed_at\": 1736300000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Version", "<x-api-version>")
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://api.numeralhq.com/tax/platform/transactions")
.header("X-API-Version", "<x-api-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"platform_calculation_id\": \"plat_calc_abc123\",\n \"reference_order_id\": \"order_12345\",\n \"reference_payment_id\": \"pay_67890\",\n \"transaction_processed_at\": 1736300000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.numeralhq.com/tax/platform/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Version"] = '<x-api-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"platform_calculation_id\": \"plat_calc_abc123\",\n \"reference_order_id\": \"order_12345\",\n \"reference_payment_id\": \"pay_67890\",\n \"transaction_processed_at\": 1736300000\n}"
response = http.request(request)
puts response.read_body{
"object": "list",
"transactions": [
{
"id": "tr_abc123",
"object": "tax.transaction",
"calculation_id": "plat_calc_abc123",
"reference_order_id": "order_12345",
"type": "order",
"client_role": [
"payment_processor"
],
"merchant": {
"id": "merch_abc123",
"reference_merchant_id": "my-seller-123"
},
"testmode": false
},
{
"id": "tr_def456",
"object": "tax.transaction",
"calculation_id": "plat_calc_abc123",
"reference_order_id": "order_12345",
"type": "fee",
"client_role": [],
"merchant": {
"id": "merch_abc123",
"reference_merchant_id": "my-seller-123"
},
"testmode": false
}
]
}Platform Transactions Endpoint (2026-03-01)
Convert a platform calculation into recorded transactions for tax reporting and filing purposes.Remember to include the
X-API-Version: 2026-03-01 header in your request to use this API version.How Platform Transactions Work
When you create a platform transaction from a platform calculation, the number of transactions created depends on your platform role:| Platform Role | Order Transaction | Fee Transaction |
|---|---|---|
payment_processor | Created with client_role: ["payment_processor"] | Created separately with client_role: [] |
marketplace_provider | Created with client_role: ["marketplace_provider"] | No separate fee transaction |
merchant_of_record | Created with client_role: ["merchant_of_record"] | No separate fee transaction |
Payment Processor Behavior
Payment processors (like Stripe) receive two separate transactions:- Order Transaction - Records the merchant’s sale with taxes calculated on the order items
- Fee Transaction - Records the platform fee with applicable taxes
Marketplace Provider / Merchant of Record Behavior
Marketplace providers and merchants of record receive a single transaction that includes all order items. Fee taxes (if calculated) are included in the same transaction.Transaction Types
Thetype field in each transaction indicates what it represents:
order- A transaction for the actual sale/orderfee- A transaction specifically for platform fees (payment processors only)
Example Workflow
# Step 1: Create a platform calculation
curl -X POST https://api.numeralhq.com/tax/platform/calculations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-API-Version: 2026-03-01" \
-d '{
"merchant_id": "merch_abc123",
"line_items": [...],
"fee_details": {...}
}'
# Step 2: Convert to transactions when payment is complete
curl -X POST https://api.numeralhq.com/tax/platform/transactions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-API-Version: 2026-03-01" \
-d '{
"platform_calculation_id": "plat_calc_abc123",
"reference_order_id": "order_12345",
"reference_payment_id": "pay_67890",
"transaction_processed_at": 1736300000
}'
Response Structure
The response is always a list containing one or more transactions:{
"object": "list",
"transactions": [
{
"id": "tr_abc123",
"object": "tax.transaction",
"type": "order",
"client_role": ["payment_processor"],
"merchant": {
"id": "merch_abc123",
"reference_merchant_id": "my-seller-123"
}
// ... additional fields
},
{
"id": "tr_def456",
"object": "tax.transaction",
"type": "fee",
"client_role": [],
"merchant": {
"id": "merch_abc123",
"reference_merchant_id": "my-seller-123"
}
// ... additional fields (payment_processor only)
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Available options:
2026-01-01 Body
application/json
Request body for creating transactions from a platform calculation
The ID of the platform calculation to convert to transactions
Your unique identifier for this order
Your unique identifier for the payment (optional)
Unix timestamp when the transaction was processed