mercury.send
Initiate a Mercury bank payment from a connected account. Supports all Mercury payment rails: ACH (0–1 days), Wire (0–1 days), Real-Time Payment / RTP (instant), International Wire (1–3 days), and Check (7–10 days).
For International Wire — the primary DPX cross-border use case — provide SWIFT/BIC code and beneficiary bank details. DPX oracle conditions and FX corridor risk should be checked via oracle.stability and market.fx before executing.
Can optionally tag the payment for automatic DPX on-chain routing — when dpxRoute:true is set, the payment memo includes the DPX executor wallet address and the Mercury webhook picks it up for USDC settlement on Base mainnet.
Use sandbox:true (default) for dry-run testing. Set sandbox:false only when ready to move real funds.
Typical cross-border flow:
market.fx → check FX corridor risk for the destination currency
mercury.accounts → get source accountId
mercury.send (sandbox:true) → confirm payment parameters
settlement.quote → get DPX fee quote for the USDC leg
mercury.send (sandbox:false) → execute (requires explicit user confirmation)
mercury.transactions → verify payment posted
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Payment memo / description. | |
| amount | Yes | Payment amount in USD (or destination currency if specified). | |
| sandbox | No | Dry run — returns what would be sent without executing. Default: true. Set false to execute. | |
| bankCity | No | Beneficiary bank city. | |
| bankName | No | Beneficiary bank name (e.g. "Barclays Bank UK PLC"). | |
| currency | No | Destination currency for internationalWire (e.g. "GBP", "EUR"). Default USD. | |
| dpxRoute | No | If true, appends dpx:<wallet> to the memo — triggers DPX on-chain USDC settlement via the Mercury webhook. Use this to settle the stablecoin leg of a cross-border payment. | |
| accountId | Yes | Source Mercury account ID (from mercury.accounts). | |
| swiftCode | No | BIC/SWIFT code of beneficiary bank (required for internationalWire without recipientId). E.g. "BARCGB22" for Barclays UK. | |
| bankAddress | No | Beneficiary bank street address. | |
| bankCountry | No | Beneficiary bank country — ISO 3166-1 alpha-2 (e.g. "GB", "DE", "SG"). | |
| recipientId | No | Mercury saved recipient ID for internationalWire. Use this if the recipient is already saved in Mercury — skips inline bank detail fields. | |
| accountNumber | No | Recipient account number (required for ach/wire/check). Also used for IBAN on internationalWire. | |
| paymentMethod | No | Payment rail. rtp = Real-Time Payment (instant, US domestic). internationalWire = cross-border (1–3 days). Default: ach. | |
| recipientCity | No | Beneficiary city. | |
| recipientName | No | Recipient legal name (required for ach/wire/rtp/check). | |
| routingNumber | No | Recipient routing number (required for ach/wire/check). | |
| recipientEmail | No | Recipient email (optional — for payment notification). | |
| recipientAddress | No | Beneficiary street address. | |
| recipientCountry | No | Beneficiary country — ISO 3166-1 alpha-2. | |
| recipientPostalCode | No | Beneficiary postal code. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Mercury transaction ID (present when sandbox:false and executed) | |
| note | No | Payment memo as sent | |
| amount | No | Amount in USD | |
| status | No | Transaction status from Mercury | |
| sandbox | No | True if this was a dry run | |
| dpxTagged | No | Whether the DPX routing tag was appended | |
| simulation | No | Dry-run summary (present when sandbox:true) |