# Outgoing Transfers

You may send international wire transfers in `USD` or any other supported currencies. Our daily cutoff time for international outgoing wires is `4:30pm ET`. Any outgoing transfer requests received on non-banking dates, or after the cutoff time on banking dates, will be settled on the next banking dates. For example, an outgoing transfer request received at `4:31pm ET` on Monday will be settled on Tuesday.

## Create Your Counterparty

Similar to domestic wire transfers, you must create [counterparties](/api/counterparty/create-a-counterparty) with the banking information of beneficiaries. Please refer to [Country-specific Details](/international-wires/country-specific-details) for requirements.

- `routing_number`: a valid SWIFT BIC of the beneficiary bank.
- `routing_number_type`: `bic`.
- `account_number`: based on the country of the beneficiary, it may be an IBAN number or any special format of account numbers used in that country.
- `wire`: all optional fields in this object are highly recommended to avoid payment delays or returns. Some fields are required based on the country of the beneficiary.

```bash
curl https://api.column.com/counterparties \
  -XPOST \
  -u :<YOUR API KEY> \
  -d routing_number="BKENGB20" \
  -d routing_number_type="bic" \
  -d account_number="GB29NWBK60161331926819" \
  -d description="international_cpty" \
  -d "wire[beneficiary_name]"="John Doe" \
  -d "wire[beneficiary_phone]"="+44-(0)1223-333300" \
  -d "wire[beneficiary_email]"="john.doe@gmail.com" \
  -d "wire[beneficiary_legal_id]"="GB1245643234" \
  -d "wire[beneficiary_type]"="sole_proprietor" \
  -d "wire[local_bank_code]"="GB123456" \
  -d "wire[local_account_number]"="876545678" \
  -d "wire[beneficiary_address][line_1]"="96 Lairg Road" \
  -d "wire[beneficiary_address][city]"="New Winton" \
  -d "wire[beneficiary_address][postal_code]"="EH33 5ZN" \
  -d "wire[beneficiary_address][country_code]"="GB"
```

## Send Transfers in USD

If you send international wire transfers in `USD`, there is no foreign currency exchange on Column's end.

#### Warning

If beneficiary accounts cannot hold funds in `USD`, their banks will exchange funds in `USD` to funds in local currencies using foreign currency exchange rates when they receive funds. Please make sure to confirm that the beneficiary's bank account can accept the currency you are sending.

```bash
curl https://api.column.com/transfers/international-wire \
  -XPOST \
  -u :<YOUR API KEY> \
  -d amount=100000 \
  -d currency_code=USD \
  -d bank_account_id=bacc_xxx \
  -d counterparty_id=cpty_xxx \
  -d description="first SWIFT transfer in USD" \
  -d "remittance_info[general_info]"="Invoice ID 123" \
  -d message_to_beneficiary_bank="please contact with the beneficiary"
```

## Send Transfers in Foreign Currencies

If you send international wire transfers in foreign currencies, we will need to request foreign exchange quotes to lock exchange rates. Column works with multiple correspondent banks to ensure we provide the best exchange rates.

### Foreign Exchange Quotes

Each foreign exchange quote has two important deadlines:

- Expiration Time (`expired_at`)
  - If a quote has not been booked yet, you must book it before it expires by either using the quote in an outgoing transfer request before the quote expires (Option 2 below) or setting `book_directly=true` when you call our FX Quote API (Option 3 below). Quotes will expire after a few minutes if they are not booked. After a quote is booked, its expiration time will be updated to the deadline to use it to initiate an outgoing transfer.
  - If a quote has already been booked, you must use it to initiate an outgoing transfer before it expires. Booked quotes will expire after 16:30 ET on their rate dates.

- Rate Date (`rate_date`): after a quote is booked, you will have a few days (usually two banking business days) to use the quote to initiate outgoing transfers. Set an explicit rate date in the future when you call our FX Quote API, else the `rate_date` will be set to today.

#### Specifying Currency

The `currency_code` specified should be the currency the beneficiary will receive. If you specify `USD` as the `currency_code` we will discard the specified FX quote, and instead send the transfer in USD. Your FX quote will not be used.

