---
updatedAt: 2026-10-02T20:50:18.000Z
agentTools:
  projectIndex: https://docs.mercury.com/llms.txt
---

# Send money to a recipient

Send money from an account to a recipient. Creates a transaction that will be processed immediately or may require approval.

**Scope:** Send Money (requires IP whitelist)

<Callout icon="🚧" theme="warn">
  ### Valid uses for the transaction API

  You may not use the Mercury API for any activity that requires a license or registration from any governmental authority in the U.S., or any authority you are subject to, without Mercury's approval in advance. This includes but is not limited to any activity type described in the definition of a [Money Services Business](https://www.fincen.gov/money-services-business-definition), or any State-regulated financial services such as Money Transmission.

  Here are some **acceptable** uses:

  1. Paying invoices for your company
  2. Automating bills and other payments

  Here are some **unacceptable** uses:

  1. Providing cash advances
  2. Currency conversion services
  3. Escrow services
  4. Building out _marketplaces_ to facilitate payments
     1. Marketplace - Any business model that involves receiving currency (or other value that substitutes for currency), and transferring that currency to another person by any means, including through a mobile application, through a network of persons, or through an informal value transfer system

  Contact [api@mercury.com](mailto:api@mercury.com) if you'd like to confirm your use case is allowed. We especially recommend this if you'd describe your company as a financial services company.
</Callout>

Note that attempting to create a duplicate transaction (same recipient, same account, same amount) within 24 hours would result in an HTTP 400 error, even if you use different idempotency keys for each attempt. If you want this restriction removed, please reach out to support.

<Callout icon="📘" theme="info">
  ### Idempotency Keys

  Each request to create a transaction must provide an idempotency key which uniquely identifies the transaction. Repeated requests with the same idempotency key will not create a duplicate transaction, and will instead return HTTP 409 (conflict) with the normal API response for that transaction.

  This approach makes it safe to retry creating a transaction, in case it is unclear that the transaction processed (for example, in case of a network error or your server crashing after the request is sent).

  The idempotency key itself can be any value uniquely identifying the transaction. We recommend a UUID V4 or auto-incrementing database column for a general purpose solution.

  Alternatively, you can also use a more semantic key. For example, if you pay "Recipient A" monthly, your idempotency key could be "Recipient A January". This would prevent duplicate transactions if you tried to pay Recipient A twice in January accidentally.

  Your code should look something like this:

  1. Insert a record of attempting a transaction into your database. This should include your own metadata about the transaction (e.g. recipient ID, amount, etc.), plus an idempotency key and a value noting that the transaction hasn't been attempted. Example query using PostgreSQL:

  ```mysql
  INSERT INTO transactions (id, recipient_id, amount, attempted) VALUES 	(uuid_generate_v4(), recip1, 10.20, false) RETURNING id;
  ```

  2. Make the HTTP request to Mercury to create the transaction

  3. Update the database record to note that the transaction was attempted. Example using PostgreSQL:

  ```sql
  UPDATE transactions SET attempted = true WHERE id = <id from step 1>;
  ```

  You can then set up an alert or retry logic to look for transactions that are in your database but not marked as attempted, which would suggest that either step 2 or 3 failed. The idempotency key will help prevent duplicate payments if only step 3 failed.
</Callout>

<Callout icon="ℹ️" theme="info">
  ### Payment Methods

  When using `domesticWire` as a `paymentMethod`:

  * `purpose.simple.category` is **required**.
  * `purpose.simple.additionalInfo`:
    * **Required** when `purpose.simple.category` is:
      * `Vendor` (vendor name)
      * `Contractor` (contractor name)
      * `Other` (payment description)
    * **Optional** for:
      * `Subsidiary`
    * **Not allowed** for all other categories

  When using `realTimePayment` as a `paymentMethod`:

  - **Note**: Real-time payments are designed to settle in seconds, and the network is open 24/7, including weekends and holidays. Real-time payments are designed to be final once submitted. Since settlement happens immediately, they generally cannot be canceled or reversed by the sender. Read more in <Anchor target="_blank" href="https://support.mercury.com/hc/en-us/articles/45122488964244-Sending-real-time-payments">Mercury's Help Center</Anchor>.

  - The recipient's routing number must be eligible for Real-time payments, either through the RTP® network and/or the FedNow service. You can validate a routing number's eligibility when adding or updating a recipient's `realTimePaymentRoutingInfo`. Before sending, check with your recipient to make sure their bank can receive Real-time payments.

  - Real-time payments are only available to Mercury accounts provided through our partner, Column N.A. You can check an account's eligibility to send Real-time payments with the `canSendRealTimePayments` attribute available in the <Anchor target="_blank" href="https://docs.mercury.com/reference/getaccounts">getAccounts</Anchor> response.

  - $10,000,000 is the maximum amount for an individual transaction.
