Guides
Route a payment
From an Omni Account to a beneficiary on another network or to a PATH address — quote, execute once, follow the route to settled, then read and verify its SETTL, execution and receipts.
Needs: a test key with accounts, router and settlement; proof to read verdicts.
A payment is an intent: an amount, where it is drawn from, where it goes and what is delivered. The router turns an intent into a firm, signed quote. Executing the quote creates a route, which Path Global settles and closes with a signed receipt.
import { PathGlobal } from '@pathglobal/sdk';
const pg = new PathGlobal({ apiKey: process.env.PATHGLOBAL_API_KEY! });1. Open an Omni Account and a holding
An Omni Account holds value for one holder. Its holdings are a wallet, a virtual account in a currency, or an external wallet. Open the account with its holdings in one call:
const account = await pg.accounts.openOmni(
{
holder: { name: 'Acme Treasury' },
reference: 'acme-main',
holdings: [{ kind: 'virtual_account', currency: 'USD', reference: 'acme-usd' }],
},
{ idempotencyKey: 'open-acme-main' },
);
const usd = account.holdings[0]!;reference is your own id: unique per client, and GET /accounts?reference= finds the account
by it. A reference already used answers 409 pathglobal.core.reference_taken. A holding opens on
its own with pg.accounts.openHolding({ kind, account, currency }).
2. Fund the holding (test mode)
A route from an Omni Account draws on its holding, and the sandbox enforces balances.
await pg.accounts.fund(usd.id, { value: '10000.00', asset: 'USD' }, 'test funding 1');
const view = await pg.accounts.holding(usd.id);
console.log(view.balances); // [{ value: "10000.00", asset: "USD" }]pg.accounts.entries(usd.id) is the statement of the holding: one line per movement, with its
kind (deposit, route_debit, route_credit, route_refund, adjustment) and reference.
3. Quote the intent
const quote = await pg.router.quote({
amount: { value: '250.00', asset: 'USD' },
source: { omni_account: account.id },
destination: { network: 'sepa-inst', identifier: 'DE89370400440532013000', holder: 'Example Treasury Ltd' },
deliver: { asset: 'EUR' },
constraints: { max_delay_seconds: 600, prefer: 'cost' },
purpose: 'supplier payment',
reference: 'invoice-1042',
payee: { name: 'Example Treasury Ltd' },
});| Field | Notes |
|---|---|
amount | Decimal string in major units, and its asset |
source | { omni_account }, { path: "path:…" }, { network, identifier, holder? }, or { connection, delegation? } for a connection of Path Global (pathglobal.connection) |
destination | { omni_account }, { path: "path:…" }, { alias } or { network, identifier, holder? }. A PATH address or an alias is paid as a PATH member |
deliver | { asset, network? }: what the beneficiary receives |
router | path-flash-1.0 (the default): the router of Path Global, powered by the decision model path-flash-1.0, chooses the route. Any other value is a router of the catalogue |
constraints | max_delay_seconds, max_fee, max_hops (1 to 8), prefer (cost or speed) |
purpose | Up to 64 characters |
reference | Up to 140 characters. It finds the SETTL later, and in test mode it carries the outcome keywords |
payer, payee | { name?, path_id? } and { name? }. The payee's name is the one sent here; a PATH address is not a name |
POST /router/quotes answers 201 with the quote. It reserves nothing and is read only by the
client it was made for.
4. Read the quote
| Field | Notes |
|---|---|
id | Executes the quote |
route | The chosen route: send, deliver, fees (in the asset sent), eta_seconds, destination, its legs and the points the value goes through (path) |
alternatives | The other routes considered, summarised |
guarantee | The guarantee level of the route |
final_by | When the beneficiary's credit is expected to be final |
commit_mode | capture_on_final or commit_first |
proof | { verdict, outcome }: the Proof verdict of the route, pass or review |
expires_at | The quote is firm until then |
protocol_version, signed_at, kid, signature | The envelope and the signature of Path Global, verified below |
For a PATH address or an alias, route.destination is
{ network, path_address, alias?, capability, commitment, intent_version }: the network, the
address, the alias when one was named, the PATH Capability the route pays it on, and the commitment
of the terms it was verified against. The beneficiary credited is not in the quote, the route, the
SETTL or the receipt.
Show the payer route.deliver, route.fees and final_by before they commit. A quote that is
about to expire is quoted again rather than executed late.
5. Execute once
const route = await pg.router.execute(quote.id, { idempotencyKey: 'invoice-1042' });
console.log(route.id); // "rt_…"
console.log(route.status); // "executing"curl -s -X POST https://api.pathglobal.finance/router/routes \
-H "Authorization: Bearer $PATHGLOBAL_TEST_KEY" \
-H "Path-Version: 2026-11-26.genesis" \
-H 'Content-Type: application/json' -H 'Idempotency-Key: invoice-1042' \
-d '{ "quote": "…" }'A quote executes once, before expires_at. The Idempotency-Key makes a retry of the same call safe:
it replays the first answer instead of failing on a quote already used.
pg.router.route(intent, { idempotencyKey }) quotes and executes in one call; its answer is the route
with the quote it executed under quoted.
6. Follow the route
A route answers executing and settles later. Poll it:
let current = route;
while (current.status === 'executing') {
await new Promise((resolve) => setTimeout(resolve, 2000));
current = await pg.router.get(route.id);
}status | Meaning |
|---|---|
review | Proof put the route in review: it waits for a person, below |
executing | Path Global is settling it |
settled | Delivered. receipt and delivered are set |
failed | Not delivered. failure holds { code, message } |
refund_required | Not delivered: the value of the route goes back to its source, and the SETTL follows the refund |
GET /router/routes lists the caller's routes.
7. Read the SETTL, the execution and the receipt
Each route that is funded has one SETTL: the settlement obligation of the route, with its state and its history. Behind it is an execution: the legs that move the value, and where the value sits while they run.
const settl = await pg.settlement.get(current.settlement!);
console.log(settl.state); // "closed"
console.log(settl.guarantee); // the level of the exchange
console.log(settl.legs); // each leg, with its rail reference
const execution = await pg.settlement.execution(settl.execution);
console.log(execution.type, execution.mode, execution.state); // "payment" … "settled"
const receipt = await pg.settlement.receipt(current.receipt!);pg.settlement.find('invoice-1042') (GET /settlement/settlements?reference=) finds the SETTLs of
a reference: a route id, the reference of the intent or a rail reference. The reference is at least
4 characters. Settlement and exchanges has the states.
{
"id": "…",
"kind": "settlement.receipt",
"route": "rt_…",
"settlement": "…",
"sent": { "value": "250.00", "asset": "USD" },
"received": { "value": "…", "asset": "EUR" },
"legs": [
{ "leg": "…", "kind": "convert", "router": "…", "in": { "value": "250.00", "asset": "USD" }, "out": { "value": "…", "asset": "EUR" }, "status": "done", "at": "…" },
{ "leg": "…", "kind": "payout", "network": "sepa-inst", "router": "…", "in": { "value": "…", "asset": "EUR" }, "out": { "value": "…", "asset": "EUR" }, "rail_reference": "…", "status": "done", "at": "…" }
],
"destination": { "network": "sepa-inst", "identifier": "DE89370400440532013000" },
"guarantee": "conditional",
"final_at": "…",
"protocol_version": "0.2.0",
"signed_at": "…",
"kid": "pg-test-…",
"signature": "…"
}Pay a PATH address or an alias
A PATH address (path: and 12 to 64 hexadecimal digits) or an alias (alias:<network>:<name>,
@name) names a payee at a member of the PATH network. Path Global pays it as a PATH member: SONAR
finds the holding member, RESOLVER at that member says what the address accepts, the commitment of
the terms is checked, and at execution the member issues a signed payment instruction that names the
beneficiary. In test mode the sandbox network answers these steps, with three
fixture payees.
const quote = await pg.router.quote({
amount: { value: '250.00', asset: 'USD' },
source: { omni_account: account.id },
destination: { alias: '@ada.moreau' },
deliver: { asset: 'EUR' },
reference: 'invoice-1043',
});
console.log(quote.route.destination);
// { network: 'sepa-inst', path_address: 'path:4a91c2f7e8d3', alias: 'alias:openconnect:ada.moreau',
// capability: { rail: 'sepa-inst', asset_type: 'fiat', asset_code: 'EUR' }, commitment: '…', intent_version: 1 }The route pays one entry of the payee's accepts, on a rail a payment instruction can name
(sepa-inst, pi-spi and blockchain rails in this version), within the entry's limits, the payee's
order deciding between equal candidates. With reference_required, the payment reference of the
instruction is the reference carried on the rail. The
router reference has each rule and
its error.
The receipts of a route
A route has a settlement receipt and, for a PATH destination, a payer receipt:
| Receipt | Issued by | Read with | States |
|---|---|---|---|
The settlement receipt (kind: "settlement.receipt") | Path Global, the operator that settled the route | route.receipt, pg.settlement.receipt(id) | Once settled: what was sent, what was received, each leg and its rail reference, the guarantee level |
The payer receipt (path.receipt, issued_by: "payer") | Path Global, as the payer's PATH member, for a PATH destination | route.payer_receipt, the Path Tool receipt_read | pending once the SETTL exists; failed with a PATH reason when the route is refunded or its SETTL expires |
A delivered route keeps its payer receipt pending: the payee's member states the settlement in its
own receipt (PIP-0011).
const paid = await pg.router.get(route.id);
console.log(paid.path_instruction); // { reference: '…', expires_at: '…' }
console.log(paid.payer_receipt); // { reference: '…', status: 'pending' }Verify a signature
Quotes, Proof verdicts, receipts, approvals and reports are PATH envelopes signed by Path Global with
Ed25519: the object, then protocol_version, signed_at and kid, then signature. The signature
covers the canonical JSON of the envelope without signature (the canonical form of the
protocol: keys sorted, no whitespace), protocol_version, signed_at and kid
included, with no prehash. signature is hexadecimal.
The keys are published at GET /.well-known/path-keys, without an API key, in the key format of the
protocol. GET /.well-known/pathglobal-keys is an alias and answers the same document.
{ "keys": [{ "kid": "pg-test-…", "kty": "OKP", "crv": "Ed25519", "alg": "EdDSA", "use": "sig", "public_key_hex": "…" }] }A kid names one key: pg-test-… signs in test mode, pg-live-… in live mode. A key stays
published once it has signed. verifyEnvelope of @pathprotocol/sdk verifies an envelope against a
key; verifySigned of @pathglobal/sdk reads the keys and verifies:
import { verifySigned } from '@pathglobal/sdk';
const result = await verifySigned(receipt);
// { valid: true } | { valid: false, reason: 'unknown_kid' | 'bad_signature' | 'keys_unavailable' }import { verifyEnvelope } from '@pathprotocol/sdk';
const { keys } = await fetch('https://api.pathglobal.finance/.well-known/path-keys').then((r) => r.json());
const key = keys.find((k: { kid: string }) => k.kid === receipt.kid);
const valid = key !== undefined && verifyEnvelope(receipt, key.public_key_hex);A kid the document does not list is reported apart from a signature that does not verify: read the
keys again once, then treat the object as unverifiable. An object without protocol_version is
signed over the SHA-256 of its canonical JSON; verifySigned verifies both forms.
A route in review
When the Proof verdict of a route is review, execute answers the route in review: nothing moves
until a person decides the verdict. The decision is a new signed verdict about the same route,
listed by GET /proof/checks with decided_by set. Resume the route with its id:
const resumed = await pg.router.release(route.id, decidedVerdictId);| Verdict | POST /router/routes/:id/release |
|---|---|
pass | The route moves to executing |
fail | The route ends failed with pathglobal.proof.failed |
review | 409 pathglobal.proof.review: the verdict is not decided yet |
A verdict about another route, or a route that is not in review, answers 409.
Proof verdicts
pg.proof.check(...) (POST /proof/checks) runs the checks of Proof on a payment before it is
quoted; pg.proof.get(id) reads one verdict. A verdict carries verdict (pass, review or
fail) and the result of each check, and is signed. A caller reads only its own verdicts.
On a route to a PATH address with the PATH network, the check payee reads the signed
payee check of the holder: match passes, no_match
fails, any other answer, or one that does not verify, sends the route to review.
Refusals
| Code | Status | When |
|---|---|---|
pathglobal.router.no_route | 422 | No route delivers the intent, or none respects its constraints |
pathglobal.router.router_unknown | 400 | router is neither path-flash-1.0 nor a router of the catalogue; details.routers lists them, path-flash-1.0 first |
pathglobal.router.payee_unknown | 404 | The PATH address or the alias does not resolve |
pathglobal.router.payee_unavailable | 503 | The member that holds the PATH destination did not answer: quote again later |
pathglobal.router.terms_unverifiable | 502 | What the payee's member published does not verify |
pathglobal.proof.failed | 422 | The route does not pass Proof |
pathglobal.router.quote_expired | 409 | The quote is past expires_at: quote again |
pathglobal.router.quote_already_used | 409 | The quote was executed: read the route it created |
pathglobal.core.not_found | 404 | A quote, route or Omni Account that is not the caller's |
Some refusals come once the route runs. The route then ends failed, with the code in
failure.code:
failure.code | When |
|---|---|
pathglobal.accounts.insufficient_funds | The holding does not hold the amount sent, or the account has no holding in its asset |
pathglobal.accounts.frozen | The holding is frozen |
pathglobal.risk.corridor_closed | No open corridor carries the pair |
pathglobal.risk.exposure_exceeded | The amount is outside what the corridor carries |
pathglobal.risk.velocity_exceeded, pathglobal.risk.corridor_throttled | A rate of the client, the destination or the corridor is reached |
pathglobal.risk.breaker_open | A breaker on the path of the payment is open |
pathglobal.risk.identity_restricted | The identity of the payer is not verified |
pathglobal.risk.halted | New work is paused |
pathglobal.router.instruction_refused | The payee's member refused the payment instruction, or it is for another amount or limits |
pathglobal.router.terms_unverifiable | The payment instruction does not verify |
Risk, limits and approvals describes these controls.
Going live
From the sandbox to live mode on the client's side — live keys and scopes, key hygiene, mode detection, operator signatures, the MCP live switch, idempotent retries and the answers to handle.
Settlement and exchanges
What a guarantee level promises, how a SETTL and its execution read from the client's side, the receipts of a route, where the value sits while a payment runs, and two-party exchanges on the book.