Fiat Pay-in lets end users pay in local fiat currency using familiar payment methods such as bank transfers and local wallets, while AIO connects the crypto-side flow to TransFi fiat infrastructure.The basic flow is: discover supported fiat options, create or fetch KYC, create an AIO Pay-in transaction, get a fiat quote, create a fiat order, redirect the user to fiat_payment_url, then handle the callback.
How the Logic Works#
1.
Merchant gets supported fiat currencies using GET /v2/fiat/supported-fiat.
2.
Merchant checks available chains/tokens using GET /v2/fiat/crypto-map.
3.
Merchant checks payment methods using GET /v2/fiat/payment-methods.
4.
Merchant checks limits using GET /v2/fiat/fiat-limits.
5.
Merchant creates a KYC profile using POST /v2/fiat/kyc and stores fiat_kyc_id.
6.
Merchant creates a normal AIO Pay-in transaction and stores txid.
7.
Merchant gets a fiat quote using POST /v2/fiat/pay-in/quote.
8.
Merchant creates the fiat order using POST /v2/fiat/pay-in.
9.
AIO returns fiat_payment_url.
10.
Merchant redirects the user to fiat_payment_url.
11.
Merchant receives callback and updates the transaction after signature verification.
If the fiat order status becomes fund_failed or expired, create a new fiat order and redirect the user again.
Fiat Pay-in Sequence Diagram#
Recommended APIFox Folder Order#
1.
POST /v2/fiat/kyc - Create KYC
2.
GET /v2/fiat/kyc - List KYC
3.
GET /v2/fiat/supported-fiat - Supported Fiat Currencies
4.
GET /v2/fiat/crypto-map - Crypto Map
5.
GET /v2/fiat/payment-methods - Payment Methods
6.
GET /v2/fiat/fiat-limits - Fiat Limits
7.
POST /v2/fiat/pay-in/quote - Fiat Quote
8.
POST /v2/fiat/pay-in - Create Fiat Order
9.
GET /v2/fiat/pay-in - List Fiat Orders