You have the following options to query or book foreign exchange quotes when initiating outgoing transfers through Column:

- Skip quote querying and booking. This is the simplest option as you don't need to call our FX Quote API. Simply initiate an outgoing transfer without a `fx_quote_id` and Column will automatically query and book a quote for your transfer in real time.
- Query a quote without booking the quote. This option is best if you need to show foreign exchange quotes to your users to accept. Upon querying, if the quote is accepted, you can pass Column the `fx_quote_id` when you initiate an outgoing transfer before the quote expiration time. Column will automatically book that rate for your transfer. If you do not accept this quote, you can ignore the `fx_quote_id`. If you initiate an outgoing transfer after the quote expiration time, the transfer will fail and you will need to book a new quote or initiate a transfer without a quote.
- Book quotes for future dates and use them to initiate outgoing transfers before end of business on the rate date. This option is best if outgoing funds are not yet available in an account. Set `book_directly=true` and provide an explicit `rate_date` one or two business days in the future. This quote will be valid for use until `4:30pm` EST on the rate date.

To book quotes for future dates provide a `rate_date` in your request:

```bash
curl https://api.column.com/transfers/international-wire/fx-rate \
  -XPOST \
  -u :<YOUR API KEY> \
  -d buy_currency_code=CNY \
  -d buy_amount=100000\
  -d book_directly=true \
  -d rate_date="2023-04-03"
```

#### Warning

A FX quote should be booked only with the intention of completing a transfer. If you do not intend to use a booked FX quote, it should be canceled as soon as possible. You may incur costs associated with canceling booked FX quotes given FX rate fluctuations. For example, if you booked an FX quote for `EUR 10,000` (equivalent to `USD 11,000`), but later canceled it when `EUR:USD` exchange rate dropped to `1:1.05`, you will incur a loss of `USD 500`.

Column will automatically cancel any FX quotes that are not used yet after their expirations (i.e., after their `expired_at` timestamps).

If the requested `rate_date` is too far in the future, you will get the following error:

```json
{
  "code": "fx_quote_rate_date_too_far",
  "details": {
    "max_rate_date": "2023-04-13"
  },
  "documentation_url": "https://docs.column.com/api/international-wire/request-a-fx-quote",
  "message": "Field rate_date is beyond the maximum allowed future date. Please use an earlier business day.",
  "type": "transfer_error"
}
```

### Example: Send Transfer Without Quote

```bash
curl https://api.column.com/transfers/international-wire \
  -XPOST \
  -u :<YOUR API KEY> \
  -d amount=100000 \
  -d currency_code=JPY \
  -d bank_account_id=bacc_xxx \
  -d counterparty_id=cpty_xxx \
  -d description="SWIFT transfer in JPY without booking FX quote explicitly" \
  -d "remittance_info[general_info]"="Invoice ID 123" \
  -d message_to_beneficiary_bank="please contact with the beneficiary"
```

### Example: Send Transfer With Quote

Once you request a foreign exchange quote, you can pass its ID as `fx_quote_id` in your transfer request. Each foreign exchange quote can be used only once, and its amount and currency must be the same as the amount and currency in the transfer request.

```bash
curl https://api.column.com/transfers/international-wire \
  -XPOST \
  -u :<YOUR API KEY> \
  -d amount=100000 \
  -d currency_code=CNY \
  -d bank_account_id=bacc_xxx \
  -d counterparty_id=cpty_xxx \
  -d description="first SWIFT transfer in CNY" \
  -d fx_quote_id=fxqt_xxx \
  -d "remittance_info[general_info]"="Invoice ID 123" \
  -d message_to_beneficiary_bank="please contact with the beneficiary"
```

## Raw Outgoing Messages

All important data of outgoing transfer messages will be processed and populated in international wire transfer objects. You can also fetch raw outgoing messages if necessary using the query parameter `expand=raw_message`.

```bash
curl https://api.column.com/transfers/international-wire/swft_xxx?expand=raw_message \
  -u :<YOUR API KEY>
```
