curl --request POST \
--url https://api-test.paiera.com/v1/swap/create \
--header 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
--header 'Content-Type: application/json' \
--data '{
"quote_id": "swap_quote_example_001",
"swap_reference_id": "swap_example_001"
}'
{
"code": "success",
"message": "success",
"timestamp": 1793145600000,
"success": true,
"data": {
"swap_reference_id": "swap_example_001",
"transaction_id": "swap_example_001",
"quote_id": "swap_quote_example_001",
"status": "PROCESSING",
"source_currency": "USDT",
"source_amount": "100.000000",
"destination_currency": "USD",
"destination_amount": "100.00"
}
}
FX
Create Swap Transaction
Create a swap using a stored quote.
curl --request POST \
--url https://api-test.paiera.com/v1/swap/create \
--header 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
--header 'Content-Type: application/json' \
--data '{
"quote_id": "swap_quote_example_001",
"swap_reference_id": "swap_example_001"
}'
{
"code": "success",
"message": "success",
"timestamp": 1793145600000,
"success": true,
"data": {
"swap_reference_id": "swap_example_001",
"transaction_id": "swap_example_001",
"quote_id": "swap_quote_example_001",
"status": "PROCESSING",
"source_currency": "USDT",
"source_amount": "100.000000",
"destination_currency": "USD",
"destination_amount": "100.00"
}
}
Amounts come from the stored quote snapshot; do not resubmit quote amounts. OpenAPI requires
See Error codes and Webhooks.
swap_reference_id; Portal can generate it. notify_url is input-only. Creation omits expires_at; the inherited complete_time is normally unpopulated. Reusing a reference for a different quote is a conflict.
Body Parameters
string(64)
required
1..64; letters, digits, underscores and hyphens
Existing quote ID
string(64)
1..64; letters, digits, underscores and hyphens
Required for OpenAPI; optional in Portal
Merchant swap reference
string(2048)
Up to 2048; HTTP/HTTPS without credentials or fragment
Explicit webhook URL
Response
The standard response envelope contains an object indata. See Swap order for all item fields. Check success and code even on HTTP 200.
string
Business result code. Use this value for programmatic handling.
string
Result description; do not parse the message to classify failures.
string
Included when tracing context exists.
integer
Response time as Unix epoch milliseconds.
boolean
Whether the operation succeeded; check this even on HTTP 200.
object
Endpoint-specific business data; optional fields depend on state and availability.
Show Response fields
Show Response fields
string(64)
Merchant swap reference. Creation input 1..64.
string(64)
Platform swap transaction ID. Query input: 1..64 characters.
string(64)
Quote ID.
string(32)
External order status.
CREATED/PROCESSING/COMPLETED/FAILED.string(16)
Source currency. Currency code.
string
Source principal. Fiat 2/stablecoin 6 decimal places.
string(16)
Destination currency. Currency code.
string
Destination amount. Fiat 2/stablecoin 6 decimal places.
string
Fee amount. Fee-currency precision.
string(16)
Fee currency. Currency code.
string
Total debit amount. Source-currency precision.
string
Customer exchange rate. Up to 6 decimal places; HALF_UP rounding; trailing zeros removed.
string(128)
Failure code. On failure.
string(1024)
Failure reason. On failure.
string
Order creation time. 19 / 24.
string
Update time. 19 / 24.
string
Legacy inherited create-response property. 19 / 24. Legacy create-response field; normally unpopulated.
curl --request POST \
--url https://api-test.paiera.com/v1/swap/create \
--header 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
--header 'Content-Type: application/json' \
--data '{
"quote_id": "swap_quote_example_001",
"swap_reference_id": "swap_example_001"
}'
{
"code": "success",
"message": "success",
"timestamp": 1793145600000,
"success": true,
"data": {
"swap_reference_id": "swap_example_001",
"transaction_id": "swap_example_001",
"quote_id": "swap_quote_example_001",
"status": "PROCESSING",
"source_currency": "USDT",
"source_amount": "100.000000",
"destination_currency": "USD",
"destination_amount": "100.00"
}
}
