Convert ARS to USD and wire it abroad
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.
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.createandwithdrawals.read. Addsandbox_simulator.runandenterprises.readfor the sandbox steps (the walkthrough reads your enterprise until it isoperational) andwebhooks.createif you subscribe to events. See 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(capabilitykyc.verify), then finish the questionnaire in the verification widget. Until thenGET /funding-routes/readiness?account_ref=<your master account>lists the USD routes with the reasonfiat_international_verification_required. See KYC. - Your master account reference. List it with
GET /master-accounts?scope_ref=enterprises/<enterprise_id>; the reference has the formmaster-accounts/<id>. - USD bank details on the same master account. Create a USD funding
endpoint (
fiat_rail:swiftorfedwire) 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, Funding endpoints, Conversions and pricing, Withdrawal destinations, Policies and approvals and Transaction lifecycle and webhooks. Coverage lists the currencies, rails and operations.
How it works
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
- Get an Argentine CVU for your master account and receive pesos into it.
- Check that the ARS to USD pair is active and preview the conversion.
- Convert ARS to USD in the same master account.
- Register your company's USD bank account abroad once as a withdrawal destination.
- Send a USD withdrawal to that destination.
- Follow each operation to a final status through reads or webhooks.
- 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.
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
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:
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:
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:
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.
Step 3 — Convert ARS to USD
Submit the conversion with the same fields:
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.
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:
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:
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:
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:
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
covers the statuses and events of every operation family.
Webhooks. Subscribe through
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.
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
shows the export calls.
Test it on sandbox
Each simulation returns 202 with a simulation_id, which is not an
operation ID: follow the ordinary reads. Full details are in
Sandbox testing.
-
Approve your company. Sandbox-only: Works on sandbox only. These routes return 404 in production. Start verification with
POST /kyc/access-token, then callPOST /sandbox/enterprises/<enterprise_id>/kyb-reviewwith{"outcome": "approved"}. It fills missing company data with synthetic Argentine details and approves every level in one call. ReadGET /enterprises/<enterprise_id>untiladmission_stateisoperational, usually about two minutes; the Quickstart lists the states in between. -
Complete the international-account intake. Sandbox-only: Works on sandbox only. These routes return 404 in production. Call
POST /kyc/international-intake/prepare, then run the samekyb-reviewsimulation again. The intake is a separate level thatprepareadds after the company's verification, so the first call did not cover it; this call fills and approves it.GET /funding-routes/readinessshould no longer showfiat_international_verification_requiredfor USD. -
Activate the USD bank details. Sandbox-only: Works on sandbox only. These routes return 404 in production. If the USD funding endpoint stays under review, call
POST /sandbox/funding-endpoints/<funding_endpoint_id>/issuance-reviewwithrail_class,account_refand"outcome": "approved". -
Simulate the incoming pesos. Sandbox-only: Works on sandbox only. These routes return 404 in production.
-
Approve the bank destination. Sandbox-only: Works on sandbox only. These routes return 404 in production. Call
POST /sandbox/withdrawal-destinations/<destination_id>/reviewwith{"account_ref": "<master account ref>", "outcome": "approved"}, then read the destination until it isactive. -
Settle the payout. Sandbox-only: Works on sandbox only. These routes return 404 in production. Once the withdrawal's
statusisexecuting, callPOST /sandbox/withdrawals/<withdrawal_id>/settlementwith{"outcome": "settled"}, or{"outcome": "failed", "reason": "Sandbox test"}to test the failure path. A409 simulation_target_not_readymeans the provider has not accepted the payment yet; retry with the sameIdempotency-Keyafter 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: balances, sweeps, conversions and reconciliation around this flow
- Coverage: supported assets, networks, rails and operations
- Transaction lifecycle and webhooks
- Example apps: the treasury dashboard previews and runs conversions against the same endpoints
- Sandbox testing: currencies, providers and every simulation
- Conversions and pricing, Withdrawal destinations, Policies and approvals
- API reference: Conversions, Withdrawal destinations, Withdrawals, Funding endpoints