MegTrustDevelopers

Overview

Server-to-server JSON over HTTPS. Every success response is wrapped in { data, meta }.

What this API does

Read wallet balances and transaction history, register payout destinations, request payouts, and cancel a payout before anyone approves it. Every payout passes compliance checks and a human approval by a person in your organisation before it reaches the network. An API key can only send to destinations your organisation has already verified, and it can never approve its own request.

FieldTypeNotes
Base URLstringSandbox https://stagingvault.megtrust.com/api/v1 · Production https://vault.megtrust.com/api/v1 (Environments)
AuthEd25519Per-request signature. No bearer token, no shared secret.
AmountsstringAlways decimal strings — never parse as float.
Envelopeobject{ data, meta } on success; { error: { code, message } } on failure.

In the API a payout is a withdrawal: you request one with POST /api/v1/withdrawals. These docs use "payout" for the business action and "withdrawal" for the resource.

Getting started

Three steps, in order:

  1. Generate keys — create your keypair, register the public half.
  2. Sign a request — build the canonical string and sign it.
  3. Your first call — a complete working client to copy.

Then follow the guides for what you are building: receive funds, send a payout, and reconcile transactions.

Downloads

These files are public and contain no credentials.

Endpoints

MethodPathPurpose
GET/api/v1/walletsWorkspace wallets, deposit addresses, balances
GET/api/v1/wallets/{id}One wallet; foreign or unknown IDs return 404
GET/api/v1/transactionsOn-chain movements, newest first; page with cursor
GET/api/v1/transactions/{id}One transaction, as its legs
GET/api/v1/counterpartiesDestination book; check can_send
POST/api/v1/counterpartiesRegister a pending destination
GET/api/v1/withdrawalsRecorded payouts; follow meta.next_offset, or look one up by idempotency_key
POST/api/v1/withdrawalsRequest a payout; requires Idempotency-Key
GET/api/v1/withdrawals/{id}Refresh a payout's status and network hash
POST/api/v1/withdrawals/{id}/cancelCancel a payout that is still pending approval

Full request and response schemas are in the API reference.

On this page