</Callout>

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "AccountingSyncStatus": {
        "enum": [
          "pending",
          "reviewed",
          "syncing",
          "synced",
          "errored",
          "excluded"
        ],
        "type": "string"
      },
      "AddressData": {
        "properties": {
          "address1": {
            "type": "string"
          },
          "address2": {
            "nullable": true,
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/USState"
              }
            ],
            "nullable": true
          }
        },
        "required": [
          "address1",
          "city",
          "postalCode"
        ],
        "type": "object"
      },
      "AddressWithoutName": {
        "properties": {
          "address1": {
            "type": "string"
          },
          "address2": {
            "nullable": true,
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "country": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ISO3166Alpha2"
              }
            ]
          },
          "postalCode": {
            "type": "string"
          },
          "region": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Region"
              }
            ]
          }
        },
        "required": [
          "address1",
          "city",
          "region",
          "postalCode",
          "country"
        ],
        "type": "object"
      },
      "CategoryData": {
        "description": " Represents an expense category for transaction classification.",
        "properties": {
          "id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CategoryId"
              },
              {
                "description": " The ID of the category"
              }
            ]
          },
          "name": {
            "description": " The name of the category",
            "type": "string"
          },
          "visibleForCardSpend": {
            "description": " Whether this category is applicable to card transactions",
            "type": "boolean"
          },
          "visibleForOther": {
            "description": " Whether this category is applicable to all other transaction kinds",
            "type": "boolean"
          },
          "visibleForReimbursements": {
            "description": " Whether this category is applicable to expense reimbursement transactions",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "visibleForReimbursements",
          "visibleForCardSpend",
          "visibleForOther"
        ],
        "type": "object"
      },
      "CategoryId": {
        "description": "ID for the category",
        "format": "uuid",
        "type": "string"
      },
      "CreditCardId": {
        "format": "uuid",
        "type": "string"
      },
      "CreditCardInfo": {
        "properties": {
          "email": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreditCardId"
              },
              {
                "description": " Superseded by the flat `transaction.cardId`, which identifies the card on any card payment\n or refund without branching on debit vs credit. Retained for backwards compatibility; a formal\n (OpenAPI-level) deprecation will follow in a separate change."
              }
            ]
          },
          "paymentMethod": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "paymentMethod"
        ],
        "type": "object"
      },
      "CurrencyCode": {
        "type": "string"
      },
      "CurrencyExchangeInfo": {
        "properties": {
          "convertedFromAmount": {
            "multipleOf": 0.01,
            "type": "number"
          },
          "convertedFromCurrency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ]
          },
          "convertedToAmount": {
            "multipleOf": 0.01,
            "type": "number"
          },
          "convertedToCurrency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              }
            ]
          },
          "exchangeRate": {
            "description": " Exchange rate goes from \"from currency\" to \"to currency\"\n (ie from currency * exchange rate = to currency)",
            "multipleOf": 0.0001,
            "type": "number"
          },
          "feeAmount": {
            "multipleOf": 0.01,
            "type": "number"
          },
          "feePercentage": {
            "multipleOf": 0.0001,
            "type": "number"
          },
          "feeTransactionId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionMetadataId"
              }
            ],
            "nullable": true
          }
        },
        "required": [
          "convertedFromCurrency",
          "convertedToCurrency",
          "convertedFromAmount",
          "convertedToAmount",
          "feeAmount",
          "feePercentage",
          "exchangeRate"
        ],
        "type": "object"
      },
      "DebitCardId": {
        "format": "uuid",
        "type": "string"
      },
      "DebitCardInfo": {
        "properties": {
          "id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DebitCardId"
              },
              {
                "description": " Superseded by the flat `transaction.cardId`, which identifies the card on any card payment\n or refund without branching on debit vs credit. Retained for backwards compatibility; a formal\n (OpenAPI-level) deprecation will follow in a separate change."
              }
            ]
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "DomesticWireRoutingInfo": {
        "properties": {
          "accountNumber": {
            "type": "string"
          },
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AddressWithoutName"
              }
            ],
            "nullable": true
          },
          "bankName": {
            "nullable": true,
            "type": "string"
          },
          "routingNumber": {
            "type": "string"
          }
        },
        "required": [
          "accountNumber",
          "routingNumber"
        ],
        "type": "object"
      },
      "ElectronicAccountType": {
        "enum": [
          "businessChecking",
          "businessSavings",
          "personalChecking",
          "personalSavings",
          "businessGeneralLedger",
          "personalGeneralLedger",
          "businessLoan",
          "personalLoan"
        ],
        "type": "string"
      },
      "ElectronicRoutingInfo": {
        "properties": {
          "accountNumber": {
            "type": "string"
          },
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AddressWithoutName"
              }
            ],
            "nullable": true
          },
          "bankName": {
            "nullable": true,
            "type": "string"
          },
          "electronicAccountType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ElectronicAccountType"
              }
            ]
          },
          "routingNumber": {
            "type": "string"
          }
        },
        "required": [
          "accountNumber",
          "routingNumber",
          "electronicAccountType"
        ],
        "type": "object"
      },
      "GlAllocation": {
        "description": " A GL code allocation on a transaction — a GL code name paired with the amount\n allocated to it. When a transaction is fully categorized, the amounts across all\n allocations sum to the transaction total.",
        "properties": {
          "amount": {
            "description": " The amount allocated to this GL code",
            "multipleOf": 0.01,
            "type": "number"
          },
          "className": {
            "description": " The name of the class from the connected accounting integration, if assigned",
            "nullable": true,
            "type": "string"
          },
          "departmentName": {
            "description": " The name of the department from the connected accounting integration, if assigned",
            "nullable": true,
            "type": "string"
          },
          "description": {
            "description": " Optional user-provided description for this allocation",
            "nullable": true,
            "type": "string"
          },
          "glCodeName": {
            "description": " The name of the GL code from the connected accounting integration",
            "type": "string"
          }
        },
        "required": [
          "glCodeName",
          "amount"
        ],
        "type": "object"
      },
      "ISO3166Alpha2": {
        "type": "string"
      },
      "InternationalWireAustraliaSpecificData": {
        "properties": {
          "bsbCode": {
            "type": "string"
          }
        },
        "required": [
          "bsbCode"
        ],
        "type": "object"
      },
      "InternationalWireBrazilSpecificData": {
        "properties": {
          "legalId": {
            "type": "string"
          }
        },
        "required": [
          "legalId"
        ],
        "type": "object"
      },
      "InternationalWireCanadaSpecificData": {
        "properties": {
          "bankCode": {
            "type": "string"
          },
          "transitNumber": {
            "type": "string"
          }
        },
        "required": [
          "bankCode",
          "transitNumber"
        ],
        "type": "object"
      },
      "InternationalWireChileSpecificData": {
        "properties": {
          "legalId": {
            "type": "string"
          }
        },
        "required": [
          "legalId"
        ],
        "type": "object"
      },
      "InternationalWireColombiaSpecificData": {
        "properties": {
          "legalId": {
            "type": "string"
          }
        },
        "required": [
          "legalId"
        ],
        "type": "object"
      },
      "InternationalWireCorrespondentInfo": {
        "properties": {
          "bankName": {
            "nullable": true,
            "type": "string"
          },
          "routingNumber": {
            "nullable": true,
            "type": "string"
          },
          "swiftCode": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "InternationalWireCountrySpecificData": {
        "properties": {
          "australia": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWireAustraliaSpecificData"
              }
            ],
            "nullable": true
          },
          "brazil": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWireBrazilSpecificData"
              }
            ],
            "nullable": true
          },
          "canada": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWireCanadaSpecificData"
              }
            ],
            "nullable": true
          },
          "chile": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWireChileSpecificData"
              }
            ],
            "nullable": true
          },
          "colombia": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWireColombiaSpecificData"
              }
            ],
            "nullable": true
          },
          "dominicanRepublic": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWireDominicanRepublicSpecificData"
              }
            ],
            "nullable": true
          },
          "honduras": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWireHondurasSpecificData"
              }
            ],
            "nullable": true
          },
          "india": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWireIndiaSpecificData"
              }
            ],
            "nullable": true
          },
          "kazakhstan": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWireKazakhstanSpecificData"
              }
            ],
            "nullable": true
          },
          "pakistan": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWirePakistanSpecificData"
              }
            ],
            "nullable": true
          },
          "paraguay": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWireParaguaySpecificData"
              }
            ],
            "nullable": true
          },
          "philippines": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWirePhilippinesSpecificData"
              }
            ],
            "nullable": true
          },
          "russia": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWireRussiaSpecificData"
              }
            ],
            "nullable": true
          },
          "southAfrica": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWireSouthAfricaSpecificData"
              }
            ],
            "nullable": true
          }
        },
        "type": "object"
      },
      "InternationalWireDominicanRepublicSpecificData": {
        "properties": {
          "accountType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SwiftBankAccountType"
              }
            ]
          },
          "legalId": {
            "type": "string"
          }
        },
        "required": [
          "accountType",
          "legalId"
        ],
        "type": "object"
      },
      "InternationalWireHondurasSpecificData": {
        "properties": {
          "accountType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SwiftBankAccountType"
              }
            ]
          },
          "legalId": {
            "type": "string"
          }
        },
        "required": [
          "accountType",
          "legalId"
        ],
        "type": "object"
      },
      "InternationalWireIndiaSpecificData": {
        "properties": {
          "ifscCode": {
            "type": "string"
          }
        },
        "required": [
          "ifscCode"
        ],
        "type": "object"
      },
      "InternationalWireKazakhstanSpecificData": {
        "properties": {
          "legalId": {
            "type": "string"
          }
        },
        "required": [
          "legalId"
        ],
        "type": "object"
      },
      "InternationalWirePakistanSpecificData": {
        "properties": {
          "legalId": {
            "type": "string"
          },
          "legalIdType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PakistaniLegalIdType"
              }
            ]
          }
        },
        "required": [
          "legalIdType",
          "legalId"
        ],
        "type": "object"
      },
      "InternationalWireParaguaySpecificData": {
        "properties": {
          "legalId": {
            "type": "string"
          }
        },
        "required": [
          "legalId"
        ],
        "type": "object"
      },
      "InternationalWirePhilippinesSpecificData": {
        "properties": {
          "routingNumber": {
            "type": "string"
          }
        },
        "required": [
          "routingNumber"
        ],
        "type": "object"
      },
      "InternationalWireRoutingInfo": {
        "properties": {
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AddressWithoutName"
              }
            ],
            "nullable": true
          },
          "bankDetails": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SwiftCodeData"
              }
            ],
            "nullable": true
          },
          "correspondentInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWireCorrespondentInfo"
              }
            ],
            "nullable": true
          },
          "countrySpecific": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWireCountrySpecificData"
              }
            ]
          },
          "emailAddress": {
            "nullable": true,
            "type": "string"
          },
          "iban": {
            "type": "string"
          },
          "phoneNumber": {
            "nullable": true,
            "type": "string"
          },
          "swiftCode": {
            "type": "string"
          }
        },
        "required": [
          "iban",
          "swiftCode",
          "countrySpecific"
        ],
        "type": "object"
      },
      "InternationalWireRussiaSpecificData": {
        "properties": {
          "inn": {
            "type": "string"
          }
        },
        "required": [
          "inn"
        ],
        "type": "object"
      },
      "InternationalWireSouthAfricaSpecificData": {
        "properties": {
          "branchCode": {
            "type": "string"
          }
        },
        "required": [
          "branchCode"
        ],
        "type": "object"
      },
      "MerchantData": {
        "description": " Merchant information for card transactions",
        "properties": {
          "amount": {
            "description": " The transaction amount in the smallest unit of the merchant's currency\n (e.g., cents for USD/EUR, yen for JPY, fils for BHD).\n For debits this is negative, for credits positive.\n Use 'merchantCurrency' to determine the appropriate decimal scaling:\n most currencies use 2 decimal places (divide by 100), but JPY uses 0\n (no division needed) and BHD/KWD/OMR use 3 (divide by 1000).\n This is useful for international transactions where the merchant charges in a\n currency different from the account currency. Nothing if not available.",
            "format": "int64",
            "maximum": 9223372036854776000,
            "minimum": -9223372036854776000,
            "nullable": true,
            "type": "integer"
          },
          "category": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MercuryCategory"
              },
              {
                "description": " Mercury category for the merchant (e.g., \"Restaurants\", \"Software\")"
              }
            ],
            "nullable": true
          },
          "categoryCode": {
            "description": " 4-digit merchant category code (MCC) for card transactions",
            "nullable": true,
            "type": "string"
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyCode"
              },
              {
                "description": " ISO 4217 currency code of the merchant's currency (e.g., \"EUR\", \"GBP\", \"JPY\").\n Nothing if not available."
              }
            ],
            "nullable": true
          },
          "id": {
            "description": " Merchant ID for card transactions",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "MercuryCategory": {
        "enum": [
          "Other",
          "Advertising",
          "Airlines",
          "AlcoholAndBars",
          "BooksAndNewspaper",
          "CarRental",
          "Charity",
          "Clothing",
          "Conferences",
          "Education",
          "Electronics",
          "Entertainment",
          "FacilitiesExpenses",
          "Fees",
          "FoodDelivery",
          "FuelAndGas",
          "Gambling",
          "GovernmentServices",
          "Grocery",
          "GroundTransportation",
          "Insurance",
          "InternetAndTelephone",
          "Legal",
          "Lodging",
          "Medical",
          "Memberships",
          "OfficeSupplies",
          "OtherTravel",
          "Parking",
          "Political",
          "ProfessionalServices",
          "Restaurants",
          "Retail",
          "RideshareAndTaxis",
          "Shipping",
          "Software",
          "Taxes",
          "Utilities",
          "VehicleExpenses"
        ],
        "type": "string"
      },
      "MercuryCreditAccountStatementPeriodId": {
        "description": "ID for the credit statement period",
        "format": "uuid",
        "type": "string"
      },
      "PakistaniLegalIdType": {
        "enum": [
          "CNIC",
          "SNIC",
          "Passport",
          "NTN"
        ],
        "type": "string"
      },
      "PositiveDollar": {
        "description": "A positive dollar amount with at least 1 cent.",
        "format": "double",
        "minimum": 0.01,
        "type": "number"
      },
      "PostTransactionAPIRequest": {
        "properties": {
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PositiveDollar"
              }
            ],
            "description": "Amount of USD you want to send, must be a positive number."
          },
          "duplicateCheckOverride": {
            "description": "Set to true to skip the duplicate payment check. By default, payments are blocked if the same account sent the same amount to the same recipient with the same payment method in the last 24 hours, even when the idempotency key is different. Use this field only when you intentionally send a repeat payment.",
            "type": "boolean"
          },
          "externalMemo": {
            "description": "Optional external memo",
            "maxLength": 299,
            "type": "string"
          },
          "idempotencyKey": {
            "description": "Unique string identifying the transaction",
            "type": "string"
          },
          "note": {
            "description": "Optional note",
            "type": "string"
          },
          "paymentMethod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PostTransactionPaymentMethod"
              }
            ],
            "description": "If domesticWire is used, then the purpose field is required."
          },
          "purpose": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PostTransactionSendMoneyPurpose"
              }
            ],
            "description": "Purpose of payment with category and optional additional info. Required when paymentMethod is 'domesticWire'."
          },
          "recipientId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionPartyId"
              }
            ],
            "description": "Recipient ID from the /recipients endpoint."
          }
        },
        "required": [
          "recipientId",
          "amount",
          "paymentMethod",
          "idempotencyKey"
        ],
        "type": "object"
      },
      "PostTransactionPaymentMethod": {
        "enum": [
          "ach",
          "check",
          "domesticWire",
          "realTimePayment"
        ],
        "type": "string"
      },
      "PostTransactionSendMoneyPurpose": {
        "description": " External API representation of SendMoneyPurpose.\n Only exposes the 'simple' field to decouple internal implementation from external API.",
        "properties": {
          "simple": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SimplePurpose"
              }
            ],
            "nullable": true
          }
        },
        "type": "object"
      },
      "Region": {
        "type": "string"
      },
      "RelatedTransactionData": {
        "description": " A Public API version of RelatedTransactionData.",
        "properties": {
          "accountId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionPartyId"
              }
            ]
          },
          "amount": {
            "multipleOf": 0.01,
            "type": "number"
          },
          "id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionMetadataId"
              }
            ]
          },
          "relationKind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionRelationKind"
              }
            ]
          }
        },
        "required": [
          "id",
          "accountId",
          "relationKind",
          "amount"
        ],
        "type": "object"
      },
      "SimplePurpose": {
        "properties": {
          "additionalInfo": {
            "description": "Additional information. Required for: Vendor (vendor name), Contractor (contractor name), Other (payment description). Optional for Subsidiary (subsidiary name). Not accepted for any other categories.",
            "type": "string"
          },
          "category": {
            "description": "Payment category.",
            "enum": [
              "employee",
              "landlord",
              "vendor",
              "contractor",
              "subsidiary",
              "transferToMyExternalAccount",
              "familyMemberOrFriend",
              "forGoodsOrServices",
              "angelInvestment",
              "savingsOrInvestments",
              "expenses",
              "travel",
              "other"
            ],
            "type": "string"
          }
        },
        "required": [
          "category"
        ],
        "type": "object"
      },
      "SwiftBankAccountType": {
        "enum": [
          "checking",
          "savings"
        ],
        "type": "string"
      },
      "SwiftCodeData": {
        "properties": {
          "bankCityState": {
            "type": "string"
          },
          "bankCountry": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ISO3166Alpha2"
              }
            ]
          },
          "bankName": {
            "type": "string"
          }
        },
        "required": [
          "bankName",
          "bankCityState",
          "bankCountry"
        ],
        "type": "object"
      },
      "Transaction": {
        "properties": {
          "accountId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionPartyId"
              },
              {
                "description": " The external-facing account identifier for the Mercury account that owns this transaction"
              }
            ]
          },
          "accountingStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionAccountingStatus"
              },
              {
                "description": " Review and sync status of this transaction for the connected accounting integration (e.g.\n QuickBooks, Xero, NetSuite). A transaction with no accounting activity is pending with no\n timestamps. Null if the caller is not authorized to read accounting status, if the\n organization has no active general ledger (no active Books or third-party ERP ledger), and\n on the responses of endpoints that create transactions or transfers."
              }
            ],
            "nullable": true
          },
          "amount": {
            "multipleOf": 0.01,
            "type": "number"
          },
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/TransactionAttachment"
            },
            "type": "array"
          },
          "bankDescription": {
            "nullable": true,
            "type": "string"
          },
          "cardId": {
            "description": " Id of the card behind this transaction, present on card payments and refunds (debit or\n credit); null otherwise, including for card-related fee transactions. Fetch the card's details\n (kind, cardholder, last four, etc.) via the Cards API (`GET /cards/{cardId}`). Supersedes the\n kind-specific `details.creditCardInfo.id` / `details.debitCardInfo.id`.",
            "format": "uuid",
            "nullable": true,
            "type": "string"
          },
          "categoryData": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CategoryData"
              }
            ],
            "nullable": true
          },
          "checkNumber": {
            "description": " Present for check deposits and mailed checks; Nothing otherwise.",
            "nullable": true,
            "type": "string"
          },
          "compliantWithReceiptPolicy": {
            "type": "boolean"
          },
          "counterpartyId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionPartyId"
              }
            ]
          },
          "counterpartyName": {
            "type": "string"
          },
          "counterpartyNickname": {
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UTCTime"
              }
            ]
          },
          "creditAccountPeriodId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MercuryCreditAccountStatementPeriodId"
              }
            ],
            "nullable": true
          },
          "currencyExchangeInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyExchangeInfo"
              }
            ],
            "nullable": true
          },
          "dashboardLink": {
            "type": "string"
          },
          "details": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionMethodData"
              }
            ],
            "nullable": true
          },
          "estimatedDeliveryDate": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UTCTime"
              }
            ]
          },
          "externalMemo": {
            "nullable": true,
            "type": "string"
          },
          "failedAt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UTCTime"
              }
            ],
            "nullable": true
          },
          "feeId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionMetadataId"
              }
            ],
            "nullable": true
          },
          "generalLedgerCodeName": {
            "description": " Deprecated: use transactionGlAllocations instead. This field does not reflect GL codes\n assigned via Mercury auto-categorization rules. Preserved for backwards compatibility.",
            "nullable": true,
            "type": "string"
          },
          "glAllocations": {
            "description": " GL code allocations assigned to this transaction via a connected accounting software\n integration (e.g. QuickBooks, Xero, NetSuite). Each allocation has a GL code name and\n the amount allocated to it; amounts sum to the transaction total when the transaction is\n fully categorized. Empty if no GL codes have been assigned. Distinct from Mercury custom\n categories (see transactionCategoryData).",
            "items": {
              "$ref": "#/components/schemas/GlAllocation"
            },
            "type": "array"
          },
          "hasGeneratedReceipt": {
            "type": "boolean"
          },
          "id": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionMetadataId"
              }
            ]
          },
          "kind": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionKind"
              }
            ]
          },
          "merchant": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MerchantData"
              },
              {
                "description": " Merchant information for card transactions, including the merchant category code (MCC),\n merchant ID, Mercury category, and for international transactions, the amount and currency\n in the merchant's local currency. Nothing for non-card transactions."
              }
            ],
            "nullable": true
          },
          "mercuryCategory": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MercuryCategory"
              }
            ],
            "nullable": true
          },
          "note": {
            "nullable": true,
            "type": "string"
          },
          "postedAt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UTCTime"
              }
            ],
            "nullable": true
          },
          "reasonForFailure": {
            "nullable": true,
            "type": "string"
          },
          "relatedTransactions": {
            "items": {
              "$ref": "#/components/schemas/RelatedTransactionData"
            },
            "type": "array"
          },
          "requestId": {
            "nullable": true,
            "type": "string"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionStatus"
              }
            ]
          },
          "trackingNumber": {
            "description": " Present for transactions that have tracking numbers (e.g., RTP, ACH, wires); Nothing otherwise.",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "amount",
          "createdAt",
          "estimatedDeliveryDate",
          "status",
          "counterpartyId",
          "dashboardLink",
          "counterpartyName",
          "kind",
          "compliantWithReceiptPolicy",
          "hasGeneratedReceipt",
          "glAllocations",
          "attachments",
          "relatedTransactions",
          "accountId"
        ],
        "type": "object"
      },
      "TransactionAccountingStatus": {
        "description": " A transaction's accounting review and sync status, for the accounting integration connected\n to the organization (e.g. QuickBooks, Xero, NetSuite).",
        "properties": {
          "erroredAt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UTCTime"
              },
              {
                "description": " When the sync of the transaction to the accounting integration failed. Null if it has not\n failed."
              }
            ],
            "nullable": true
          },
          "excludedAt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UTCTime"
              },
              {
                "description": " When the transaction was excluded from accounting sync. Null if it is not excluded."
              }
            ],
            "nullable": true
          },
          "reviewedAt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UTCTime"
              },
              {
                "description": " When the transaction was last marked as reviewed. Null if it has not been reviewed."
              }
            ],
            "nullable": true
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AccountingSyncStatus"
              },
              {
                "description": " Current review and sync status of the transaction. pending: not reviewed or synced yet,\n including transactions with no accounting activity. reviewed: marked as reviewed and ready to\n sync. syncing: a sync has started but not finished. synced: synced successfully. errored: the\n sync failed. excluded: excluded from accounting sync. When more than one applies, the first of\n excluded, errored, synced, syncing and reviewed wins."
              }
            ]
          },
          "syncStartedAt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UTCTime"
              },
              {
                "description": " When a sync of the transaction to the accounting integration was started. This is the\n start of the sync, not its completion (see syncedAt). Null if no sync has been started."
              }
            ],
            "nullable": true
          },
          "syncedAt": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UTCTime"
              },
              {
                "description": " When the transaction finished syncing to the accounting integration successfully. Null if\n it has not finished syncing."
              }
            ],
            "nullable": true
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "TransactionAttachment": {
        "properties": {
          "attachmentType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TransactionAttachmentType"
              }
            ]
          },
          "fileName": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "fileName",
          "url",
          "attachmentType"
        ],
        "type": "object"
      },
      "TransactionAttachmentType": {
        "enum": [
          "checkImage",
          "receipt",
          "other"
        ],
        "type": "string"
      },
      "TransactionKind": {
        "enum": [
          "externalTransfer",
          "internalTransfer",
          "outgoingPayment",
          "creditCardCredit",
          "creditCardTransaction",
          "debitCardCredit",
          "debitCardTransaction",
          "cardInternationalTransactionFee",
          "cardInternationalTransactionFeeRebate",
          "cardInternationalTransactionFeeReversal",
          "cardInternationalTransactionFeeRebateReversal",
          "incomingDomesticWire",
          "checkDeposit",
          "incomingInternationalWire",
          "treasuryTransfer",
          "currencyCloudReturn",
          "wireFee",
          "personalBankingSubscriptionFee",
          "billingEngineSubscriptionFee",
          "expenseReimbursement",
          "exogenousWireDrawdown",
          "interestPayment",
          "other"
        ],
        "type": "string"
      },
      "TransactionMetadataId": {
        "description": "ID for this transaction",
        "format": "uuid",
        "type": "string"
      },
      "TransactionMethodData": {
        "properties": {
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AddressData"
              }
            ],
            "nullable": true
          },
          "creditCardInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CreditCardInfo"
              }
            ],
            "nullable": true
          },
          "debitCardInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DebitCardInfo"
              }
            ],
            "nullable": true
          },
          "domesticWireRoutingInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DomesticWireRoutingInfo"
              }
            ],
            "nullable": true
          },
          "electronicRoutingInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ElectronicRoutingInfo"
              }
            ],
            "nullable": true
          },
          "internationalWireRoutingInfo": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InternationalWireRoutingInfo"
              }
            ],
            "nullable": true
          }
        },
        "type": "object"
      },
      "TransactionPartyId": {
        "description": "ID for a Mercury account.",
        "format": "uuid",
        "type": "string"
      },
      "TransactionRelationKind": {
        "enum": [
          "ProvisionalCreditReversalToMerchantRefund",
          "MerchantRefundToProvisionalCreditReversal",
          "MerchantRefundToFraudulentCharge",
          "FraudulentChargeToMerchantRefund",
          "PaymentRefundToFailedPayment",
          "FailedPaymentToPaymentRefund",
          "GiftCompensationToOriginalTransaction",
          "FeePaymentToOriginalTransaction",
          "OriginalTransactionToFeePayment",
          "FeePaymentToFeeRebate",
          "FeeRebateToFeePayment",
          "FeePaymentToFeeReversal",
          "FeeReversalToFeePayment",
          "FeeRebateToFeeRebateReversal",
          "FeeRebateReversalToFeeRebate",
          "TreasurySplitLiquidation",
          "ProvisionalCreditToOriginalCharge",
          "OriginalChargeToProvisionalCredit",
          "FeeAtmReimbursementToAtmTransaction",
          "AtmTransactionToFeeAtmReimbursement",
          "AtmTransactionToAtmReimbursementReversal",
          "AtmReimbursementReversalToAtmTransaction",
          "ReturnToOriginalTransaction",
          "OriginalTransactionToReturn",
          "ProvisionalCreditToReversal",
          "ReversalToProvisionalCredit",
          "MerchantRefundToOriginalCharge",
          "OriginalChargeToMerchantRefund"
        ],
        "type": "string"
      },
      "TransactionStatus": {
        "enum": [
          "pending",
          "sent",
          "cancelled",
          "failed",
          "reversed",
          "blocked"
        ],
        "type": "string"
      },
      "USState": {
        "enum": [
          "AL",
          "AK",
          "AZ",
          "AR",
          "CA",
          "CO",
          "CT",
          "DE",
          "DC",
          "FL",
          "GA",
          "HI",
          "ID",
          "IL",
          "IN",
          "IA",
          "KS",
          "KY",
          "LA",
          "ME",
          "MD",
          "MA",
          "MI",
          "MN",
          "MS",
          "MO",
          "MT",
          "NE",
          "NV",
          "NH",
          "NJ",
          "NM",
          "NY",
          "NC",
          "ND",
          "OH",
          "OK",
          "OR",
          "PA",
          "RI",
          "SC",
          "SD",
          "TN",
          "TX",
          "UT",
          "VT",
          "VA",
          "WA",
          "WV",
          "WI",
          "WY"
        ],
        "type": "string"
      },
      "UTCTime": {
        "example": "2016-07-22T00:00:00Z",
        "format": "yyyy-mm-ddThh:MM:ssZ",
        "type": "string"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "description": "Bearer token authentication for Mercury API.\n\nUse your API token in the Authorization header:\n`Authorization: Bearer TOKEN`\n\nExample:\n`Authorization: Bearer secret-token:mercury_production_wma_24SCp4G81X3yHL4Wq8FgzuaP9ye3VKf2mgTDctXyRg5HY_yrucrem`\n\nYour Mercury API token should include the 'secret-token:' prefix.\nTokens can be generated from your Mercury dashboard settings.\n",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Streamline financial tasks with secure account management and transaction processing. Enables user registration, balance tracking, and payment handling.",
    "title": "Mercury API",
    "version": "1.0.0"
  },
  "openapi": "3.0.0",
  "paths": {
    "/account/{accountId}/transactions": {
      "post": {
        "description": "Send money from an account to a recipient. Creates a transaction that will be processed immediately or may require approval.",
        "operationId": "createTransaction",
        "parameters": [
          {
            "in": "path",
            "name": "accountId",
            "required": true,
            "schema": {
              "description": "ID for a Mercury account.",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostTransactionAPIRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            },
            "description": ""
          },
          "400": {
            "description": "Invalid `body`"
          },
          "404": {
            "description": "`accountId` not found"
          }
        },
        "summary": "Send money to a recipient",
        "tags": [
          "Accounts"
        ]
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "description": "Mercury API URL",
      "url": "https://api.mercury.com/api/v1"
    }
  ],
  "tags": [
    {
      "description": "Manage bank accounts",
      "name": "Accounts"
    }
  ]
}
```