Skip to content

Confirm a quoted exchange

POST
/v1/conversions/{conversion_id}/confirm
curl --request POST \
--url https://api.feitpay.com/v1/conversions/example/confirm \
--header 'Authorization: Bearer <token>' \
--header 'FeitPay-Environment: test'

Holds from_amount from the available balance and starts the exchange (processing). When it finishes the amount received minus the fee is credited in to_asset (finished); a refused exchange returns the held amount (rejected). If the outcome cannot be known at once the amount stays held until FeitPay has checked it (failed, failure_code: submission_interrupted). An expired quote is refused (quote_expired). Honors Idempotency-Key.

conversion_id
required
string
FeitPay-Organization
string

Active organization for dashboard sessions. Ignored for API keys (the key determines the organization).

FeitPay-Environment
string
default: test
Allowed values: test live

test (default) or live for dashboard sessions. API keys determine the environment. Until the platform is in production, configuration (stores, webhook endpoints, payment links) is live and money movement answers payments_not_enabled.

Idempotency-Key
string
<= 255 characters

Unique key per logical create operation (max 255 chars). Replays return the original response; reuse with a different body returns idempotency_error.

The conversion after submission.

Media typeapplication/json
object
id
required
string
object
required
string
Allowed value: conversion
livemode
required
boolean
status
required

Quoted (not held; confirm before quote_expires_at) → processing (held, being exchanged) → finished (credited in to_asset). rejected: refused, the held amount is back. failed: the outcome is being checked by FeitPay, the amount stays held meanwhile. expired: a quote that was not confirmed in time.

string
Allowed values: quoted expired submitting processing finished rejected failed
from_asset
required
string
to_asset
required
string
from_amount
required

Decimal string. Never a float.

string
/^(0|[1-9][0-9]*)(\.[0-9]+)?$/
from_amount_units
required

Integer amount in the asset’s smallest unit.

string
/^[0-9]+$/
from_divisibility
required
integer
to_divisibility
required
integer
estimated_to_amount
required

The exchange’s estimate at quote time.

string
/^(0|[1-9][0-9]*)(\.[0-9]+)?$/
fee_bps
required
integer
<= 10000
fee_rate
required
string
estimated_fee
required

Decimal string. Never a float.

string
/^(0|[1-9][0-9]*)(\.[0-9]+)?$/
estimated_net_amount
required

Decimal string. Never a float.

string
/^(0|[1-9][0-9]*)(\.[0-9]+)?$/
quote_expires_at
required
string format: date-time
received_amount
required

What the exchange delivered (finished).

string | null
fee
required

FeitPay’s fee taken from received_amount (finished).

string | null
credited_amount
required

Received_amount − fee, credited in to_asset.

string | null
credited_amount_units
required
string | null
failure_code
required
string | null
Allowed values: processor_refused submission_interrupted processor_rejected
created_at
required
string format: date-time
updated_at
required
string format: date-time
finished_at
required
string | null format: date-time

Example

{
"object": "conversion",
"status": "quoted",
"from_amount": "59.90",
"from_amount_units": "99834",
"estimated_to_amount": "59.90",
"fee_rate": "1%",
"estimated_fee": "59.90",
"estimated_net_amount": "59.90",
"failure_code": "processor_refused"
}

Missing or invalid credentials.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error idempotency_error rate_limit_error feature_unavailable_error api_error
code
required

Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.

string
message
required

Human-readable explanation in English.

string
param
string
request_id
required
string

Example

{
"error": {
"type": "invalid_request_error"
}
}

Authenticated but not permitted. Any route may also answer request_blocked when abuse protection has blocked the client IP for a while.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error idempotency_error rate_limit_error feature_unavailable_error api_error
code
required

Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.

string
message
required

Human-readable explanation in English.

string
param
string
request_id
required
string

Example

{
"error": {
"type": "invalid_request_error"
}
}

Resource not found (or not visible to this tenant).

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error idempotency_error rate_limit_error feature_unavailable_error api_error
code
required

Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.

string
message
required

Human-readable explanation in English.

string
param
string
request_id
required
string

Example

{
"error": {
"type": "invalid_request_error"
}
}

State conflict.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error idempotency_error rate_limit_error feature_unavailable_error api_error
code
required

Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.

string
message
required

Human-readable explanation in English.

string
param
string
request_id
required
string

Example

{
"error": {
"type": "invalid_request_error"
}
}

Too many requests. See Retry-After.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: invalid_request_error authentication_error permission_error not_found_error conflict_error idempotency_error rate_limit_error feature_unavailable_error api_error
code
required

Stable machine-readable reason. Known values are listed in ErrorCode; clients localize by code and show message (English) only for a code they do not know. New codes may be added at any time.

string
message
required

Human-readable explanation in English.

string
param
string
request_id
required
string

Example

{
"error": {
"type": "invalid_request_error"
}
}
Retry-After
integer