Sells amount of the account's coin (at least the account's fiatMinimums for currency, the quote's minimum) and pays the proceeds to destination in currency, from either coin and whatever IBANs the company has: EUR by SEPA (VirtualIbanDestination), USD to a US bank account (rail: us_domestic) or abroad by SWIFT (rail: swift) (VirtualIbanUSDDestination).

Where it may go: name one of the account's approved bank accounts (withdrawals.fiatDestinations) in destinationId; destination then carries only reason and reference. Only when the account says withdrawals.fiatOtherDestination: true may you give a bank account yourself in destination instead; otherwise that is invalid_request with a detail, and so is a destinationId that is not an approved account of the company for currency. A currency without an approved account is not offered while other bank accounts are off. A destination of the other currency's shape is invalid_request; for a USD destination detail names the field (destination.routingNumber must be a valid 9-digit ABA routing number). Offered in the currencies the account lists in withdrawals.fiatCurrencies. amount plus the fee in the coin is reserved at once and spent when the payout settles; the amount paid out is what the sale yields, shown as fiatAmount once completed. It takes hours, up to a day. Retries are safe with the same Idempotency-Key.

Parameters

NameInTypeRequiredDescription
companyId path string (uuid) yes

Your company that Payca enabled for Virtual IBAN.

accountId path string (uuid) yes

The id of one of your crypto accounts, from GET …/crypto-accounts.

Idempotency-Key header string yes

Your unique key for this operation, 1–128 characters. The same key returns the same result; a different body under it is idempotency_conflict.

Request body

application/json · object · required

FieldTypeRequiredDescription
amount VirtualIbanAmount yes
currency string yes

The currency paid out; it decides the shape of destination.

destination VirtualIbanDestination or VirtualIbanUSDDestination no

Without destinationId (only when withdrawals.fiatOtherDestination is true): the bank account, SEPA for EUR; rail and the USD fields for USD. With destinationId: only reason and reference.

destinationId string (uuid) no

One of the account's withdrawals.fiatDestinations for currency. With it, destination carries only reason and reference.

expectedFee string yes

The fee from the quote for this amount.

Responses

StatusBodyDescription
202 VirtualIbanWithdrawal

Accepted; follow it with GET …/fiat-payouts/{payoutId}.

400 VirtualIbanError

The request was refused; code says why (see errors).

401 —

Missing or invalid x-client-id / x-client-secret (no body).

403 VirtualIbanError

The request was refused; code says why (see errors).

404 VirtualIbanError

The request was refused; code says why (see errors).

409 VirtualIbanError

The request was refused; code says why (see errors).

503 VirtualIbanError

The request was refused; code says why (see errors).

Specification

This page is generated from the OpenAPI specification, which remains the authoritative machine-readable source.