Create clearance
Decides whether the caller's org may pay another org, BEFORE the payment: what must happen first, what must be withheld and why, what must be reported, by whom and when, and how the payment may settle net of withholding.
POST /v1/principal/clearance
| Address | https://api.hanzo.ai/v1/principal/clearance |
| Method | POST |
| Operation | post_principal_clearance |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Decides whether the caller's org may pay another org, BEFORE the payment: what must happen first, what must be withheld and why, what must be reported, by whom and when, and how the payment may settle net of withholding. Any member of the paying org; the decision is recorded and on the audit trail in one transaction.
The rules, each cited on the answer: payer's and payee's founders identity-verified (Hanzo policy); payer and payee screened clear of the OFAC, UN, EU and UK lists and the embargoed jurisdictions — a confirmed match blocks, a possible one waits on a Hanzo platform reviewer, and lists that are not loaded and fresh clear nobody; the payee's status is what the form the payee granted the payer says, and until it grants one the payee furnishes it; a U.S. payee with no TIN on file owes its W-9, and paid without one 24% backup withholding applies (IRC §3406); a foreign payee on a valid W-8BEN or W-8BEN-E is withheld on at 30% on U.S.-source income (IRC §1441, §1442), reduced by a treaty rate the form claims; a service performed outside the United States is foreign-source and not withheld on; Form 1099 by the payer for a reportable U.S. payee at the year's threshold, Forms 1042-S and 1042 for U.S.-source income to a foreign person, and platform-operator reports (EU DAC7, UK, Canada, Australia) where the payer is the payee's platform. Every filer named is an org, never Hanzo.
Nothing of the payee is answered but what the payer must know to act: that the payment clears, what the payee must furnish, or that it cannot clear and the payer should contact support — never why, and never the payee's status before the payee grants its form. A payer asks about at most 50 new payees a day and 120 payments an hour.
Request
6 fields, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
amount | body | string | — | Amount is the gross amount in U.S. dollars, e.g. "1250.00". |
category | body | string | — | Category is what is bought: services, attorney, rents, royalties, other or merchandise. |
payee | body | string | — | Payee is the org id of the org to be paid. |
performed | body | string | — | Performed is where the service is performed — for rents, where the property is; for royalties, where it is used — as an ISO 3166-1 alpha-2 code. |
platform | body | boolean | — | Platform is whether the caller operates the platform through which the payee provides this to the platform's users, which decides platform-operator reporting. |
rail | body | string | — | Rail is how it will move: x402, ledger, chain, ach, wire, card, network or other — the rails an economic event names. |
Response
| Status | Body | Meaning |
|---|---|---|
201 | principal.Clearance | created |
default | problem-details | refused |
201 body — 58 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
allowed | body | boolean | — | |
amount | body | string | — | Amount is the gross amount, U.S. dollars. |
category | body | string | — | Category is what is bought: services, attorney, rents, royalties, other or merchandise. |
decidedAt | body | integer (int64) | — | DecidedAt is when, unix seconds. |
facts_required | body | principal.Fact[] | — | |
facts_required[].blocks | body | boolean | — | Blocks is whether the payment waits on it. |
facts_required[].code | body | string | — | Code is the fact's stable name. |
facts_required[].question | body | string | — | Question is what must be answered. |
facts_required[].rule | body | principal.Rule | — | |
facts_required[].rule.code | body | string | — | Code is the rule's stable name, for a caller that branches on it. |
facts_required[].rule.reason | body | string | — | Reason is the rule, stated. |
id | body | string | — | ID is the clearance, "clr_"-prefixed. |
notice | body | string | — | Notice is what a clearance is and is not. |
payee | body | string | — | Payee is the org to be paid. |
payer | body | string | — | Payer is the caller's org. |
performed | body | string | — | Performed is where the service is performed, as stated. |
platform | body | boolean | — | Platform is whether the caller operates the payee's platform, as stated. |
rail | body | string | — | Rail is how it moves. |
reporting_obligations | body | principal.Obligation[] | — | |
reporting_obligations[].authority | body | string | — | Authority is who it is filed with. |
reporting_obligations[].code | body | string | — | Code is the obligation's stable name. |
reporting_obligations[].due | body | string | — | Due is when. |
reporting_obligations[].filer | body | string | — | Filer is the org that files it. |
reporting_obligations[].form | body | string | — | Form is what is filed. |
reporting_obligations[].jurisdiction | body | string | — | Jurisdiction is where, ISO 3166-1 alpha-2 or "EU". |
reporting_obligations[].rule | body | principal.Rule | — | |
reporting_obligations[].rule.code | body | string | — | Code is the rule's stable name, for a caller that branches on it. |
reporting_obligations[].rule.reason | body | string | — | Reason is the rule, stated. |
reporting_obligations[].when | body | string | — | When is the condition it is owed on, when it is owed on one. |
required_before_payment | body | principal.Step[] | — | |
required_before_payment[].code | body | string | — | Code is the step's stable name, for a caller that branches on it. |
required_before_payment[].rule | body | principal.Rule | — | |
required_before_payment[].rule.code | body | string | — | Code is the rule's stable name, for a caller that branches on it. |
required_before_payment[].rule.reason | body | string | — | Reason is the rule, stated. |
required_before_payment[].what | body | string | — | What must happen, in words. |
required_before_payment[].where | body | string | — | Where it is done, when it is done on this platform. |
required_before_payment[].who | body | string | — | Who does it: payer, payee, or "Hanzo platform reviewer". |
rules | body | principal.Decided[] | — | |
rules[].field | body | string | — | |
rules[].rule | body | principal.Rule | — | |
rules[].rule.code | body | string | — | Code is the rule's stable name, for a caller that branches on it. |
rules[].rule.reason | body | string | — | Reason is the rule, stated. |
settlement_methods | body | principal.Method[] | — | |
settlement_methods[].net | body | string | — | Net is what the payee receives, U.S. dollars. |
settlement_methods[].rail | body | string | — | Rail is the rail: ledger or chain. |
settlement_methods[].rule | body | principal.Rule | — | |
settlement_methods[].rule.code | body | string | — | Code is the rule's stable name, for a caller that branches on it. |
settlement_methods[].rule.reason | body | string | — | Reason is the rule, stated. |
settlement_methods[].withheld | body | string | — | Withheld is what the payer keeps back and deposits itself, U.S. dollars. |
status | body | string | — | |
withholding | body | principal.Withholding | — | |
withholding.amount | body | string | — | Amount is the amount to withhold, U.S. dollars; empty when the rate is. |
withholding.chapter | body | string | — | Chapter is "3" (IRC chapter 3, a payment to a foreign person) or "backup" (IRC §3406), and empty when nothing is withheld or it cannot yet be decided. |
withholding.rate | body | string | — | Rate is the rate in percent: "30", "24", "10", "0". |
withholding.reason | body | string | — | Reason says why, in words. |
withholding.rule | body | principal.Rule | — | |
withholding.rule.code | body | string | — | Code is the rule's stable name, for a caller that branches on it. |
withholding.rule.reason | body | string | — | Reason is the rule, stated. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, PrincipalApi } from 'hanzoai';
const api = new PrincipalApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postPrincipalClearance({ amount: "<amount>", category: "<category>" });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import PrincipalApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = PrincipalApi(client).post_principal_clearance(amount="<amount>", category="<category>")cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.PrincipalAPI.PostPrincipalClearance(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, principal_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = principal_api::post_principal_clearance(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.PrincipalApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new PrincipalApi(client).postPrincipalClearance();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl -X POST https://api.hanzo.ai/v1/principal/clearance \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": "<amount>",
"category": "<category>"
}'MCP declares no tool for principal — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.
How is this guide?