## Overview

Let's assume you want to send $10 using a wire transfer. This could be paying a vendor, paying an employee salary, moving funds between corporate accounts, etc. To do so, we will need to create a [Payment Order](🔗) with a [Counterparty](🔗).

Before making requests, you will need your API Key and Organization ID. To find these, you can follow this guide: [Retrieve your API Key](🔗)

## 1. Retrieve your Internal Account ID

Internal Accounts

Modern Treasury uses the term Internal Account to refer to your bank accounts. Your customer, vendors, and employee's bank accounts are called External Accounts.

When you create a payment order, you must specify which account you want the transaction to originate from. If you are sending someone money, this is the account that the money will be taken out of.

To get an Internal Account ID, you can pick one from [your accounts page](🔗). Any of the IDs will work for testing, although you can refer to [Internal Accounts](🔗) to see the differences in how the test banks process payments.

If you want to [get all the internal accounts using the API](🔗) , you can issue the following request:

You will receive an array of all your internal accounts. For this example, we'll just use one of the account IDs to originate the payment order from. In this response, we'll use the first one, `0f8e3719-3dfd-4613-9bbf-c0333781b59f`.

Sandbox Setup

For more information on how we've set up your accounts, visit our [Sandbox Details](🔗) guide.

## 2. Create a Counterparty

Counterparties need different information depending on how you want to use them. In the case we want to send them money using a wire transfer, we need to ensure the customer has an account number, a `routing_number`, and an address.

Note that the response returns a new Counterparty object with 1 attached external account. You will need the ID of the external account (`5acec2ef-987b-4260-aa97-b719eeb0a8d5`) for the next step.

## 3. Create a Payment Order

To create a payment order, you will use your Internal Account ID (`0f8e3719-3dfd-4613-9bbf-c0333781b59f`) as the `originating_account_id` and the counterparty's Account ID (`5acec2ef-987b-4260-aa97-b719eeb0a8d5`) as the `receiving_account_id`.

This is the response you will see. It contains the ID of the payment order, `c5f4009c-bdd6-4cc1-84b2-17974ac9e77a`, as well as additional details about it.

## Optional: Handle post-creation events

Modern Treasury sends a number of useful events once your Payment Order is created. Use the Dashboard, [Webhooks](🔗), or a third party solution to receive these events and perform actions like notifying the counterparty of the transfer, knowing when the purchase order is complete, or determining when and why a return occurred.