Skip to main content
POST
Create a Global Payment Order
The fiat-to-fiat global payment route lets you move money across borders without touching crypto at the application layer — VelaFi handles the on-ramp and off-ramp legs internally over stablecoin rails. You configure both the on-ramp leg (where funds are collected) and the off-ramp leg (where funds are delivered) in a single API call. Fix the amount on either the on-ramp side (onRampFiatAmount) or the off-ramp side (offRampFiatAmount); if you send both, onRampFiatAmount takes precedence. A quoteId from the Fiat/Fiat Quote API locks the cross-currency rate.

Endpoint

Use https://api-test.velafi.com/v2/order/fiat_to_fiat for sandbox testing.

Request Headers

Request Body Parameters

On-Ramp Leg

string
required
Full country name where fiat is collected (e.g., "Mexico").
string
required
ISO 4217 fiat currency code the sender pays in (e.g., "MXN").
integer
required
Numeric payment method ID for collecting the on-ramp fiat. See Payment Method IDs for supported values.
integer
required
Merchant ID for the on-ramp leg. Requests without a valid on-ramp merchant are rejected.
decimal
Amount of fiat the sender pays (e.g., 1000.00). Provide onRampFiatAmount or offRampFiatAmount; if you send both, onRampFiatAmount takes precedence.
string
Alias of the virtual account used for the on-ramp fiat deposit.

Off-Ramp Leg

string
required
Full country name where fiat is delivered (e.g., "Argentina").
string
required
ISO 4217 fiat currency code the beneficiary receives (e.g., "ARS").
integer
required
Numeric user payment ID of the beneficiary who receives the off-ramp fiat. Must be a valid userPaymentId returned by GET /v2/payments.
integer
required
Merchant ID for the off-ramp leg. Requests without a valid off-ramp merchant are rejected.
decimal
Amount of fiat the beneficiary receives (e.g., 55000.00). Ignored when onRampFiatAmount is also sent with a value of at least 0.01.

Shared Parameters

string
Your own order reference ID. Use at most 40 characters. It must be unique across all fiat_to_fiat orders on your account; a second create request with the same clientId is rejected. Returned in Get Order and List Orders responses. See Idempotency and retries.
string
Optional free-text note attached to the order.
string
Quote ID from the Quote API to lock in the cross-currency exchange rate.
object
Additional payment-specific fields for certain payment methods.

Response Fields

integer
Response status code. 200 indicates success.
string
Human-readable response message.
object
Order result object.

Example

Retrieve detailed order status for fiat-to-fiat orders with GET /v2/order/detail?orderId={orderId}&orderType=fiat_to_fiat. The response includes separate on-ramp and off-ramp payment info objects, and a separate set of status codes (for example 41 pay-in pending, 51 payout pending, 60 completed; see Order Statuses).

Idempotency and retries

Use clientId to make order creation safe to retry.
  • clientId is optional. Use at most 40 characters. It must be unique across all fiat_to_fiat orders on your account, for all of your merchants.
  • A create request that reuses an existing clientId is rejected with a repeated-submission error, and no new order is created.
  • A clientId stays bound to its order permanently, including after the order is canceled. Use a new clientId for a new order.
  • GET /v2/order/detail looks up fiat_to_fiat orders by orderId only. To find an order by clientId, list recent orders with GET /v2/orders?orderType=fiat_to_fiat and match the clientId field.
If a create request times out or returns no response, look for its clientId in the order list first. If the order is there, do not create it again. If it is not, retry with the same clientId: if the first request did create the order in the meantime, the retry is rejected as a duplicate instead of creating a second order.
A quoteId can be consumed by a create request that is then rejected. Request a new quote before you retry.