zcash:ZEC. Omitting the mode fields keeps the transparent flow described in Quotes.
Shielded mode needs a server key or a client key with orders:quote. An estimate or route lookup without a key returns 503 shielded_funding_unavailable. So does any request made while Orchestra cannot watch the Zcash chain for shielded deposits; retry it with the same idempotency key.
Prerequisites
- An Orchestra account. Create one in the dashboard. Flashnet reviews new accounts before enabling API access.
- A server key (
fn_...) from API keys in the dashboard. Keep it on your backend. For browsers and apps, use a scoped client key (fnp_...); see Authentication.
Pay from a shielded balance
SetsourcePaymentMode: "shielded" on POST /v1/orchestration/quote with zcash:ZEC as the source. Shielded funding is exact-in with variable delivery, and refundAddress is required.
Replace
SERVER_KEY with your fn_... key. Use a new X-Idempotency-Key for each operation and reuse it when retrying that same request. Amounts are integer strings in the asset’s smallest unit: "100000" is 0.001 BTC; "50000000" is 50 USDC on Base. Read each asset’s decimals from /v2/orchestration/routes.RECIPIENT_ADDRESS is the Arbitrum address that receives USDC. Set refundAddress to a Zcash address you control.
refundAddress is a mainnet t1 or t3 address, or a Unified Address with an Orchard receiver. Anything else returns 400 invalid_refund_address. A transparent refund reveals the refund recipient and amount on chain.
The response differs from an ordinary quote:
depositAddressis a Unified Address issued for this quote.expiresAtandfunding.payBygive 30 minutes to pay.priceValidUntilis a separate 2-minute pricing horizon, not a payment deadline.funding.versionis 2, withamountMode: "actual-input"andpricing: "market-at-funding". Orchestra accepts the amount that arrives, waits for 10 confirmations, then prices it at market.indicativeMinAmountOutis an indication for the requested amount, not a committed floor.fundingalso reports the required confirmations, andmaxSourceFeeZatsandmaxRefundFeeZats, the network fee caps for the source transaction and for each refund transaction.
funding.version: 1. They keep lockedMinAmountOut and require the exact quoted amount.
Shielded swaps run through a third-party venue. execution reports the candidates in eligibleProviders, the one the price came from in quotedProvider, and estimatedSettlementSeconds. To restrict the choice, send executionPolicy:
maxEstimatedSettlementSeconds can exclude the slower venue. The estimate is an indication, not a deadline. On /estimate the same fields are flat query parameters, with allowedProviders comma-separated.
POST /v1/orchestration/submit cannot report a shielded payment, because a transaction hash does not prove a private receipt. Until Orchestra has verified the payment it returns 409 shielded_receipt_pending; after that it returns the order. /offramp and /onramp do not accept shielded mode.
Orchestra verifies payment to the issued address and its confirmations. It cannot see the sender or screen the history of shielded funds, so funding reports senderVisibility: "shielded" and sourceHistoryScreening: "unavailable". Recipient, refund, and fee addresses are screened as usual. The order’s source address and source transaction hash stay null.
Deliver to a shielded address
SetdestinationPaymentMode: "shielded" with destinationChain: "zcash", destinationAsset: "ZEC", and the recipient’s Orchard Unified Address as recipientAddress. The source is any asset with a route to ZEC. Delivery is exact-in and variable.
The response adds destinationPaymentMode, priceValidUntil, execution, and delivery:
feeReserveZats covers the shielded payment’s network fee and is already deducted from estimatedOut. The delivery transaction spends transparent inputs and pays the recipient their sum minus the network fee, with no change output. The chain hides the recipient and shows the inputs and the fee, so do not tell users the delivered amount is private. Fund the quote before expiresAt as for any other quote.
Unsupported combinations return HTTP 400: shielded_destination_route_unsupported for ZEC to ZEC or shielded mode on both ends, shielded_amount_mode_unsupported for exact-out, and destination_payment_mode_unsupported for any other destination.
Discover routes
The shielded filter is on the v1 route list, not on/v2/orchestration/routes:
GET /v1/orchestration/limits takes the same parameter. Both return the routes that accept shielded funding. GET /v1/orchestration/estimate accepts sourcePaymentMode and destinationPaymentMode as query fields and allocates no address.
Funding status
A shielded payment needs 10 confirmations before it becomes an order. Until then, read progress by polling, webhook, or SSE:- Poll
GET /v1/orchestration/status?quoteId=QUOTE_ID&includeShieldedFunding=true. It returnsfundingStatusandfundingDetails, withorder: nullandstages: []until the order exists. - Subscribe to
shielded_funding.updatedwebhooks at/v1/webhooks/shielded-funding. - Stream SSE on the quote id with
includeShieldedFunding=true.
fundingStatus follows one of two paths:
detected and read confirming as soon as a payment is seen.
fundingDetails has the shape shown in Shielded funding events. The expected, received, confirmed, and allocated amounts are integer strings in zatoshis. Received is what arrived, confirmed is what has its confirmations, and allocated is what has been assigned to the order. Version 2 adds amountActual, the input the order runs on, in zatoshis, and committedMinAmountOut, the output floor set at execution, in the smallest units of the destination asset: 6 decimals for USDC, not the 8 of ZEC. Both are null until then. selectedProvider names the third-party venue committed to the swap, null until one is committed.
recovery_required means the payment is not converting. fundingDetails.recoveryReason.code says why:
funding_expired:payBypassed with nothing received, or with less than a version 1 quote required. An unpaid quote reads this afterpayBy.late_payment: the payment was first included in a block afterpayBy.excess_payment: more than the quoted amount arrived on a version 1 quote.additional_payment: a further payment confirmed after a version 2 order had fixed its input.too_many_notes: the payment arrived as more than 16 notes.mixed_pools: the payment arrived across more than one shielded pool.provider_failed,provider_released: the venue executing the swap failed or released the order.allocation_reorg: a chain reorganization removed a payment already assigned to the order.reconciliation_required: the order is paused, failed, or refunded and needs Flashnet review.
refunded means every payment to the quote has a confirmed refund to refundAddress, as of fundingDetails.refundLastVerifiedAt. Before that the status reads refunding or recovery_required; a signed refund is not yet a refund.