# Convert ARS to USD and wire it abroad

> How an Argentine company receives pesos, previews an ARS to USD conversion, converts and wires the dollars over SWIFT or Fedwire to its own bank account abroad, from which it pays overseas suppliers. Funding endpoints, conversions, withdrawal destinations and withdrawals.

Source: https://business-api-docs.youhodler.com/use-cases/ars-to-usd-abroad

> **Status: In the API.** Every step is in the public API contract, and sandbox-only steps are marked.

An Argentine company that earns in pesos has to pay suppliers abroad in US
dollars. With the Business API it receives ARS into its own account, converts
the pesos to USD after a non-binding preview, and wires the dollars over SWIFT
or a US domestic wire to its own bank account abroad, from which it pays the
supplier. Each step is an operation you can track, approve
and reconcile.

This guide is for finance and payments teams deciding whether the flow fits,
and for the developer who builds it.

> **Who receives the wire:** A USD bank payout goes to a bank account held in your own company's name. The payout provider registers each destination as your company's account and sends the wire with your company's verified legal name as the beneficiary, whatever `beneficiary_name` the destination carries. So this flow moves dollars to your company's bank account abroad, and you pay the supplier from that account. Paying a supplier's bank account directly is not supported.

## At a glance

| Question | Answer |
| --- | --- |
| Where the pesos arrive | An Argentine CVU issued to your account (`fiat_rail`: `local_bank_transfer`) |
| Conversion | ARS to USD. Read the current limits from `GET /conversion-pairs` |
| Where the dollars go | Over SWIFT (`swift`) or US domestic wire (`fedwire`) to a bank account in your company's name, registered once |
| Which account pays | Your company's master account (console: Master Account, often named "Treasury"). A client account cannot register a USD bank destination |
| What the bank receives | `amount` minus the payout fee. The fee is deducted from the amount you send |
| Controls | Approval policies, compliance review, idempotent retries, step-up confirmation for people |
| Tracking | Operation statuses, webhooks, balances and activity exports |

## Before you start

- **Sandbox access and an API key.** Create a service account in the console
under **API Keys** with these capabilities: `funding_endpoints.provision`,
`funding_endpoints.read`, `kyc.verify`, `accounts.read`,
`conversions.create`, `conversions.read`,
`withdrawal_destinations.create`, `withdrawal_destinations.read`,
`withdrawals.create` and `withdrawals.read`. Add `sandbox_simulator.run` and
`enterprises.read` for the sandbox steps (the walkthrough reads your
enterprise until it is `operational`) and `webhooks.create` if you subscribe
to events. See
[Authentication](/integrations/authentication) for the access token.
- **Company verification (KYB) is complete.** An Argentine company also
completes the international-account intake before it can hold USD bank
details: call `POST /kyc/international-intake/prepare` (capability
`kyc.verify`), then finish the questionnaire in the verification widget.
Until then `GET /funding-routes/readiness?account_ref=<your master account>`
lists the USD routes with the reason
`fiat_international_verification_required`. See [KYC](/api/reference/kyc).
- **Your master account reference.** List it with
`GET /master-accounts?scope_ref=enterprises/<enterprise_id>`; the reference
has the form `master-accounts/<id>`.
- **USD bank details on the same master account.** Create a USD funding
endpoint (`fiat_rail`: `swift` or `fedwire`) as in Step 1. Dollar payouts
leave from this USD account, so a USD bank destination cannot be registered
until the master account has one. In the console this is
**Fiat Funding → Get bank details**.
- **Worth reading first:** [Accounts](/concepts/accounts),
[Funding endpoints](/concepts/funding-endpoints),
[Conversions and pricing](/concepts/conversions-and-pricing),
[Withdrawal destinations](/concepts/withdrawal-destinations),
[Policies and approvals](/concepts/policies-and-approvals) and
[Transaction lifecycle and webhooks](/guides/transaction-lifecycle).
[Coverage](/coverage) lists the currencies, rails and operations.

## How it works

```mermaid
sequenceDiagram
  participant You as Your system
  participant API as Business API
  participant Bank as Your bank abroad
  participant Supplier as Supplier
  You->>API: POST /funding-endpoints (ARS CVU)
  Note over You,API: Customers or your local bank send ARS to the CVU
  You->>API: POST /conversions/preview (ARS to USD)
  You->>API: POST /conversions
  API-->>You: operations.conversion.settled.v1
  You->>API: POST /withdrawal-destinations (your USD bank account, once)
  You->>API: POST /withdrawals (USD, fiat)
  API->>Bank: SWIFT or Fedwire payment
  API-->>You: operations.withdrawal.settled.v1
  Bank->>Supplier: You pay the invoice from your bank
```

