Skip to main content
Run the customer experience in your application while Rach provides dedicated escrow wallets and settlement mechanics. Your backend calls the CaaS API; protect its key and keep it out of browsers and mobile apps. The partner API is separate from the Rach P2P trading interface. There is no required trading-interface redirect, hosted widget or escrow SDK in this delivery. Agree pilot and operating terms and confirm environment enablement with Rach before collecting funds. A published specification or simulated response does not establish mainnet settlement evidence or country eligibility.

Custody and supported scope

The partner receives no escrow private keys. Legal custody, compliance duties and the partner’s authorization role must be stated in the agreement; the API does not decide regulatory status.

API operations

All partner calls use X-API-Key. The public CaaS service base is https://api.rach.finance/caas; append the /v1/... paths below. Confirm escrow enablement for your tenant before funding a deal. See the CaaS reference. Rach’s dispute-decision and deposit-recovery authorization routes require staff permissions and are excluded from the public partner specification.

Provision and open

Provision each participant with POST /v1/tron/users/provision, using phone_number. For an existing wallet owned by another tenant, complete the consent/linking flow first. Escrow creation checks membership, participant freeze status and wallet existence. It does not automatically provision customers or perform KYC by validating their phone numbers.
Omit chain_id. The create reference is unique within your tenant and is the idempotency key. Retry identical terms to receive the original deal and address; changed terms return 409. New deal admission requires enabled deposit scanning and sponsored payouts, plus a successful sponsor-readiness check; otherwise it returns 503. auto_release_hours is optional (0–8760). Zero uses the configured default, currently no automatic release. The agreed duration is persisted and starts when confirmed funding is recorded. A dispute prevents automatic release. Explain the inspection window in your customer terms before enabling it. An illustrative live response is:
Amount units differ: create requests use whole-USDT decimal strings; live responses, webhook data and recovery amounts use integer base-unit strings. "25000000" means 25 USDT (six decimals). Use integer/decimal arithmetic, not floating point.

Funding and settlement

The buyer sends the exact principal in USDT over TRON to the dedicated address. External wallet/exchange authorization remains part of the funding flow. Rach records FUNDED from confirmed USDT deposits; a partner cannot assert it by supplying a transaction hash. The default funding window is 24 hours. A positive partial deposit or observer failure prevents automatic expiry. Late deposits can still arrive at a closed address and must use the recovery process; closing a database deal cannot disable its blockchain address. For release, send this optional body to /v1/escrows/{id}/release:
Refund uses /refund; a dispute uses /dispute and requires a nonempty reason. Your API key is the authorizing party regardless of on_behalf_of. Collect customer consent according to the agreed operating terms. Payout calls return 202 while state remains FUNDED (or DISPUTED for an admin decision) and payout_pending is true. Report payment complete only after terminal state and payout_tx_hash. Pending repeats conflict; read persisted state after 409 or an uncertain response. Actions do not accept a separate idempotency key. A dispute and payout claim serialize on the same row: if the dispute wins, only Rach can resolve; if payout was already claimed, a new dispute is refused. A broadcast transaction cannot be recalled. The payout’s direction is stored explicitly, independently of reason text. Tenant and participant freezes are checked before payout and again by the TRON worker.

Partial, excess and late deposits

Rach staff can authorize a separately identified recovery after verifying ownership and entitlement, including for third-party deposits. Recoveries reserve confirmed unallocated funds, serialize concurrent requests and leave the principal outcome unchanged. An open partial deposit can be recovered after the funding deadline; the deal then closes. Principal owed under a funded/disputed deal cannot be consumed as an excess recovery. Read /recoveries for the recovery reference, base-unit amount, recipient, reason, PENDING/SETTLED/FAILED status and transaction hash. Pending recovery is not payment confirmation. A failed attempt requires an explicit new authorization; unknown outcomes remain reserved. The recipient is the named buyer’s linked wallet, not an arbitrary address.

Webhooks and reconciliation

Register your receiver in the CaaS dashboard. Escrow events are persisted with their state change and delivered asynchronously. Verify X-Rach-Signature: sha256=<hex> as HMAC-SHA256 over the exact raw body using your webhook secret.
Events include escrow.created, escrow.funded, escrow.payout_pending, escrow.released, escrow.refunded, escrow.disputed, escrow.cancelled, escrow.expired, escrow.payout_failed, escrow.recovery_pending, escrow.recovery_settled and escrow.recovery_failed. Delivery is at least once. Deduplicate by event_id; retries/replays preserve it. Failures are retried with capped backoff and survive process restart. Delivery order is not guaranteed, so fetch current state before updating a time-sensitive customer screen. Read /events for stable IDs and actor/reason metadata, and use the replay endpoint for redelivery. Read /recoveries for recovery-specific details. The events describe persisted snapshots; a delayed event need not be the current state.

Sandbox limitations

Test keys (rach_sk_test_…) or account test mode simulate supported mutations without creating custody wallets or persistent deals. Never fund a simulated address. Reads pass through to normal handlers, not a separate sandbox datastore, so a simulated ID cannot be polled as a stored deal. Simulated release/refund return terminal states immediately. They do not reproduce live pending/confirmation behavior or emit settlement webhooks. Simulation does not provide full live validation and currently echoes the request amount in whole tokens rather than live base units. Use fixtures for UI states and complete the agreed settlement acceptance exercise before live use.

Disputes and operating terms

The API records reasons, identities and history, including creation and asserted on_behalf_of metadata. A resolved payout exposes the recorded admin reasoning as resolution_note. Evidence submission, appeals, adjudication rules, staffing and SLAs are part of the agreed operating process; this release does not provide evidence-file upload or appeal endpoints. Confirm entity, compliance, countries, pricing and pilot terms. Network sponsorship describes on-chain payment of costs, not a free-service commitment.