1. Get an Argentine CVU for your master account and receive pesos into it.
2. Check that the ARS to USD pair is active and preview the conversion.
3. Convert ARS to USD in the same master account.
4. Register your company's USD bank account abroad once as a withdrawal
destination.
5. Send a USD withdrawal to that destination.
6. Follow each operation to a final status through reads or webhooks.
7. Pay the supplier's invoice from your bank account. This last step happens
at your bank, outside the Business API.

Every `POST` below takes an `Idempotency-Key` header. Send a new key for each
new action and the same key when you retry it; a different body under a used
key returns `409 idempotency_conflict`.

## Step 1 — Receive pesos

Create an ARS funding endpoint on your master account. It issues a CVU that
any Argentine bank can transfer to.

```http
POST https://b2b2x-sandbox.youhodler.com/api/funding-endpoints
Authorization: Bearer <access_token>
Idempotency-Key: ars-cvu-001
Content-Type: application/json

{
  "rail_class": "fiat",
  "account_ref": "master-accounts/00000000-0000-4000-8000-000000000001",
  "routing": {
    "asset": "ARS",
    "fiat_rail": "local_bank_transfer"
  }
}
```

Read the endpoint with
`GET /funding-endpoints/<funding_endpoint_id>?account_ref=<account_ref>&rail_class=fiat`
until `status` is `active`. The CVU is `account_number` inside
`fiat_routing.bank_details`. A CVU carries its own legal terms; the
[sandbox guide](/guides/sandbox-testing#1-create-an-ars-funding-endpoint)
explains how a person accepts them (a service-account token skips that check)
and what `failed` with `party_profile_incomplete` or `party_not_supported`
means.

Create the USD funding endpoint from the prerequisites the same way, with
`"asset": "USD"` and `"fiat_rail": "swift"` or `"fedwire"`.

Once pesos arrive, check the balance:

```http
GET https://b2b2x-sandbox.youhodler.com/api/master-accounts/00000000-0000-4000-8000-000000000001/balances?asset=ARS
Authorization: Bearer <access_token>
```

Spend from `available`. Funds under a hold appear in `held`, and
`total` = `available` + `held`.

**In the console:** the CVU is under **Fiat Funding**, the incoming transfer
under **Operations**, and the balance under **Balances**.

## Step 2 — Check the pair and preview the rate

Confirm that the ARS to USD pair is active and read its limits:

```http
GET https://b2b2x-sandbox.youhodler.com/api/conversion-pairs?source_currency=ARS&target_currency=USD
Authorization: Bearer <access_token>
```

The item carries `active`, `min_source_amount` and `max_source_amount` (in
ARS). The pair list is the platform's catalog: it does not promise that your
account can convert, or at which rate. Preview the conversion for your account
to see the economics:

```http
POST https://b2b2x-sandbox.youhodler.com/api/conversions/preview
Authorization: Bearer <access_token>
Idempotency-Key: ars-usd-preview-001
Content-Type: application/json

{
  "account_ref": "master-accounts/00000000-0000-4000-8000-000000000001",
  "from_amount": {
    "value": "5000000.00",
    "currency": "ARS"
  },
  "to_currency": "USD"
}
```

Read `economics`: `source_gross_amount` is what leaves the ARS balance,
`fee_summary` is the conversion fee taken from it, `source_principal_amount`
is what is converted, and `target_amount` is the USD you receive. The preview
is not a quote: `binding` is always `false`, it reserves nothing, and the
conversion may recompute the rate and fees when it runs. See
[Conversions and pricing](/concepts/conversions-and-pricing).

## Step 3 — Convert ARS to USD

Submit the conversion with the same fields:

```http
POST https://b2b2x-sandbox.youhodler.com/api/conversions
Authorization: Bearer <access_token>
Idempotency-Key: ars-usd-conversion-001
Content-Type: application/json

{
  "account_ref": "master-accounts/00000000-0000-4000-8000-000000000001",
  "from_amount": {
    "value": "5000000.00",
    "currency": "ARS"
  },
  "to_currency": "USD"
}
```

The response is `202` with the operation: `id`, `status`, and, once known,
`target_amount`, `applied_rate` and `fee_summary`. Follow it with
`GET /conversions/<conversion_id>` until `status` is `settled`, then read the
USD balance with `GET /master-accounts/<id>/balances?asset=USD`.

A person's token, unlike a service account's, also needs an `X-Action-Token`
header: issue it with `POST /action-tokens` and the body
`{"action": "conversion.create", "command": <the same conversion body>}`. See
[Action tokens](/api/reference/action-tokens).

**In the console:** the conversion appears under **Operations**; people can
also start one from **Balances → Convert**. If a policy requires approval, the
conversion waits in **Approvals** with status `pending_approval`.

## Step 4 — Register your USD bank account abroad

Register your company's bank account once as a fiat withdrawal destination on
the master account and reuse it for every transfer. A fiat destination needs
an `Idempotency-Key` (header or body `idempotency_key`).

For an account with an IBAN, paid over SWIFT:

```http
POST https://b2b2x-sandbox.youhodler.com/api/withdrawal-destinations
Authorization: Bearer <access_token>
Idempotency-Key: own-usd-account-001
Content-Type: application/json

{
  "rail_class": "fiat",
  "account_ref": "master-accounts/00000000-0000-4000-8000-000000000001",
  "fiat_routing": {
    "fiat_rail": "swift",
    "method": "bank_transfer",
    "currency": "USD",
    "beneficiary_name": "Importadora Ejemplo SA",
    "reference_hint": "Treasury transfer",
    "bank_coordinates": {
      "scheme": "iban",
      "iban": "DE89370400440532013000",
      "bic": "COBADEFFXXX",
      "account_holder_name": "Importadora Ejemplo SA",
      "bank_name": "Commerzbank AG",
      "country": "DE",
      "bank_address": {
        "lines": ["Kaiserplatz"],
        "city": "Frankfurt am Main",
        "region": null,
        "postal_code": "60311",
        "country": "DE"
      }
    }
  }
}
```

Use your company's legal name as `beneficiary_name` and
`account_holder_name`. `bic` and `bank_address` may be `null` in the schema,
but a `swift` destination is refused without them. Give the bank address in at
most two `lines`.

Other bank account shapes use `"scheme": "local_account"` with
`account_number` and `routing_codes`:

| Your bank account | `fiat_rail` | `bank_coordinates` |
| --- | --- | --- |
| Abroad, with an IBAN | `swift` | `scheme: "iban"`, `iban`, `bic`, `bank_address` |
| Abroad, without an IBAN | `swift` | `scheme: "local_account"`, `account_number`, `routing_codes`, `bic`, `bank_address` |
| In the United States | `fedwire` | `scheme: "local_account"`, `account_number`, `routing_codes` with exactly one ABA routing number (`{"type": "aba", "value": "<9 digits>"}`), `account_type` (`checking` or `savings`) |

The response is `201` with the destination `id` and `status`. The payout
provider reviews a new bank account before it can be used, and the destination
is `disabled` during that review. Read it until `status` is `active`:

```http
GET https://b2b2x-sandbox.youhodler.com/api/withdrawal-destinations/<destination_id>?rail_class=fiat&account_ref=master-accounts/00000000-0000-4000-8000-000000000001
Authorization: Bearer <access_token>
```

There is no webhook for the review result; poll the destination.

A destination that cannot be set up is refused with `422` and the code
`provisioning_rejected`. `data.reason` says why:

| `data.reason` | Cause | What to do |
| --- | --- | --- |
| `payout_account_not_supported` | `account_ref` is a client account | Register the destination on the master account |
| `payout_funding_details_required` | The master account has no bank details in that currency | Create the USD funding endpoint first |
| `payout_bank_details_incomplete` | A field the rail needs is missing, or the bank address does not fit | Add `bic`, `bank_address`, the ABA code or `account_type` as in the table above |
| `payout_verification_required` | Your company is not yet approved for USD bank accounts | Complete KYB and the international-account intake |

Use `POST /withdrawal-destinations/<destination_id>/disable` to stop new
payouts to an account and `/retire` to remove it for good.

**In the console:** registered bank accounts are used for external payouts
under **Payments → Payout (External)**.

## Step 5 — Send the dollars

The payout fee is deducted from the amount you send: your USD balance is
debited `amount`, and the bank receives `amount` minus the fees. Preview the
fee first when the received amount matters:

```http
POST https://b2b2x-sandbox.youhodler.com/api/fee-previews
Authorization: Bearer <access_token>
Idempotency-Key: usd-transfer-2026-117-fee
Content-Type: application/json

{
  "subject_ref": "master-accounts/00000000-0000-4000-8000-000000000001",
  "operation_type": "withdrawal_fiat",
  "service_type": "withdrawal_fiat",
  "principal_amount": {
    "value": "3200.00",
    "currency": "USD"
  }
}
```

`fee_preview.fee_summary.total` is the fee for that amount. To have a given
sum arrive, raise `amount` until `amount` minus the previewed fee equals it.
The preview is not binding: the fee is computed again when the payout runs.

Then send the withdrawal to the stored destination. The bank details come from
the destination, never from this request:

```http
POST https://b2b2x-sandbox.youhodler.com/api/withdrawals
Authorization: Bearer <access_token>
Idempotency-Key: usd-transfer-2026-117
Content-Type: application/json

{
  "account_ref": "master-accounts/00000000-0000-4000-8000-000000000001",
  "rail": "fiat",
  "withdrawal_destination_id": "aaaaaaa1-aaaa-4aaa-8aaa-aaaaaaaaaaa1",
  "amount": {
    "value": "3200.00",
    "currency": "USD"
  }
}
```

Derive the idempotency key from your own payment reference, so a retry after a
timeout cannot send the same transfer twice. USD takes at most two decimal
places; more digits return `400 invalid_request` with `data.reason`
`amount_scale_exceeded` before anything is held.

The response is `202` with the operation `id`, `status`, `principal_amount`
and `fee_summary`. As with conversions, a person's token needs an
`X-Action-Token` issued with `"action": "withdrawal.create"` and the same
withdrawal body.

**In the console:** the payout appears under **Payments** and **Operations**.

## Handle the outcome

Conversions and withdrawals share one status list, but each uses only part
of it. A withdrawal ends as `settled`, `failed` or `cancelled`. A conversion
can also end as `partially_settled`.

| Status | Reported by | Meaning | Console label |
| --- | --- | --- | --- |
| `requested` | Both | Accepted, checks not finished | — |
| `pending_approval` | Both | A policy requires a person to approve it | Shown in **Approvals** |
| `pending_compliance` | Both | Held for compliance review | In compliance review |
| `admissible` | Conversion | Passed the checks and running | Ready to process |
| `executing` | Withdrawal | Passed the checks; the amount is held and the payout is with the bank rail until the bank confirms | Processing |
| `settled` | Both | Final: funds converted or delivered | Settled |
| `failed` | Both | Final: read `failure_reason`. A failed withdrawal releases the held amount back to `available` | Failed |
| `cancelled` | Both | Final: cancelled while it waited for approval or compliance | Cancelled |
| `partially_settled` | Conversion | Final: part of the conversion settled and the rest did not. Read the operation and the balances before retrying | — |
The enum has three more values you will not see here: `pending_admission`
belongs to deposits, and the platform does not set `executed` or
`ledger_visible` today. If you ever read one of those two, treat it as not
final and keep reading.

Treat only `settled` as done. The public event catalog has no event for
`partially_settled`, so read the conversion if no final event arrives. [Transaction lifecycle and webhooks](/guides/transaction-lifecycle)
covers the statuses and events of every operation family.

**Webhooks.** Subscribe through
[Webhook subscriptions](/api/reference/webhook-subscriptions) to
`operations.conversion.settled.v1`, `operations.conversion.failed.v1`,
`operations.withdrawal.settled.v1` and `operations.withdrawal.failed.v1`, and
to the `pending_approval` and `pending_compliance` events of both families if
your team needs to act on them. After an approval, a withdrawal emits
`operations.withdrawal.executing.v1` and a conversion
`operations.conversion.approved.v1`. `GET /events/types` (capability `events.read`)
lists the current catalog. After an event, read the operation for its current
state.

**Cancelling.** `POST /conversions/<id>/cancel` (capability
`conversions.manage`) and `POST /withdrawals/<id>/cancel` (capability
`withdrawals.manage`) work only while the operation waits in
`pending_approval` or `pending_compliance`. Once it is `admissible` or
`executing`, the call answers `409 state_conflict` with `data.reason`
`operation_not_cancellable`.

**Common errors.**

| Response | Cause | What to do |
| --- | --- | --- |
| `400` `action_token_required` or `action_token_rejected` | A person's token without a valid `X-Action-Token` | Issue a fresh action token for exactly this body |
| `400` `invalid_request`, `amount_scale_exceeded` | Too many decimal places | Round USD to two decimals |
| `403` | The key lacks a capability or the account is outside its scope | Add the capability listed in Before you start |
| `409` `idempotency_conflict` | A used key with a different body | Use a new key for a new action |
| `422` `not_admissible` or `unsupported_currency` | The account, route or policy does not allow the operation; see `data.reason` | Fix the setup named in `data.reason` |
| `422` `provisioning_rejected` | The bank destination cannot be set up | See the reasons in Step 4 |

See [Errors](/concepts/errors).

**Reconciling.** List operations per account with
`GET /withdrawals?account_ref=<account_ref>` and
`GET /conversions?account_ref=<account_ref>`, compare with the balances, and
use `POST /operations-activity-exports` (capability
`operations_reports.create_export`) for a period report (console:
**Reporting**).
[Smart treasury and international payments](/use-cases/treasury-and-international-payments#reconcile)
shows the export calls.

## Test it on sandbox

> **Status: Sandbox-only.** The `/sandbox/*` routes below return 404 in production and need the capability `sandbox_simulator.run`.

Each simulation returns `202` with a `simulation_id`, which is not an
operation ID: follow the ordinary reads. Full details are in
[Sandbox testing](/guides/sandbox-testing).

1. **Approve your company.** Sandbox-only Start verification
with `POST /kyc/access-token`, then call
`POST /sandbox/enterprises/<enterprise_id>/kyb-review` with
`{"outcome": "approved"}`. It fills missing company data with synthetic
Argentine details and approves every level in one call. Read
`GET /enterprises/<enterprise_id>` until `admission_state` is
`operational`, usually about two minutes; the
[Quickstart](/quickstart#2-find-your-scope-reference) lists the states in
between.
2. **Complete the international-account intake.** Sandbox-only
Call `POST /kyc/international-intake/prepare`, then run the same
`kyb-review` simulation again. The intake is a separate level that
`prepare` adds after the company's verification, so the first call did not
cover it; this call fills and approves it. `GET /funding-routes/readiness`
should no longer show `fiat_international_verification_required` for USD.
3. **Activate the USD bank details.** Sandbox-only If the USD
funding endpoint stays under review, call
`POST /sandbox/funding-endpoints/<funding_endpoint_id>/issuance-review`
with `rail_class`, `account_ref` and `"outcome": "approved"`.
4. **Simulate the incoming pesos.** Sandbox-only

   ```http
   POST https://b2b2x-sandbox.youhodler.com/api/sandbox/funding-endpoints/<ars_funding_endpoint_id>/incoming-transfers
   Authorization: Bearer <access_token>
   Idempotency-Key: ars-deposit-001
   Content-Type: application/json

   {
     "rail_class": "fiat",
     "account_ref": "master-accounts/00000000-0000-4000-8000-000000000001",
     "amount": {
       "value": "5000000.00",
       "currency": "ARS"
     }
   }
```

5. **Approve the bank destination.** Sandbox-only Call
`POST /sandbox/withdrawal-destinations/<destination_id>/review` with
`{"account_ref": "<master account ref>", "outcome": "approved"}`, then read
the destination until it is `active`.
6. **Settle the payout.** Sandbox-only Once the withdrawal's
`status` is `executing`, call
`POST /sandbox/withdrawals/<withdrawal_id>/settlement` with
`{"outcome": "settled"}`, or `{"outcome": "failed", "reason": "Sandbox test"}`
to test the failure path. A `409 simulation_target_not_ready` means the
provider has not accepted the payment yet; retry with the same
`Idempotency-Key` after a few seconds.

Normal screening, admission and approval controls still run on sandbox. There
is no simulation for a compliance decision: if a conversion or payout stops at
`pending_compliance`, contact your YouHodler representative.

## Related

- [Smart treasury and international payments](/use-cases/treasury-and-international-payments):
balances, sweeps, conversions and reconciliation around this flow
- [Coverage](/coverage): supported assets, networks, rails and operations
- [Transaction lifecycle and webhooks](/guides/transaction-lifecycle)
- [Example apps](/examples): the treasury dashboard previews and runs
conversions against the same endpoints
- [Sandbox testing](/guides/sandbox-testing): currencies, providers and every simulation
- [Conversions and pricing](/concepts/conversions-and-pricing),
[Withdrawal destinations](/concepts/withdrawal-destinations),
[Policies and approvals](/concepts/policies-and-approvals)
- API reference: [Conversions](/api/reference/conversions),
[Withdrawal destinations](/api/reference/withdrawal-destinations),
[Withdrawals](/api/reference/withdrawals),
[Funding endpoints](/api/reference/funding-endpoints)
