openapi: 3.0.3 info: title: Unigox API Gateway description: | Build fiat on/off-ramp flows in your app with Unigox partner APIs. This documentation contains the generated API reference only. For onboarding guides, tutorials, tools, and support pages, use the guide pages in the main sidebar. ## Welcome Unigox is a global P2P fiat on/off-ramp gateway for B2B partners. We focus on local rails coverage, fast execution, and simple partner integration. Key partner value: - coverage across Africa, LatAm, Asia, Middle East, Europe, and Australia - support for local rails and institutions relevant in emerging markets - compliance flows for KYC, verification, and webhook integrity ## Public endpoints (no API key) A few discovery endpoints are public so you can explore liquidity and indicative pricing without credentials: - `GET /api/v1/partner/liquidity` - `POST /api/v1/partner/onramp/estimate` - `POST /api/v1/partner/offramp/estimate` Quote, initiate, user, and order endpoints still require `X-API-Key`. ## API Reference Endpoint groups are ordered for partner integration flow: `Health` → `Supported Resources` → `Exchange Pairs` → `User Management` → `On-Ramp` → `Off-Ramp` → `Orders` → `Webhooks`. version: 1.0.0 contact: name: Unigox API Support email: support@unigox.com externalDocs: description: Unigox Python SDK url: https://github.com/Unigox/sdk_python/blob/main/partner_authorize_crypto_transfer_sdk.py servers: - url: https://api-staging.unigox.com description: Sandbox server - url: https://api.unigox.com description: Production server tags: - name: Health description: Service health and status endpoints x-page-icon: hand - name: Supported Resources description: Discover payment supported resources including cryptocurrencies, blockchains, fiat currencies, and rails x-page-icon: list-check - name: Exchange Pairs description: Get information about supported trading pairs x-page-icon: shuffle - name: User Management description: | Create and manage your customers, put them through KYC, hold their payout details — and issue the fiat accounts they are paid into. All of it hangs off one customer. `POST /api/v1/partner/users` creates them and answers with the `user_uuid` every route below takes in its path; KYC verifies them; and an account is opened for that same person. There is no second identity to register and no separate customer record for banking — the person Unigox verified is the person the account belongs to. **Customer-owned wallets and crypto deposits** 1. Ask Unigox to enable external-wallet customers for your partner account. 2. Create the customer with `wallet_type: external_wallet`. Omitting it creates a `partner_wallet` customer. The type is fixed at creation; use the same type when repeating a request for an existing `user_ref`. 3. Request `POST /api/v1/partner/users/{user_uuid}/wallet/challenge` for the customer's EVM address. Have that wallet sign the returned `message` unchanged with `personal_sign` or its equivalent `signMessage` operation. 4. Submit `address`, `message` and `signature` to `POST /api/v1/partner/users/{user_uuid}/wallet`. `GET` on that path returns the link status and XAI balances. 5. Allocate deposit addresses and check their monitoring status before accepting payments. Supported deposits are credited to the linked wallet on UNIGOX, on XAI (chain ID 660279). Register your partner webhook to receive `wallet.deposit.received` after a bridge credit. Enabling external-wallet customers controls new customer creation. Existing external-wallet customers can still link their wallet, read it and deposit if that permission is later disabled. These routes use `X-API-Key` and your customer UUID. Wallet-signed Bridge memo addresses use the separate Bridge payment API; the partner deposit-address routes do not attach memos. x-page-icon: user - name: On-Ramp description: On-ramp operations (fiat to crypto) — partner initiates a buy order, vendor provides liquidity, end-user sends fiat x-page-icon: arrow-down-to-bracket - name: Liquidity description: Real-time aggregated liquidity data — available trading pairs, amount ranges, and payment methods x-page-icon: chart-bar - name: Off-Ramp description: Off-ramp operations (crypto to fiat) — sell crypto and receive fiat x-page-icon: arrow-right-arrow-left - name: Recipients description: Register and manage third parties paid by KYC-verified senders x-page-icon: users - name: Fiat Accounts description: | Accounts Unigox issues to your customers, in their own name, for them to be paid into. A fiat account belongs to a customer you created with `POST /api/v1/partner/users` and put through KYC, and it is addressed by its own `fiat_account_id`. Open one, show the customer where to pay in, and read what lands on it. In v1 neither you nor the customer can move money off an account through this API, and converting it is an order. EUR and GBP off-ramps are paid through the customer's account by Unigox itself, on to the bank you named: see `payout_via_own_account` on the order. Optional automatic collection into the partner's operating account is configured separately by Unigox; it does not require a retail transfer API call. Issuance enablement does not confirm collection enablement. A deposit notification does not confirm collection completion. See [collection and reconciliation](https://developers.unigox.com/tutorials/fiat-accounts#collecting-deposits-into-your-operating-account). An optional product Unigox activates per partner. `GET /api/v1/partner/fiat-accounts/config` answers whether it is on for you, before any customer is in scope. x-page-icon: building-columns - name: Business Customers description: | Companies you onboard through KYB, and the accounts Unigox issues in their name once the KYB is approved. Start KYB, send the representative the onboarding link, watch the status, issue accounts, read what moved on them, and move balances between them and your own operating account. Your operating account can be read here too: what it holds, fiat and crypto, every entry on its book and its bank transfers. A balance moved with `transfer-to-partner` lands there, and crypto withdrawals leave from there. Enabled per partner. Closing an account and crypto withdrawals stay in the B2B console. x-page-icon: briefcase - name: Orders description: Order management, status tracking, and lifecycle actions x-page-icon: receipt - name: Webhooks description: | Signed notifications for orders, KYC/KYB, fiat accounts, business customers and wallet deposits. The system sends a signed HTTP POST to your configured webhook URL on every relevant event. **Event model** These event types are delivered: | Event type | Fired when | |---|---| | `order.status.changed` | An order transitions to a new status | | `order.refund.required` | An order's crypto is stuck in escrow and only your signature can return it | | `user.kyc.updated` | A user's KYC verification is approved, declined or put on manual review | | `fiat_account.updated` | An issued fiat account changes status. No money moved. | | `fiat_account.deposit.received` | Money arrived on an issued fiat account. Not sent for a credit matched to exactly one off-ramp paid through that account, which `order.own_account_payout.updated` covers. A business customer's account sends it with `holder_type: business` | | `fiat_account.payment.sent` | Money left a business customer's account | | `fiat_account.payment.updated` | A transfer on a business customer's account reached a new status (`pending`, `confirmed`, `sent`, `blocked`, `refused`, `refunded`…) | | `business_customer.kyb.updated` | A business customer's KYB status changed | | `order.own_account_payout.updated` | An off-ramp paid through the customer's own fiat account was sent on to the bank, or stopped on the account | | `wallet.linked` | An external-wallet customer linked their address | | `wallet.deposit.received` | A bridge payment was credited to a linked customer wallet on XAI | | `wallet.withdrawal.status.changed` | A customer withdrawal from an external wallet changed status | **Customer wallet events** `wallet.linked` carries `user_uuid`, `address` and `linked_at`. The link response and `GET /api/v1/partner/users/{user_uuid}/wallet` confirm the link even if that notification is not delivered. This event has no automatic delivery retry. `wallet.deposit.received` reports the credited XAI token and amount, with the source transaction and XAI settlement transaction. It reports supported bridge credits to linked wallets, not every transfer into that wallet. It does not include a memo or memo-lock ID. ```json { "event_id": "evt_dep_42_12345", "event_type": "wallet.deposit.received", "created_at": "2026-10-18T10:01:00Z", "data": { "deposit_id": "intent:12345", "user_uuid": "550e8400-e29b-41d4-a716-446655440000", "address": "0x1111111111111111111111111111111111111111", "chain_id": "660279", "crypto_currency": "USDC", "token_address": "0x37bf70ee0dc89a408de31b79cccc3152f0c8af43", "amount": "1", "amount_atomic": "1000000", "source_chain_id": "8453", "source_tx_hash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "tx_hash": "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "credited_at": "2026-10-18T10:00:00Z" } } ``` Register and enable your webhook before accepting deposits. Deposit notifications retry failed delivery with the same `event_id` (first retry after 30 s, the wait doubling up to 6 h, at most 10 attempts); `data.deposit_id` identifies the credited payment. Process each deposit once within your partner account and environment. Return a 2xx after accepting the event. Delivery is bounded; disabling a webhook does not queue a later replay. Both wallet events use the partner signature scheme described below. `created_at` and the delivery signature can change on retry; `credited_at` is the settlement time. **Payload shape — the fiat account events** ```json { "event_id": "evt_a1b2c3d4-e5f6-7890-abcd-ef1234567890", "event_type": "fiat_account.deposit.received", "created_at": "2026-09-18T10:04:23Z", "data": { "fiat_account_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "holder_type": "retail", "user_uuid": "550e8400-e29b-41d4-a716-446655440000", "transaction_id": "5f1b2c9a-1d44-4f0e-9c1a-2b5f0d7e9a31", "amount": "500.00", "currency": "EUR", "order_id": null } } ``` `order_id` is the on-ramp this deposit funded, or `null` when it matched no order. The event is not sent for a credit matched to exactly one off-ramp paid through the customer's own fiat account (`payout_via_own_account: true`); `order.own_account_payout.updated` reports that money instead. Any other credit still sends it, including one held for review because it cannot be tied to a single order. `fiat_account.updated` carries `fiat_account_id`, `user_uuid`, `status` and `currency`. A business customer's account sends `fiat_account.deposit.received` (with `holder_type: business`) and `fiat_account.payment.sent` / `fiat_account.payment.updated` with a different `data`; see Business customers, Webhooks. **Payload shape — `order.own_account_payout.updated`** Sent only on an off-ramp paid through the customer's own fiat account (`payout_via_own_account: true`), when the onward payment to the bank you named reaches `sent_to_bank`, `held`, `under_review` or `left_on_account`, once per change of state. It does not change the order's `status`. The provider's payment into the customer's account, once matched to the order, does not send `fiat_account.deposit.received`. ```json { "event_id": "evt_own_account_payout_1234_sent_to_bank_3f9a1c0b7d2e4a55", "event_type": "order.own_account_payout.updated", "created_at": "2026-10-16T12:00:00Z", "data": { "order_id": "9f1c6b7e-0000-4000-8000-000000000042", "user_uuid": "c0ffee00-0000-4000-8000-000000000001", "own_account_payout_status": "sent_to_bank", "fiat_account_id": "6b1d2c3e-0000-4000-8000-000000000007", "amount": "250.00", "currency": "EUR" } } ``` `fiat_account_id` is omitted when the account is not one you can address by id. `amount` is a decimal string with at least two decimals. All events share the same envelope (`event_id`, `event_type`, `created_at`, `data`) and the same signature scheme. The structure of the `data` object differs per event type. **Payload shape — `order.status.changed`** ```json { "event_id": "evt_a1b2c3d4-e5f6-7890-abcd-ef1234567890", "event_type": "order.status.changed", "created_at": "2026-02-01T12:00:05Z", "data": { "order_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "status": "crypto_received", "user_id": "550e8400-e29b-41d4-a716-446655440000", "crypto_amount": "101.5", "crypto_currency": "USDT", "partner_fee": "1", "partner_fee_pct": 1, "fiat_amount": "152880.00", "fiat_currency": "NGN", "provider": "p2p", "payment_details_id": "987" } } ``` `user_id` is the customer's `user_uuid`. **Payload shape — `order.refund.required`** Fired when an off-ramp order has stopped without a payout and its crypto is still in escrow. This has its own event type because there is no status change to carry it: the order reads `cancelled` from the moment it stopped, exactly like an order whose refund was already paid out, so a listener filtering on status transitions would never learn that anything is owed. It is sent **at most once per order**, and the same information is on `GET /orders/{order_id}` for as long as it stays true. The `data` object is the order.status.changed payload plus `action_required`. ```json { "event_id": "evt_refund_required_b2c3d4e5-f6a7-8901-bcde-f12345678901", "event_type": "order.refund.required", "created_at": "2026-09-09T09:14:00Z", "data": { "order_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "status": "cancelled", "user_id": "550e8400-e29b-41d4-a716-446655440000", "crypto_amount": "1000.25", "crypto_currency": "USDT", "fiat_amount": "3070.50", "fiat_currency": "KWD", "provider": "p2p", "payment_details_id": "987", "action_required": { "type": "authorize_refund", "message": "This order ended without a payout and the crypto is still in escrow. ...", "endpoint": "POST /api/v1/partner/orders/{order_id}/authorize-refund" } } } ``` Act on it with the refund pair: `GET /orders/{order_id}/refund-authorization-parameters` for the transaction to sign, then `POST /orders/{order_id}/authorize-refund` with the signature. Nobody else can produce that signature — the escrow needs two of its three owners, we hold one key and you hold the other. **Payload shape — `user.kyc.updated`** Fired when a user's KYC status changes — to `VERIFIED`, `REJECTED`, or to a manual compliance review hold (`UNDER_REVIEW`). Use this event to unlock order creation for the user on your side (only on `VERIFIED`; `UNDER_REVIEW` is not cleared). ```json { "event_id": "evt_2d8418dd-e3a8-4463-a11e-6b54f354ca90", "event_type": "user.kyc.updated", "created_at": "2026-03-10T11:37:42Z", "data": { "user_uuid": "550e8400-e29b-41d4-a716-446655440000", "kyc_status": "VERIFIED" } } ``` When KYC is declined, `rejection_reasons` is included: ```json { "event_id": "evt_fc75484d-b374-4d05-b54e-820f3dd80e6d", "event_type": "user.kyc.updated", "created_at": "2026-03-10T12:00:00Z", "data": { "user_uuid": "550e8400-e29b-41d4-a716-446655440000", "kyc_status": "REJECTED", "rejection_reasons": ["Document expired", "Photo quality low"] } } ``` When a customer is placed on a manual compliance review hold, `kyc_status` is `UNDER_REVIEW`: ```json { "event_id": "evt_9a1c7f20-4d3b-4e88-9f2a-1b6d0c5e7a3f", "event_type": "user.kyc.updated", "created_at": "2026-03-10T12:05:00Z", "data": { "user_uuid": "550e8400-e29b-41d4-a716-446655440000", "kyc_status": "UNDER_REVIEW" } } ``` `kyc_status` values: `VERIFIED` | `REJECTED` | `UNDER_REVIEW` `UNDER_REVIEW` is a manual compliance review: the customer is NOT cleared and can take up to 24 hours (unlike an automated check of a couple of minutes). Do not unlock order creation until `VERIFIED`. **Signature verification** Every delivery includes two headers for HMAC-SHA256 verification: - `X-Unigox-Signature: sha256=` — HMAC of `"."` - `X-Unigox-Timestamp: ` Verification pseudocode: ``` expected = HMAC-SHA256(webhook_secret, ".") valid = constant_time_compare(expected, signature_from_header) ``` **Delivery guarantees** - At-least-once delivery. Your endpoint may receive the same event more than once. - De-duplicate by `event_id`. - Respond with any 2xx status within 10 seconds to acknowledge receipt. **Retry policy** Failed deliveries (non-2xx or timeout) are retried with exponential backoff: 1 min → 5 min → 15 min → 1 h → 6 h → 12 h → 24 h (max 10 attempts over ~3.5 days). **Partner-facing statuses** (`order.status.changed`) | Status | Description | |---|---| | `created` | Order created | | `awaiting_liquidity_provider` | Waiting for vendor match | | `awaiting_crypto_transfer_authorization` | Partner must authorize crypto transfer | | `crypto_transfer_authorization_pending` | Authorization submitted, awaiting on-chain confirmation | | `price_changed_requote_needed` | Slippage exceeded at initiation; create a new quote | | `crypto_received` | Crypto received in escrow | | `fiat_payment_started` | Buyer submitted fiat payment proof | | `fiat_payment_review_started` | Payment proof under review | | `awaiting_fiat_received_confirmation` | Proof approved, awaiting seller confirmation | | `completed` | Order completed, crypto released | | `cancelled` | Order cancelled or payment declined | | `failed` | Escrow error, or fiat-anchored safety bound exceeded (see below) | | `dispute_started` | Dispute opened | | `settlement_in_progress` | Delayed settlement (T+1): the release of the crypto has started or is confirmed, and the fiat has not arrived | | `returned` | Delayed settlement (T+1): the bank sent the payout back and no new attempt has been approved yet | | `awaiting_vendor_escrow_funding` | On-ramp: vendor accepted, funding escrow with crypto | | `awaiting_fiat_transfer` | On-ramp: crypto locked in escrow, waiting for the fiat payment | | `fiat_transfer_pending` | On-ramp: fiat payment confirmed, awaiting vendor confirmation of receipt | | `send_out_pending` | On-ramp send-out: cross-chain transfer in progress | | `send_out_completed` | On-ramp send-out: delivered on the destination chain | | `send_out_failed` | On-ramp send-out: cross-chain transfer failed; the on-ramp itself stays completed | **Fiat-anchored safety bound failure** For fiat-anchored off-ramp orders (`anchor_type: "fiat"`), if the crypto cost we quote exceeds 1.20× the expected amount at the time of settlement, the order moves to `failed` status asynchronously (not during `/initiate`). The deposit is automatically refunded from escrow back to the partner wallet. Create a new quote to retry the trade flow. **Settlement notifications (recipient received the fiat)** Some liquidity providers automatically confirm when the fiat payout reaches the recipient's bank account or mobile wallet. When the provider matched to an order supports this, the order moves to `completed` on its own and you receive an `order.status.changed` webhook with `status=completed` — that webhook is your signal that the recipient has actually received the money. Whether the matched provider sends this is reported per order by the `has_fiat_settlement_notification` field on the **quote** and **order** responses: - `true` — the matched provider sends an automatic settlement confirmation. You will receive the `completed` webhook once fiat is delivered; no manual action is needed. - `false` — no automatic confirmation for this order. Confirm delivery yourself by calling `confirm-fiat-received` (or rely on your own banking/payment systems). A delayed settlement (T+1) quote, and a T+1 order once a liquidity provider has accepted it, always read `true`: the fiat leg ends in the `completed` webhook, and `confirm-fiat-received` refuses it. Every order a liquidity provider has not accepted yet, T+1 included, reads `false`; read the flag again after acceptance. To match **only** providers that send settlement notifications, pass `has_fiat_settlement_notification: true` in the quote request — providers that can't offer it are then excluded from matching. Availability is provider- and corridor-dependent: not every currency has a provider that sends settlement notifications, so always read the flag on each quote rather than assuming it. Manual `confirm-fiat-received` and the automatic confirmation are mutually idempotent — whichever happens first wins and the other is a safe no-op. x-page-icon: bell paths: # ============================================ # 1. HEALTH CHECK # ============================================ /health: get: tags: - Health summary: Health check description: Returns the health status of the API gateway operationId: healthCheck responses: '200': description: Service is healthy content: application/json: schema: type: object properties: status: type: string example: ok service: type: string example: api time: type: string format: date-time example: "2024-01-01T12:00:00Z" # ============================================ # 2. DISCOVERY - CAPABILITIES # ============================================ # Step 1: Discover supported cryptocurrencies /api/v1/supported/crypto-currencies: get: tags: - Supported Resources summary: Cryptocurrencies description: Get a list of all supported cryptocurrencies with their blockchains and contract addresses. Useful for discovering available crypto assets for trading. operationId: getCryptoCurrencies responses: '200': description: Successfully retrieved cryptocurrencies content: application/json: schema: $ref: '#/components/schemas/CryptoCurrenciesResponse' # Step 2: Discover supported blockchains /api/v1/supported/blockchains: get: tags: - Supported Resources summary: Blockchains description: | Get a list of all supported blockchains with their associated cryptocurrencies. Useful for discovering which blockchains are available and what tokens they support. Token coverage is per chain and is not uniform: a chain listed here does not carry every stablecoin Unigox supports. Read `crypto_currencies` on each entry rather than assuming a token is available because the chain appears. This endpoint is the authoritative list — a token/chain pair absent from it is not enabled, regardless of what any other surface accepts. operationId: getBlockchains responses: '200': description: Successfully retrieved blockchains content: application/json: schema: $ref: '#/components/schemas/BlockchainsResponse' # Step 3: Discover supported fiat currencies /api/v1/supported/fiat-currencies: get: tags: - Supported Resources summary: Fiat currencies description: Get a list of all supported fiat currencies with their onramp/offramp capabilities. Useful for discovering available fiat currencies for onramp and offramp operations. operationId: getFiatCurrencies responses: '200': description: Successfully retrieved fiat currencies content: application/json: schema: $ref: '#/components/schemas/FiatCurrenciesResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' # Step 4: Discover payment rails for a country/currency /api/v1/supported/payment-rails: get: tags: - Supported Resources summary: Payment rails description: | Get payment rail capabilities for a specific country, currency, and direction (onramp/offramp). Returns available payment rails with their required fields and supported currencies. Partner rule: - if `institution_required` is `true`, send `institution_id` chosen from `/api/v1/supported/institutions` - if `institution_required` is `false`, institution selection is not needed for the rail itself Current partner API omission support is explicitly available for: - `iban-sepa` - `nip-nigeria` - `faster-payments` - `imps-neft-india` - `alipay-wallet` - `wechat-wallet` - `interac-e-transfer` For `iban-sepa`, `nip-nigeria` and `faster-payments`, partners may omit `institution_id` and the backend resolves the generic `other-bank` payment method automatically. For `alipay-wallet`, `wechat-wallet` and `interac-e-transfer`, an omitted `institution_id` resolves to the rail's own institution (`alipay`, `wechat-pay`, `interac-e-transfers`), which goes through the same checks as if you had sent it. An Interac e-Transfer is addressed to the recipient's `email` or `phone`, not to a bank. These omissions apply to a customer's own payment details. A **recipient destination** (`POST /api/v1/partner/recipients/{recipient_id}/destinations`) always needs `institution_id`, whatever `institution_required` says: send `alipay` or `wechat-pay` on the wallet rails. `imps-neft-india` returns `institution_required: false` and has **no** `institution_id` field: the IFSC code encodes both bank and branch and routes the payout on its own. Required fields are `bank_name`, `ifsc_code`, `account_number`, and `full_name`. Sending `institution_id` is accepted but ignored (it resolves to the generic `imps-or-neft-transfer` method); the receiving bank comes from `bank_name` + `ifsc_code`. **Multi-format rails:** some rails accept more than one field-set depending on the chosen institution's type, and return a `formats` array. For example GHIPSS (Ghana) and EthSwitch (Ethiopia) accept a **mobile-money** format keyed on `phone_number` and a **bank** format keyed on `account_number`. For these, the top-level `fields` is only a backward-compatible best-effort single set; use `formats` instead: 1. pick an institution from `/api/v1/supported/institutions` (each carries a fine-grained `institution_type`), 2. find the format whose `institution_types` contains that `institution_type`, 3. submit that format's `fields`. Each format also carries `has_liquidity`, indicating whether a vendor/provider can currently settle it in the corridor. It is computed only when the query names both `country` and `currency`, and omitted otherwise or when it could not be determined: an absent `has_liquidity` means unknown, not `false`. The parameter is `country`; `country_code` is not read, so a query that sends it is answered as if no country was given. **Individual vs business beneficiary:** a format may also carry `beneficiary_type` (`individual` | `business`). A business variant applies to the SAME institutions as its individual sibling (it shares the same `institution_types`) but collects a company's details instead of a person's. To pay a company, choose the format whose `beneficiary_type` is `business` and, when creating the payment details, submit that format's `fields` PLUS `"beneficiary_type": "business"` inside `details`. Omitting `"beneficiary_type"` in the request details defaults to the individual variant. Example: China CNAPS (`cnaps`) returns a `cnaps-bank` (individual) format and a `cnaps-bank_business` format collecting `company_name` + `company_name_native`; a corporate CNY payout sends the latter's fields with `"beneficiary_type": "business"`. Example multi-format rail (GHIPSS): ```json { "slug": "ghipss", "name": "GHIPSS", "institution_required": false, "fields": [ { "key": "account_number", "required": true }, { "key": "full_name", "required": false } ], "formats": [ { "id": "mobile-money", "name": "Mobile Money", "institution_types": ["mobile-money", "mobile-wallets"], "has_liquidity": true, "fields": [ { "key": "phone_number", "required": true }, { "key": "full_name", "required": false } ] }, { "id": "banks", "name": "Bank Account", "institution_types": ["traditional-banks", "digital-banks"], "has_liquidity": false, "fields": [ { "key": "account_number", "required": true }, { "key": "full_name", "required": false } ] } ] } ``` Here a partner paying out to an M-Pesa/TeleBirr-style mobile wallet must use the `mobile-money` format (`phone_number`), not `account_number`. operationId: getPaymentRails parameters: - name: country in: query description: ISO 2-letter country code (e.g., NG, US, IN) schema: type: string example: NG - name: currency in: query description: Fiat currency code (e.g., NGN, USD, EUR). Either country or currency must be provided. schema: type: string example: NGN - name: direction in: query required: true description: Transaction direction - either "onramp" (fiat to crypto) or "offramp" (crypto to fiat) schema: type: string enum: [onramp, offramp] example: offramp responses: '200': description: Successfully retrieved payment rails content: application/json: schema: $ref: '#/components/schemas/PaymentRailsResponse' example: success: true data: country: NG currency: NGN direction: offramp rails: - slug: nip-nigeria name: NIP Nigeria (NIBSS Instant Payments) institution_required: false institution_lookup_key: null currencies: - NGN settlement: speed: INSTANT typical_minutes: 2 note: null limits: null # Backward-compatible single field-set. For a multi-format rail it is a # best-effort guess; use `formats` for the authoritative per-institution set. fields: - key: account_number label: Account Number type: text required: true pattern: "^\\d{10}$" placeholder: "10-digit account number" - key: full_name label: Full Name type: text required: false placeholder: "Enter full name" # Present only for multi-format rails: the field set depends on the chosen # institution's type. Match an institution's `institution_type` to a format's # `institution_types`, then submit that format's `fields`. formats: - id: banks name: Bank Account institution_types: ["traditional-banks", "digital-banks"] has_liquidity: true fields: - key: account_number label: Account Number type: text required: true - key: full_name label: Full Name type: text required: false - id: mobile-money name: Mobile Money institution_types: ["mobile-money", "mobile-wallets"] has_liquidity: false fields: - key: phone_number label: Phone Number type: tel required: true placeholder: "Enter phone number" - key: full_name label: Full Name type: text required: false links: search_institutions: /api/v1/supported/institutions '400': description: >- Bad request: `direction` is missing (`direction parameter is required (onramp or offramp)`) or is not `onramp` or `offramp`, neither `country` nor `currency` is given, or one of them has the wrong length. On this endpoint `error` is a plain string, not an object. content: application/json: schema: type: object required: [success, error] properties: success: type: boolean example: false error: type: string example: "direction parameter is required (onramp or offramp)" example: success: false error: "direction parameter is required (onramp or offramp)" '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' # Step 5: Discover institutions (banks) for a payment rail (used when institution_required: true) /api/v1/supported/institutions: get: tags: - Supported Resources summary: Institutions (banks) for a payment rail description: >- Get a list of financial institutions (banks) available for a specific payment rail. Useful for populating bank-selection dropdowns. Call with just `rail` to page through every bank, or pass `search`/`code` to filter. For `imps-neft-india` this is the embedded India bank directory (~1,510 banks); selecting one is optional, since the bank is identified at payment-detail creation by `bank_name` + `ifsc_code`. Only institutions that are currently live on the queried rail (and, when given, in the queried country/currency) are returned. An institution missing from the response cannot be paid, and creating a payment detail or payout destination on it is refused. operationId: getInstitutions parameters: - name: rail in: query required: true description: Payment rail slug (e.g., iban-sepa, pix-brazil, cvu-cbu) schema: type: string example: iban-sepa - name: institution_id in: query description: Optional institution ID to filter by specific institution schema: type: string example: revolut - name: country in: query description: ISO 2-letter country code for filtering schema: type: string example: IN - name: currency in: query description: ISO 3-letter currency code for filtering schema: type: string example: INR - name: search in: query description: Free-text search by institution name schema: type: string example: hdfc - name: code in: query description: >- Filter by the institution's bank code (the `code` field of an institution): the 4-letter IFSC bank prefix for `imps-neft-india` (e.g. `HDFC`), the NIBSS code for `nip-nigeria`, etc. Not a full IFSC — use the 4-letter prefix. schema: type: string example: HDFC - name: limit in: query description: Maximum number of results to return schema: type: integer minimum: 1 maximum: 100 default: 20 example: 20 - name: offset in: query description: Number of results to skip for pagination schema: type: integer minimum: 0 default: 0 example: 0 responses: '200': description: Successfully retrieved institutions content: application/json: schema: $ref: '#/components/schemas/InstitutionsResponse' example: success: true data: institutions: - id: hdfc-bank name: HDFC Bank type: BANK code: HDFC branch: null supported_rails: - imps-neft-india pagination: total: 1 limit: 20 offset: 0 '400': description: Bad request - invalid rail or other validation errors content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' # Fiat corridors snapshot - all-in rates per direction /api/v1/supported/corridors: get: tags: - Supported Resources summary: Fiat Corridors description: | Get a snapshot of supported fiat corridors with the all-in best rates Unigox would quote at a 500 USDT reference notional, split by direction (`onramp` / `offramp`) and partner type (`licensed` / `p2p`). Every `rate` is post-fee. `unigox_fee_pct` discloses the platform fee for the corridor; `mid_market_rate` is the Open Exchange Rates reference for the same currency. operationId: getSupportedCorridors responses: '200': description: Snapshot retrieved successfully content: application/json: schema: $ref: '#/components/schemas/SupportedCorridorsResponse' example: success: true data: notional_usdt: 500 generated_at: '2026-04-27T15:56:11Z' currencies: - code: NGN name: Nigerian Naira mid_market_rate: 1358.97 mid_market_updated_at: '2026-04-27T15:56:11Z' unigox_fee_pct: 0.25 offramp: supported: true p2p: rate: 1542.6 licensed: rate: 1376.857 onramp: supported: true p2p: rate: 1370 licensed: rate: 1389.35 - code: BRL name: Brazilian Real mid_market_rate: 4.9911 mid_market_updated_at: '2026-04-27T15:56:11Z' unigox_fee_pct: 0.5 offramp: supported: true p2p: rate: 4.4648 min_notional_fiat: 3465 '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' # ============================================ # 3. EXCHANGE PAIRS # ============================================ /api/v1/supported-exchange-pairs: get: tags: - Exchange Pairs summary: Supported exchange pairs description: Get a list of all supported cryptocurrency and fiat currency exchange pairs. Shows which currency combinations can be traded. operationId: getSupportedPairs responses: '200': description: Successfully retrieved supported pairs content: application/json: schema: $ref: '#/components/schemas/SupportedPairsResponse' example: success: true data: - crypto_currency_code: USDC fiat_currency_code: ARS type: BUY - crypto_currency_code: USDC fiat_currency_code: ARS type: SELL - crypto_currency_code: USDC fiat_currency_code: AUD type: BUY - crypto_currency_code: USDC fiat_currency_code: AUD type: SELL - crypto_currency_code: USDC fiat_currency_code: CAD type: BUY - crypto_currency_code: USDC fiat_currency_code: CAD type: SELL - crypto_currency_code: USDC fiat_currency_code: EUR type: BUY - crypto_currency_code: USDC fiat_currency_code: EUR type: SELL - crypto_currency_code: USDC fiat_currency_code: GBP type: BUY - crypto_currency_code: USDC fiat_currency_code: GBP type: SELL - crypto_currency_code: USDC fiat_currency_code: GEL type: BUY - crypto_currency_code: USDC fiat_currency_code: GEL type: SELL - crypto_currency_code: USDC fiat_currency_code: GHS type: BUY # ============================================ # 5. ACCOUNT MANAGEMENT # ============================================ # 5. PARTNER AUTHENTICATION # ============================================ /api/v1/partner/verify-auth: get: tags: - User Management summary: Verify API key authentication description: | Verifies that the provided API key is valid and authentication is working correctly. operationId: verifyAuth security: - ApiKeyAuth: [] responses: '200': description: Authentication successful content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: object properties: message: type: string example: "Authentication successful" authenticated: type: boolean example: true example: success: true data: message: "Authentication successful" authenticated: true '401': description: Unauthorized - invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: success: false data: error_key: "unauthorized" # ============================================ # 6. PARTNER USER MANAGEMENT # ============================================ # Step 1: Create or get partner user /api/v1/partner/users: post: tags: - User Management summary: Create or get partner user description: | Creates a customer or returns the existing customer for `user_ref`. Use the returned `user_uuid` in subsequent paths. Partners can only access their own users. For customer-owned wallets and deposit-address allocation, set `wallet_type: external_wallet` and complete the wallet challenge/link steps in User Management. This option must be enabled by Unigox before creating a new external-wallet customer. The default is `partner_wallet`. A customer's wallet type cannot be changed by repeating this request. Each partner user must represent one actual payout beneficiary/end customer. Create a separate partner user for each beneficiary. Do not attach payment details for unrelated people to the same `user_uuid`. A partner user is the SENDER. To pay someone else, do not create a shell user for the payee — register a recipient (`/api/v1/partner/recipients`) and quote against it. See the Third-party payouts guide. operationId: createPartnerUser security: - ApiKeyAuth: [] requestBody: required: true content: application/json: schema: type: object required: [user_ref, email] properties: user_ref: type: string description: Partner's unique user ID (usually primary key or UUID) example: "partner_unique_id_123" email: type: string format: email description: | User's email address. Among your customers created from 2026-10-12, one email is one account: a second `user_ref` with such an email gets its own `user_uuid` but the same account (funds, orders, KYC and, for `external_wallet`, the same wallet). A new `user_ref` with the email of a customer created before that date gets a new account. The same email at another partner or in the Unigox app is a separate account. example: user@example.com wallet_type: $ref: '#/components/schemas/WalletType' example: user_ref: "customer_123" email: "customer@example.com" wallet_type: external_wallet responses: '200': description: Customer created, or the existing customer for this `user_ref` content: application/json: schema: $ref: '#/components/schemas/CreateUserResponse' '400': description: Bad Request, for example an unknown `wallet_type` (`INVALID_REQUEST`) '401': description: Unauthorized (missing or invalid X-API-Key) '403': description: '`FEATURE_NOT_ENABLED` — `wallet_type: external_wallet` requested but non-custodial mode is not switched on for your partner account.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: | `WALLET_TYPE_MISMATCH` — a customer with this `user_ref`, or your customer with this email, already exists with a different `wallet_type`. A customer's type is fixed at creation. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '500': description: Internal Server Error # Step 2: Get partner user by id /api/v1/partner/users/{user_uuid}: get: tags: - User Management summary: Partner user by ID description: Get user details including KYC status and payment profiles using the user_uuid returned during user creation. Partners can only access their own users. operationId: getPartnerUser security: - ApiKeyAuth: [] parameters: - name: user_uuid in: path required: true description: The user_uuid returned by POST /partner/users. Partners can only access their own users. schema: type: string format: uuid example: "550e8400-e29b-41d4-a716-446655440000" responses: '200': description: User found content: application/json: schema: $ref: '#/components/schemas/GetUserResponse' '401': description: Unauthorized '404': description: User not found # ============================================ # CUSTOMER WALLETS (non-custodial customers) # ============================================ /api/v1/partner/users/{user_uuid}/wallet/challenge: post: tags: - User Management summary: Request a wallet ownership challenge description: | Returns a Sign-In with Ethereum (EIP-4361) message that proves the customer controls `address`. Show it to the customer unchanged and have them sign it with `personal_sign`, then submit it to `POST /api/v1/partner/users/{user_uuid}/wallet`. The message names your partner account, the customer and the address, is valid for 10 minutes and can be used once. Requesting a new challenge invalidates the previous one. Only an externally owned account can be linked: linking needs a plain `personal_sign` signature, and the same key later signs EIP-712 requests that the XAI forwarder verifies with `ecrecover`. A smart-contract wallet cannot produce either, so linking one fails with `400 INVALID_SIGNATURE`. operationId: createWalletChallenge security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/UserUUIDPath' requestBody: required: true content: application/json: schema: type: object required: [address] properties: address: type: string pattern: '^0x[0-9a-fA-F]{40}$' description: The customer's EVM address example: "0x8ba1f109551bD432803012645Ac136ddd64DBA72" responses: '201': description: Challenge issued content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/WalletChallenge' '400': description: '`INVALID_REQUEST` — `address` is not a valid EVM address.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: '`CUSTOMER_NOT_FOUND` — no customer with this `user_uuid` belongs to your partner account.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: '`WALLET_ALREADY_LINKED` — the customer is already linked, or the address is linked to another of your customers. Addresses that Unigox holds for an account (a Unigox app wallet, your partner wallet, an escrow) or uses itself are refused the same way.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '422': description: '`WALLET_TYPE_MISMATCH` — the customer is a `partner_wallet` customer.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/users/{user_uuid}/wallet: post: tags: - User Management summary: Link the customer's address description: | Submit the challenge message and the customer's `personal_sign` signature. The signer is recovered on the server and must equal `address`; the message must be the one issued, unchanged and unexpired. On success the address is the customer's address at Unigox for good: deposits credit it, off-ramp orders are funded from it, on-ramp orders and refunds are paid to it. It cannot be changed or unlinked. A `wallet.linked` webhook is sent once, without retries. `balances` in the response is empty when the XAI balance could not be read at that moment; that is not a zero balance. Read `GET .../wallet` again for it. operationId: linkCustomerWallet security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/UserUUIDPath' requestBody: required: true content: application/json: schema: type: object required: [address, message, signature] properties: address: type: string pattern: '^0x[0-9a-fA-F]{40}$' example: "0x8ba1f109551bD432803012645Ac136ddd64DBA72" message: type: string description: The `message` from the challenge, byte for byte signature: type: string description: 65-byte `personal_sign` signature, hex with 0x prefix example: "0x5f1c…1b" responses: '200': description: Address linked content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/CustomerWallet' '400': description: '`INVALID_SIGNATURE` — the signature does not recover to `address`, the message was altered, or `address` differs from the challenged one. `INVALID_REQUEST` — a malformed address or body.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: '`CUSTOMER_NOT_FOUND` — no customer with this `user_uuid` belongs to your partner account.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: '`WALLET_ALREADY_LINKED`' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '410': description: '`CHALLENGE_EXPIRED` — no challenge was issued, it is older than 10 minutes, or it was already used. A message from a challenge that a newer one replaced fails as `400 INVALID_SIGNATURE`.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '422': description: '`WALLET_TYPE_MISMATCH` — the customer is a `partner_wallet` customer.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' get: tags: - User Management summary: Customer wallet and balance description: | The customer's linked address, its status, and the balance held at that address on the XAI chain in each supported token. Deposits appear here once credited on XAI. operationId: getCustomerWallet security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/UserUUIDPath' responses: '200': description: Wallet returned content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/CustomerWallet' '404': description: '`CUSTOMER_NOT_FOUND` — no customer with this `user_uuid` belongs to your partner account.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '422': description: '`WALLET_TYPE_MISMATCH` — the customer is a `partner_wallet` customer.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '502': description: '`BALANCE_UNAVAILABLE` — the XAI balance could not be read. Safe to retry.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/users/{user_uuid}/deposit-addresses: get: tags: - User Management summary: List customer deposit addresses and monitoring status description: | Returns the saved deposit addresses for a customer with a linked external wallet. The customer must belong to the authenticated partner. This request checks monitoring status for existing addresses; it never allocates another address. Complete the external-wallet customer creation and wallet-link steps in User Management first. Deposits credit that linked wallet on UNIGOX, on XAI (chain ID 660279), and are reported by the `wallet.deposit.received` partner webhook. After an allocation returns `503 DEPOSIT_ADDRESS_NOT_WATCHED`, repeat this GET to check the saved addresses. Do not repeat the allocation POST to check readiness. For EVM and Tron, accept payments only on networks whose `monitoring.chains` entry has `confirmed: true`. A missing network is unconfirmed. `monitoring.watched` is the aggregate result, so one network can be ready while another is still pending. For Solana and TON, use `monitoring.watched`; their `chains` array is empty. Monitoring confirmation does not establish which tokens are supported. operationId: listPartnerCustomerDepositAddresses security: - ApiKeyAuth: [] parameters: - name: user_uuid in: path required: true description: The customer user_uuid belonging to the authenticated partner. schema: type: string format: uuid responses: '200': description: Saved addresses with current monitoring results; an empty list is valid. content: application/json: schema: $ref: '#/components/schemas/PartnerDepositAddressesResponse' examples: partiallyConfirmed: summary: The saved EVM address is ready on Ethereum; Base is pending. value: success: true data: deposit_addresses: - chain_type: evm address: "0x1111111111111111111111111111111111111111" monitoring: watched: false chains: - chainId: 1 confirmed: true - chainId: 8453 confirmed: false confirmed: summary: Both networks are now confirmed for the same saved address. value: success: true data: deposit_addresses: - chain_type: evm address: "0x1111111111111111111111111111111111111111" monitoring: watched: true chains: - chainId: 1 confirmed: true - chainId: 8453 confirmed: true '401': description: Missing or invalid X-API-Key. '404': description: '`CUSTOMER_NOT_FOUND` — no customer with this `user_uuid` belongs to your partner account.' '409': description: '`WALLET_NOT_LINKED` — the customer has no linked address yet.' '422': description: '`WALLET_TYPE_MISMATCH` — the customer is a `partner_wallet` customer.' '502': description: '`DEPOSIT_ADDRESSES_UNAVAILABLE` — saved addresses could not be read; this GET never allocates. Safe to retry.' /api/v1/partner/users/{user_uuid}/deposit-addresses/{chainType}/allocate: post: tags: - User Management summary: Allocate customer deposit addresses description: | Creates additional deposit addresses for a customer with a linked external wallet. The customer must belong to the authenticated partner. Supported address families are `evm`, `svm` (Solana), `tvm` (Tron) and `ton`. The configured address cap also applies. First create an `external_wallet` customer and complete the wallet challenge/link flow. The linked address receives the supported settlement token on UNIGOX, on XAI (chain ID 660279). `wallet.deposit.received` reports the amount and token actually credited. `201` confirms allocation; use each address's `monitoring` fields to select a confirmed payment network. `503 DEPOSIT_ADDRESS_NOT_WATCHED` means allocation may already have completed, but monitoring is not confirmed. Its `data.deposit_addresses` preserves the addresses returned by the allocation. Keep those addresses and check them with GET `/api/v1/partner/users/{user_uuid}/deposit-addresses`; do not repeat this POST. An empty saved-address list in a 503 response does not prove that nothing was allocated. `502 DEPOSIT_ADDRESS_ALLOCATION_UNKNOWN` means the allocation outcome could not be confirmed after sending the request. Check saved addresses with the same GET; do not automatically repeat this allocation. An immediate empty list does not prove failure, because the original request may still complete. The allocation POST is not idempotent: repeating it can create additional addresses. Treat a lost HTTP response as uncertain too. These partner endpoints do not attach a memo. Wallet-signed memo-address requests use the separate Bridge payment API. operationId: allocatePartnerCustomerDepositAddresses security: - ApiKeyAuth: [] parameters: - name: user_uuid in: path required: true description: The customer user_uuid belonging to the authenticated partner. schema: type: string format: uuid - name: chainType in: path required: true description: Address family; EVM addresses can support multiple configured networks. schema: type: string enum: [evm, svm, tvm, ton] requestBody: required: false content: application/json: schema: type: object properties: count: type: integer minimum: 0 maximum: 50 default: 1 description: Number of additional addresses. Omitted or zero requests one address. example: count: 1 responses: '201': description: Addresses allocated; monitoring is reported for each saved address. content: application/json: schema: $ref: '#/components/schemas/PartnerDepositAddressesResponse' example: success: true data: deposit_addresses: - chain_type: evm address: "0x1111111111111111111111111111111111111111" monitoring: watched: true chains: - chainId: 1 confirmed: true - chainId: 8453 confirmed: true '400': description: '`INVALID_REQUEST` — the request body is not valid JSON.' '401': description: Missing or invalid X-API-Key. '404': description: '`CUSTOMER_NOT_FOUND` — no customer with this `user_uuid` belongs to your partner account.' '409': description: '`WALLET_NOT_LINKED` — the customer has no linked address yet.' '422': description: '`INVALID_REQUEST` — unknown `chainType`, or `count` above 50 or below 0. `WALLET_TYPE_MISMATCH` — the customer is a `partner_wallet` customer.' '429': description: '`ADDRESS_CAP_REACHED` — allocating would take the customer past the limit for this chain type; `error.message` states the limit.' '502': description: | DEPOSIT_ADDRESS_ALLOCATION_UNKNOWN means the allocation may have committed. Check saved addresses; do not automatically repeat the allocation. DEPOSIT_ADDRESSES_UNAVAILABLE covers other failures, including a failed address count before allocation was attempted. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' examples: allocationUnknown: summary: The request was sent, but its outcome is unknown. value: success: false error: code: DEPOSIT_ADDRESS_ALLOCATION_UNKNOWN message: "allocation outcome is unknown; check saved deposit addresses and do not automatically repeat this allocation" '503': description: | DEPOSIT_ADDRESS_NOT_WATCHED preserves any returned allocation while monitoring is unconfirmed. content: application/json: schema: anyOf: - $ref: '#/components/schemas/PartnerDepositAddressPendingResponse' - $ref: '#/components/schemas/PartnerErrorResponse' examples: monitoringPending: summary: The address is saved; retrieve its monitoring status before showing it for payment. value: success: false error: code: DEPOSIT_ADDRESS_NOT_WATCHED message: "address monitoring is pending; check readiness with GET deposit-addresses, without another allocation" data: deposit_addresses: - chain_type: evm address: "0x1111111111111111111111111111111111111111" monitoring: watched: false chains: [] /api/v1/partner/users/{user_uuid}/withdrawals/quote: post: tags: - User Management summary: Quote a withdrawal description: | Prices a withdrawal of `amount` of `crypto_currency` from the customer's XAI address to `destination_address` on `destination_chain`, and returns the EIP-712 `ForwardRequest` that authorizes it. Have the customer sign `forward_request` unchanged with their linked key, then submit it to `POST /api/v1/partner/users/{user_uuid}/withdrawals` before `expires_at`. The token arriving is the same `crypto_currency`. Destination chains for a token: `GET /api/v1/partner/send-out/routes?crypto=`. `destination_chain: xai` sends on XAI itself with no bridge. The quote is valid for 10 minutes; the signed request's `deadline` equals `expires_at`. Withdrawals need no KYC. operationId: quoteCustomerWithdrawal security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/UserUUIDPath' requestBody: required: true content: application/json: schema: type: object required: [crypto_currency, amount, destination_chain, destination_address] properties: crypto_currency: type: string example: USDC amount: type: string description: Amount to debit from the customer's XAI balance, decimal string with no more decimals than the token has example: "25.00" destination_chain: type: string description: Chain name as `GET /api/v1/partner/send-out/routes` lists it (case-insensitive), its `chain_id`, or `xai` example: Arbitrum One destination_address: type: string description: Address on the destination chain, in that chain's format example: "0x1111111111111111111111111111111111111111" responses: '201': description: Withdrawal quoted content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/WithdrawalQuote' '404': description: '`CUSTOMER_NOT_FOUND` — no customer with this `user_uuid` belongs to your partner account.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: '`WALLET_NOT_LINKED` — the customer has no linked address yet.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '400': description: '`INVALID_REQUEST` — a missing field, an unsupported chain or token, a malformed destination address, a destination the chain cannot pay (`error.details.reason`), or an amount with too many decimals.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '422': description: '`INSUFFICIENT_BALANCE`, `WALLET_TYPE_MISMATCH`, or `AMOUNT_TOO_LOW` — too small to bridge to that chain: the bridge refused it (`error.details.reason`), or its fee would exceed 2% (`error.details.bridge_fee`, `estimated_minimum_amount`, `max_fee_pct`).' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '500': description: '`INTERNAL_ERROR` — the balance or the forwarder nonce could not be read. Retry shortly.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '503': description: '`BRIDGE_UNAVAILABLE` — no bridge quote could be obtained for this destination. Retry shortly.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/users/{user_uuid}/withdrawals: post: tags: - User Management summary: Submit a signed withdrawal description: | Submit the quoted `forward_request` and the customer's signature. Unigox checks that the request is exactly the one quoted (sender, token, calldata, gas, nonce, deadline), that it was signed by the customer's linked address, re-checks the balance, and relays it; the customer pays no gas. The withdrawal keeps the quote's id: `withdrawal_id` equals `withdrawal_quote_id`. Safe to retry with the same `withdrawal_quote_id`: a quote is executed at most once, and a repeat returns the existing withdrawal. Off-ramp funding and withdrawals share the customer's forwarder nonce. Once one of them executes, a request signed with the same nonce can no longer execute and answers `409 QUOTE_EXPIRED`; request a new quote. operationId: createCustomerWithdrawal security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/UserUUIDPath' requestBody: required: true content: application/json: schema: type: object required: [withdrawal_quote_id, forward_request, signature] properties: withdrawal_quote_id: type: string format: uuid forward_request: type: object description: The `forward_request` from the quote, unchanged signature: type: string description: EIP-712 signature by the customer's linked address, hex with 0x prefix responses: '202': description: 'Withdrawal accepted and being sent on chain (`status: submitted`)' content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/CustomerWithdrawal' '400': description: '`INVALID_REQUEST` — the request differs from the quote or is not signed by the customer; `error.message` names the field.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: '`CUSTOMER_NOT_FOUND` or `WITHDRAWAL_NOT_FOUND` (unknown `withdrawal_quote_id`).' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: '`QUOTE_EXPIRED` — the quote expired, the forwarder nonce moved, or another withdrawal has not executed on XAI yet. `WALLET_NOT_LINKED` — the customer has no linked address.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '422': description: '`INSUFFICIENT_BALANCE` (the balance dropped since the quote), or `WALLET_TYPE_MISMATCH` (a `partner_wallet` customer).' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '500': description: '`INTERNAL_ERROR` — the balance or the forwarder nonce could not be read. Retry shortly.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' get: tags: - User Management summary: List the customer's withdrawals operationId: listCustomerWithdrawals security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/UserUUIDPath' - name: limit in: query schema: type: integer default: 50 minimum: 1 maximum: 100 - name: offset in: query schema: type: integer default: 0 responses: '200': description: Withdrawals, newest first content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: object properties: withdrawals: type: array items: $ref: '#/components/schemas/CustomerWithdrawal' total: type: integer '404': description: '`CUSTOMER_NOT_FOUND` — no customer with this `user_uuid` belongs to your partner account.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: '`WALLET_NOT_LINKED` — the customer has no linked address yet.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '422': description: '`WALLET_TYPE_MISMATCH` — the customer is a `partner_wallet` customer.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/users/{user_uuid}/withdrawals/{withdrawal_id}: get: tags: - User Management summary: Withdrawal by ID operationId: getCustomerWithdrawal security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/UserUUIDPath' - name: withdrawal_id in: path required: true schema: type: string format: uuid responses: '200': description: Withdrawal returned content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/CustomerWithdrawal' '404': description: '`CUSTOMER_NOT_FOUND` or `WITHDRAWAL_NOT_FOUND`. A quote that was never submitted is not a withdrawal.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: '`WALLET_NOT_LINKED` — the customer has no linked address yet.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '422': description: '`WALLET_TYPE_MISMATCH` — the customer is a `partner_wallet` customer.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' # ============================================ # 7. PARTNER KYC VERIFICATION FLOW # ============================================ # Step 3: Submit KYC data for a partner user /api/v1/partner/users/{user_uuid}/kyc-submissions: post: tags: - User Management summary: Submit KYC data for a partner user description: | Submit KYC (Know Your Customer) data for a partner user. Supports three methods: - direct_data: Partner submits PII data directly, user is verified - external_token: Partner provides external KYC provider credentials (SumSub token or Persona inquiry_id) - handoff: Unigox handles KYC verification and generates verification URL **Important for EUR/AUD/GBP off-ramp:** EUR, AUD, and GBP payouts require the user's physical address. Include `address`, `city`, and `postal_code` in the PII data when submitting KYC. If not provided at submission time, you can add them later with `PATCH /partner/users/{user_uuid}/kyc`. Without address, EUR/AUD/GBP orders will be created with status `pending_address` until the address is provided. operationId: submitKYC security: - ApiKeyAuth: [] parameters: - name: user_uuid in: path required: true description: The user_uuid returned by POST /partner/users. Partners can only access their own users. schema: type: string format: uuid example: "550e8400-e29b-41d4-a716-446655440000" requestBody: required: true content: application/json: schema: oneOf: - $ref: '#/components/schemas/KYCSubmitDirectData' - $ref: '#/components/schemas/KYCSubmitExternalToken' - $ref: '#/components/schemas/KYCSubmitHandoff' examples: direct_data: summary: Direct data submission value: method: direct_data data: pii: first_name: John last_name: Doe dob: "1990-01-01" country_code: NG address: "123 Street Name, Lagos" postal_code: "100001" direct_data_nin_bvn: summary: Direct data submission (NIN/BVN + selfie, no ID image) value: method: direct_data data: pii: first_name: Chidi last_name: Okafor dob: "1990-05-05" country_code: NG id_number: "12345678901" id_type: NIN external_token_with_sumsub: summary: External token (SumSub) value: method: external_token data: provider: sumsub token: "sumsub_external_session_id" external_token_with_persona: summary: External token (Persona) value: method: external_token data: provider: persona inquiry_id: "inq_CWQzc5afzD4dmF66EJqjdPC2T79C" handoff: summary: Handoff to Unigox value: method: handoff data: pii: first_name: John last_name: Doe country_code: NG responses: '200': description: KYC submitted successfully content: application/json: schema: $ref: '#/components/schemas/KYCSubmitResponse' '400': description: >- Bad Request — invalid method, missing required data, or a date of birth that fails validation. The response body is `{ "success": false, "data": { "error_key": "...", "message": "..." } }`. Possible `error_key` values include: `underage_not_allowed` — "User must be at least 18 years old. The provided date_of_birth indicates an age under 18."; and `invalid_date_of_birth` — "date_of_birth is invalid. Provide a real date in YYYY-MM-DD format that is in the past." `invalid_identity_number_type` — "id_type is required for NIN/BVN + selfie verification and must be one of the supported identity number types (e.g. NIN, BVN)." content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: underage: summary: Date of birth under 18 value: success: false data: error_key: underage_not_allowed message: "User must be at least 18 years old. The provided date_of_birth indicates an age under 18." invalid_dob: summary: Malformed or future date of birth value: success: false data: error_key: invalid_date_of_birth message: "date_of_birth is invalid. Provide a real date in YYYY-MM-DD format that is in the past." invalid_identity_number_type: summary: Unsupported id_type for NIN/BVN + selfie value: success: false data: error_key: invalid_identity_number_type message: "id_type is required for NIN/BVN + selfie verification and must be one of the supported identity number types (e.g. NIN, BVN)." '401': description: Unauthorized '404': description: User not found '500': description: Internal Server Error # Step 4: Upload KYC document for a partner user (for direct_data method) /api/v1/partner/users/{user_uuid}/kyc/documents: post: tags: - User Management summary: Upload KYC document for a partner user description: | Upload a KYC document for a partner user. Choose one of two upload methods: --- ### Method 1: File Upload Send the document as a file attachment. ``` POST /api/v1/partner/users/{user_uuid}/kyc/documents Content-Type: multipart/form-data document: document_type: identity_front ``` ### Method 2: Single URL Upload Send a URL pointing to one document image. ```json { "upload_method": "url_link", "document_type": "identity_front", "url": "https://example.com/id-front.jpg" } ``` ### Method 3: Batch URL Upload Upload multiple documents in one call (up to 10). ```json { "upload_method": "url_link", "documents": [ { "document_type": "identity_front", "url": "https://example.com/id-front.jpg" }, { "document_type": "selfie", "url": "https://example.com/selfie.jpg" } ] } ``` **URL requirements:** HTTPS only, 10MB per file, JPEG/PNG/GIF/PDF. --- **Supported `document_type` values** — the API accepts exactly the following (this is the complete, finite list; anything else is rejected). **Required:** a `selfie` **and** one identity-document front (`identity_front` or any equivalent ID type listed below). All other values are optional (document back sides and alternative ID types). **NIN/BVN + selfie option (verify with a registry number instead of an ID image).** This is a **two-step flow across two endpoints** — the registry number is submitted as **text**, never uploaded as a file: 1. On the **submit-KYC** endpoint (`POST .../kyc-submissions`, method `direct_data`), send the customer's data **plus** `id_number` (the registry number, as a string) and `id_type` (e.g. `NIN`, `BVN`). No image is uploaded in this step. 2. On **this** documents endpoint, upload **only a `selfie`** (`document_type: selfie`) — **no ID-document image**. The registry number from step 1 satisfies the identity requirement, so verification starts automatically (national-registry lookup + selfie face-match against the registry photo). The three upload methods below (multipart / single URL / batch URL) are for **image files** only — they are not how the registry number is sent (that is the `id_number` text field in step 1). `document_type` only selects which slot (front / back / selfie) an image occupies. It is **not** used as a document-category and it does **not** set the country: our verification system detects the actual document type from the image, and the country is taken from the customer's KYC profile (their identity/address country), independent of this value. The country names below are naming hints to help you choose — they are not enforced, so a country-specific value is never required. - Generic identity document — **general** (any country): `identity_front`, `identity_back` - Passport — **general** (any country): `passport`, `passport_front` - National ID — **general** (any country; covers e.g. Nigeria's NIN card, Kenya national ID, India Aadhaar): `national_id`, `national_id_front`, `national_id_back` - Driver license — **general** (any country): `driver_license`, `driver_license_front`, `driver_license_back` - Voter ID — **general** (any country): `voter_id`, `voter_id_front`, `voter_id_back` - Resident card — **general** (any country): `resident_card`, `resident_card_front`, `resident_card_back` - ID card — **general** (any country; catch-all for local cards without their own type below, e.g. Indonesia KTP, Pakistan Nadra Card): `id_card`, `id_card_front`, `id_card_back` - Ghana card — **Ghana** (NIA biometric national ID): `ghana_card`, `ghana_card_front`, `ghana_card_back` - Ghana SSNIT card — **Ghana** (social-security card): `ghana_ssnit_card`, `ghana_ssnit_card_front`, `ghana_ssnit_card_back` - Kenya alien card — **Kenya** (non-citizen resident ID): `kenya_alien_card`, `kenya_alien_card_front`, `kenya_alien_card_back` - Green book — **South Africa** (legacy green barcoded ID book): `green_book`, `green_book_front`, `green_book_back` - Tax ID — **general** label (primary example: India PAN card): `tax_id`, `tax_id_front`, `tax_id_back` - Colombia PPT — **Colombia** (Permiso por Protección Temporal): `colombia_ppt`, `colombia_ppt_front`, `colombia_ppt_back` - Selfie — **general** (any country): `selfie` Any front-side identity type above (e.g. `passport`, `national_id`, `tax_id`) satisfies the ID requirement — not only the literal `identity_front`. **Nigeria's NIN** is submitted as `national_id` (with the customer's country set to Nigeria); there is no separate `nin` value. **Automatic Verification:** After an identity document + `selfie` + KYC data are present, the service queues verification processing and returns immediately. The identity document can be any accepted ID type above, not only `identity_front` (e.g. `passport` + `selfie` triggers verification). A `200` response means the documents were accepted; it is not a final verification result. Asynchronous verification checks can move the user to `VERIFICATION_REJECTED` after this response. To trigger verification explicitly, or to check exactly what is still missing, call `POST /api/v1/partner/users/{user_uuid}/kyc/verify` (below). Obtain the eventual outcome by polling `GET /api/v1/partner/users/{user_uuid}/verification-status` or consuming the `user.kyc.updated` webhook. The upload response does not include a verification session ID or `kyc_status`, because asynchronous state can change immediately after acceptance. operationId: uploadPartnerKYCDocument security: - ApiKeyAuth: [] parameters: - name: user_uuid in: path required: true description: Public UUID of the user schema: type: string format: uuid example: "550e8400-e29b-41d4-a716-446655440000" requestBody: required: true content: multipart/form-data: schema: type: object required: [document, document_type] properties: document: type: string format: binary description: Document file (JPEG, PNG, GIF, or PDF, max 10MB) document_type: $ref: '#/components/schemas/KycDocumentType' application/json: schema: oneOf: - title: Single URL Upload description: Upload one document by providing an HTTPS URL. type: object required: [upload_method, document_type, url] properties: upload_method: type: string enum: [url_link] example: url_link document_type: $ref: '#/components/schemas/KycDocumentType' url: type: string format: uri description: HTTPS URL of the image. 10MB max. example: "https://example.com/id-front.jpg" - title: Batch URL Upload description: Upload multiple documents in one call (up to 10). type: object required: [upload_method, documents] properties: upload_method: type: string enum: [url_link] example: url_link documents: type: array maxItems: 10 items: type: object required: [document_type, url] properties: document_type: $ref: '#/components/schemas/KycDocumentType' url: type: string format: uri example: "https://example.com/id-front.jpg" examples: single_url: summary: Single document via URL value: upload_method: url_link document_type: identity_front url: "https://example.com/id-front.jpg" batch_url: summary: Batch upload (multiple documents) value: upload_method: url_link documents: - document_type: identity_front url: "https://example.com/id-front.jpg" - document_type: selfie url: "https://example.com/selfie.jpg" responses: '200': description: Documents accepted; verification starts asynchronously once all required documents are available content: application/json: schema: type: object required: [success, data] properties: success: type: boolean example: true data: oneOf: - title: Single document accepted type: object required: [document_id, document_type, file_name, message] properties: document_id: type: string description: Document identifier example: "f1d5f922-bee2-4c7e-88ef-18022958c4c2" document_type: type: string example: "identity_front" file_name: type: string example: "passport_photo.jpg" message: type: string description: Confirms that the document was accepted for processing. example: "Documents accepted" - title: Batch documents accepted type: object required: [uploaded, message] properties: uploaded: type: array items: type: object properties: document_type: type: string example: "identity_front" document_id: type: string example: "f1d5f922-bee2-4c7e-88ef-18022958c4c2" file_name: type: string example: "id-front.jpg" status: type: string enum: [uploaded] errors: type: array description: Per-document failures, omitted when every document succeeds. items: type: object properties: document_type: type: string example: "identity_back" error: type: string example: "Failed to download or upload document" message: type: string example: "Documents accepted" '400': description: Bad Request - invalid file type, missing document, or user not ready for uploads '401': description: Unauthorized '404': description: User not found or no active KYC session '500': description: Internal Server Error # Step 4a (optional): explicitly trigger verification and see what is still missing /api/v1/partner/users/{user_uuid}/kyc/verify: post: tags: - User Management summary: Trigger KYC verification and check readiness description: | Explicitly start KYC verification for a partner user on the `direct_data` image flow, or check what is still missing. Verification **also** starts automatically once an identity document + selfie + KYC data are present (see the document upload endpoint) — this endpoint is an explicit control and readiness check, not the only path. No request body. The response tells you the state: - **Ready, started:** `{ "ready": true, "status": "IN_PROGRESS", "message": "Verification started." }`. Idempotent — if a run is already in flight, the message is `"Verification is already in progress."` and no duplicate run is created. - **Already verified:** `{ "ready": true, "status": "VERIFIED", "message": "User is already verified." }`. - **Not ready:** `{ "ready": false, "missing": ["identity_document", "selfie"], "message": "..." }`. The `missing` items are generic: `identity_document` (any accepted ID type), `selfie`, `kyc_data`. If the user has not submitted KYC with the `direct_data` method yet, this returns `400` — submit KYC via `POST /api/v1/partner/users/{user_uuid}/kyc-submissions` first. operationId: runPartnerKYCVerification security: - ApiKeyAuth: [] parameters: - name: user_uuid in: path required: true description: Public UUID of the user schema: type: string format: uuid example: "550e8400-e29b-41d4-a716-446655440000" responses: '200': description: | Readiness result. Either verification was triggered / is already running / the user is already verified, or the user is not ready and `missing` lists what to provide. content: application/json: schema: type: object properties: success: type: boolean example: true data: type: object properties: ready: type: boolean example: true status: type: string enum: [IN_PROGRESS, VERIFIED] description: Present when `ready` is true. example: "IN_PROGRESS" missing: type: array description: Present when `ready` is false — the required items still to provide. items: type: string enum: [identity_document, selfie, kyc_data] example: ["identity_document", "selfie"] message: type: string example: "Verification started." examples: started: summary: Ready — verification started value: success: true data: ready: true status: IN_PROGRESS message: "Verification started." already_verified: summary: Already verified value: success: true data: ready: true status: VERIFIED message: "User is already verified." not_ready: summary: Not ready — items missing value: success: true data: ready: false missing: [identity_document, selfie] message: "Missing required items: identity document, selfie. Upload them, then verification starts automatically (or call this endpoint again)." '400': description: Bad Request - the user has not submitted KYC with the direct_data method yet '401': description: Unauthorized '404': description: User not found '500': description: Internal Server Error # Step 4b: Update optional KYC fields for a partner user /api/v1/partner/users/{user_uuid}/kyc: patch: tags: - User Management summary: Update KYC data for a partner user description: | Update optional PII fields on existing KYC data. The user stays verified. Only optional fields can be updated. Required fields (first_name, last_name, country_code) cannot be changed. For EUR/AUD/GBP offramp, provide address, city, and postal_code here. These will auto-populate into payment details for EUR/AUD/GBP payouts. **Sender identity (consumer-to-consumer payout rails).** Chinese mobile wallets (Alipay, WeChat Pay) settle person to person: the receiving wallet must show the paying customer as the remitter, not Unigox. `POST /offramp/initiate` returns `422 SENDER_IDENTITY_REQUIRED` when the customer's record cannot name them, listing the fields to send here in `error.details.kyc_fields`. `gender`, `nationality`, `id_issue_country` and `source_of_funds` exist for that flow, alongside `dob`, `phone_number`, `id_number`, `id_type` and the address fields the same rails need. Send them once, then retry the order. The values are normalized before they are stored, and a value the rail would reject is a `400` here rather than a failed payout later: `gender` accepts `M`/`F` (`MALE`/`FEMALE` are folded in), `nationality` and `id_issue_country` take an ISO 3166-1 alpha-2 code, and `source_of_funds` takes one of the listed slugs. Length is the exception, because the ceiling belongs to the payout rail and this record is not tied to one: a value too long for a corridor is accepted here and comes back from that corridor's `initiate` as a listed field, with the ceiling in `error.details.field_limits`. The record belongs to the customer, not to a payout destination — never send another person's details here to satisfy a payout. operationId: updateKYC security: - ApiKeyAuth: [] parameters: - name: user_uuid in: path required: true description: The user_uuid returned by POST /partner/users. schema: type: string format: uuid example: "550e8400-e29b-41d4-a716-446655440000" requestBody: required: true content: application/json: schema: type: object properties: address: type: string description: Street address example: "Svitrigailos g 29" city: type: string description: City example: "Vilnius" postal_code: type: string example: "03229" dob: type: string format: date description: >- Date of birth (YYYY-MM-DD). Must be in the past and indicate an age of at least 18; a future, malformed, or under-18 date is rejected with HTTP 400. example: "1990-01-01" phone_number: type: string description: E.164 format example: "+37012345678" middle_name: type: string id_number: type: string description: >- Document number, as printed on the document named by `id_type`. example: "AK9931245" id_type: type: string enum: [NATIONAL_ID, DRIVER_LICENSE, PASSPORT, RESIDENCE_PERMIT] gender: type: string enum: [M, F] description: >- Sender identity. As it appears on the identity document — payout rails match it against the document, so this is not a self-description field. `MALE`/`FEMALE` are accepted and normalized to `M`/`F`. example: "F" nationality: type: string description: >- Sender identity. Nationality as an ISO 3166-1 alpha-2 code. example: "LT" id_issue_country: type: string description: >- Sender identity. Country that issued the document, ISO 3166-1 alpha-2. Often but not always the same as `nationality`. example: "LT" source_of_funds: type: string enum: - salary - business_income - savings - investment - gift - family_support - loan - sale_of_property - inheritance - other description: >- Sender identity. Where the money being sent comes from. Each payout rail maps this onto its own catalogue and refuses a payout it cannot map, so send the closest listed value rather than `other` when one applies. example: "salary" responses: '200': description: >- KYC data updated successfully. `updated_fields` names only the fields that actually reached the record. A recognised field sent blank is a no-op rather than an error, so a patch whose recognised fields are all blank answers `200` with `updated_fields: []` and nothing is written — this endpoint does not clear a stored value. content: application/json: schema: type: object properties: success: type: boolean example: true data: type: object properties: updated_fields: type: array items: type: string description: >- Fields written by this patch. Empty when every recognised field in the body was blank. example: ["address", "city", "postal_code"] message: type: string example: "KYC data updated successfully" '400': description: >- Bad request — no valid fields, attempting to change a required field, or a value that fails validation. Body: `{ "success": false, "data": { "error_key": "...", "message": "..." } }`. DOB-related `error_key` values: `underage_not_allowed` (age under 18) and `invalid_date_of_birth` (malformed or future date). Sender-identity values: `invalid_gender`, `invalid_country_code` (`nationality` / `id_issue_country` is not an alpha-2 code) and `invalid_source_of_funds`. `invalid_field_value` means a value was sent as an object or an array where a string or a number is expected. `no_valid_kyc_fields` means the body carried no updatable field at all. Nothing is written when one field is rejected — fix it and resend the whole patch. '401': description: Unauthorized '404': description: User not found # Step 5: Get verification status for a partner user (check KYC status) /api/v1/partner/users/{user_uuid}/verification-status: get: tags: - User Management summary: Verification status for a partner user description: | Get the current verification status for a partner user. This endpoint returns the current status, verification URL (if available), and other relevant information. Optionally, you can provide a verification_id to check a specific verification session. Status values: - `NOT_INITIATED` — no verification started yet - `PENDING_DOCUMENTS` — waiting for the customer to submit documents - `IN_PROGRESS` — automated verification is underway (usually a couple of minutes) - `UNDER_REVIEW` — under manual compliance review; the customer is being reviewed by our team and is NOT yet cleared. Unlike `IN_PROGRESS` (automated, usually a couple of minutes), this can take up to 24 hours. Keep polling; treat as not cleared. - `VERIFIED` — verification passed; the customer is approved - `FAILED` — verification could not be completed due to an error - `VERIFICATION_REJECTED` — verification completed with a rejection outcome Non-terminal states (`NOT_INITIATED`, `PENDING_DOCUMENTS`, `IN_PROGRESS`, `UNDER_REVIEW`) mean the customer is not cleared yet — keep polling. A manual compliance review is now surfaced as the friendly `UNDER_REVIEW` (the internal review-state name is still never exposed) so you can tell a long human review apart from a quick automated check and set the right expectation with your customer. operationId: getVerificationStatus security: - ApiKeyAuth: [] parameters: - name: user_uuid in: path required: true description: The user_uuid returned by POST /partner/users. Partners can only access their own users. schema: type: string format: uuid example: "550e8400-e29b-41d4-a716-446655440000" - name: verification_id in: query required: false description: Optional verification session ID. If not provided, the latest verification session for the user will be checked. schema: type: string example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" responses: '200': description: Successfully retrieved verification status content: application/json: schema: $ref: '#/components/schemas/VerificationStatusResponse' example: success: true data: status: "IN_PROGRESS" verification_url: "https://verify.example.com/session/abc123" verification_seconds_left: 3600 '401': description: Unauthorized '404': description: User not found '500': description: Internal Server Error # ============================================ # 6. PARTNER PAYMENT DETAILS MANAGEMENT # ============================================ # Step 6: Create payment details for a partner user (for offramp operations) /api/v1/partner/users/{user_uuid}/payment-details: post: tags: - User Management summary: Create payment details for a partner user description: | Create payment details (beneficiary details) for a partner user. Used for offramp operations where crypto is converted to fiat and sent to the user's payment account. Partners can only access their own users. Payment details must belong to the same beneficiary represented by `user_uuid`. Do not attach phone numbers, bank accounts, wallets, or other payout instruments for unrelated people to the same partner user. If you need to pay a different person, create a separate partner user for that beneficiary first. Institution handling: - for most rails, `institution_id` must be provided from `/api/v1/supported/institutions` - partners may omit `institution_id` only for the explicitly supported rails below Currently supported omission rails: - `iban-sepa`, `nip-nigeria`, `faster-payments` — resolve to the generic `other-bank` payment method - `imps-neft-india` — resolves to the generic `imps-or-neft-transfer` method; the bank comes from `bank_name` + `ifsc_code` - `alipay-wallet`, `wechat-wallet`, `interac-e-transfer` — resolve to the rail's own institution (`alipay`, `wechat-pay`, `interac-e-transfers`) and go through the same checks as if you had sent it operationId: createPaymentDetails security: - ApiKeyAuth: [] parameters: - name: user_uuid in: path required: true description: The user_uuid returned by POST /partner/users. Partners can only access their own users. schema: type: string format: uuid example: "550e8400-e29b-41d4-a716-446655440000" requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreatePaymentDetailsRequest' examples: iban-sepa: summary: SEPA payment details (Europe, institution optional) value: currency: EUR rail: iban-sepa country_code: DE details: full_name: "John Doe" iban: DE89370400440532013000 cvu-argentina: summary: CVU payment details (Argentina - Mobile Money/Wallets) value: currency: ARS rail: cvu-cbu institution_id: uala country_code: AR details: cvu: "0000003100000001234567" alias: "john.doe" phone_number: "+541112345678" cbu-argentina: summary: CBU payment details (Argentina - Traditional/Digital Banks) value: currency: ARS rail: cvu-cbu institution_id: banco-santander-argentina country_code: AR details: cbu: "0000003100000001234567" alias: "john.doe" phone_number: "+541112345678" responses: '201': description: Payment details created successfully content: application/json: schema: $ref: '#/components/schemas/CreatePaymentDetailsResponse' '400': description: Bad Request - invalid payment details or unsupported combination content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: success: false data: error_key: "invalid_payment_details" '401': description: Unauthorized '404': description: User not found '422': description: >- Recipient details are incomplete or invalid for the payout corridor. The recipient fields you supply are validated against the provider's per-corridor requirements; if a required field is missing or malformed, the recipient is not created and the offending field names are listed in the error message. Fix the details and resubmit. Address fields auto-populated from KYC are not part of this check (a missing address does not block creation — see the KYC endpoints). content: application/json: schema: type: object properties: success: type: boolean example: false error: type: string description: Human-readable message naming the missing or invalid recipient fields. example: success: false error: "recipient details are incomplete or invalid for this payout method: iban — please correct and resubmit" '500': description: Internal Server Error # Step 7: Get all payment details for a partner user get: tags: - User Management summary: Payment details for a partner user description: Retrieve all payment details (payment profiles) for a partner user. Returns all saved beneficiary details that can be used for offramp operations. Partners can only access their own users. operationId: getPaymentDetails security: - ApiKeyAuth: [] parameters: - name: user_uuid in: path required: true description: The user_uuid returned by POST /partner/users. Partners can only access their own users. schema: type: string format: uuid example: "550e8400-e29b-41d4-a716-446655440000" responses: '200': description: Successfully retrieved payment details content: application/json: schema: $ref: '#/components/schemas/GetPaymentDetailsResponse' '401': description: Unauthorized '404': description: User not found '500': description: Internal Server Error # Step 7b / 8: Get or delete a single payment detail for a partner user /api/v1/partner/users/{user_uuid}/payment-details/{payment_details_id}: get: tags: - User Management summary: Get a single payment detail for a partner user description: | Retrieve one payment detail (payment profile) by its `payment_details_id`, returning the same shape as one element of the list endpoint (`rail`, `currency`, `institution_name`, `institution_id`, `details`). Use this when you already hold a `payment_details_id` instead of listing every payment detail for the user — it stays fast on accounts with many saved payment details. Partners can only access their own users. A payment detail that belongs to a different user (or another partner) returns `404` rather than revealing that it exists. operationId: getPaymentDetailById security: - ApiKeyAuth: [] parameters: - name: user_uuid in: path required: true description: The user_uuid returned by POST /partner/users. Partners can only access their own users. schema: type: string format: uuid example: "550e8400-e29b-41d4-a716-446655440000" - name: payment_details_id in: path required: true description: The payment_details_id returned when creating or listing payment details. schema: type: string example: "987" responses: '200': description: Successfully retrieved the payment detail content: application/json: schema: $ref: '#/components/schemas/GetPaymentDetailResponse' '400': description: Bad Request - malformed payment_details_id content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '401': description: Unauthorized '404': description: User not found, or payment detail not found / not owned by this user '500': description: Internal Server Error delete: tags: - User Management summary: Delete payment details for a partner user description: Delete a specific payment details (payment profile) for a partner user by its ID. Partners can only access their own users. operationId: deletePaymentDetails security: - ApiKeyAuth: [] parameters: - name: user_uuid in: path required: true description: The user_uuid returned by POST /partner/users. Partners can only access their own users. schema: type: string format: uuid example: "550e8400-e29b-41d4-a716-446655440000" - name: payment_details_id in: path required: true description: The payment_details_id returned when creating payment details. schema: type: string example: "987" responses: '200': description: Payment details deleted successfully content: application/json: schema: type: object properties: success: type: boolean example: true data: type: object properties: message: type: string example: "Payment details deleted successfully" '401': description: Unauthorized '404': description: User not found or payment details not found '409': description: Conflict - payment details linked to active offers '500': description: Internal Server Error # ============================================ # 8. LIQUIDITY # ============================================ /api/v1/partner/liquidity: get: tags: - Liquidity summary: Get aggregated liquidity by trading pairs description: | Returns real-time aggregated liquidity data across all active off-ramp offers. Use this endpoint for **liquidity discovery** — to determine which crypto/fiat pairs are currently available, what fiat amount ranges are supported, and which payment methods are accepted. No pricing or vendor details are returned. **Trade type semantics:** `trade_type` is expressed in partner terms. `SELL` means the partner sells crypto and receives fiat (the most common off-ramp direction). `BUY` means the partner buys crypto by sending fiat. **Eligibility:** Only offers that pass the same gates as the vendor-matching engine are included — the offer must be authorized, the vendor must be active and online, and at least one payment method option must be active. **Aggregation:** Results are grouped by `(crypto_currency_code, fiat_currency_code, trade_type)`. Amount ranges span the minimum and maximum across all eligible offers in the group. Payment methods are deduplicated and sorted alphabetically. **Delayed settlement (T+1):** by default the bands include T+1 offers whose licensed partner is enabled for T+1, so a band's ceiling can be one only a T+1 order reaches. Pass `exclude_delayed_settlement=true` for instant offers only, the bands a partner without delayed settlement can match. **Authentication:** None. This is a public endpoint — no API key required. security: [] parameters: - name: exclude_delayed_settlement in: query required: false description: >- `true` leaves delayed settlement (T+1) offers out of every band. Absent, empty or `false` keeps them. Also accepted, with surrounding spaces ignored: `1`/`0`, `t`/`f`, `T`/`F`, `TRUE`/`FALSE` and `True`/`False`; anything else answers `400 INVALID_REQUEST`. schema: type: boolean default: false responses: '200': description: Liquidity pairs retrieved successfully content: application/json: schema: type: object properties: success: type: boolean example: true data: type: object properties: pairs: type: array items: $ref: '#/components/schemas/LiquidityPair' example: success: true data: pairs: - crypto_currency_code: USDC fiat_currency_code: EUR trade_type: SELL min_amount: 50.00 max_amount: 10000.00 min_amount_usd: 54.35 max_amount_usd: 10870.00 payment_methods: - sepa - wise - crypto_currency_code: USDC fiat_currency_code: NGN trade_type: SELL min_amount: 50000.00 max_amount: 5000000.00 min_amount_usd: 31.25 max_amount_usd: 3125.00 payment_methods: - gtbank - zenith-bank '400': description: "`exclude_delayed_settlement` is not one of the accepted values." content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INVALID_REQUEST message: "exclude_delayed_settlement must be true or false" '500': description: Internal server error # ============================================ # 9. ON-RAMP OPERATIONS # ============================================ /api/v1/partner/onramp/estimate: post: tags: - On-Ramp summary: Get on-ramp price estimate description: | Get indicative on-ramp pricing (fiat to crypto) without creating a quote. This endpoint is lightweight and does not reserve liquidity. Use this when you need quick pricing discovery before calling `/partner/onramp/quote`. Optional filters: `payment_method_slug`, `payment_network_slug`, `provider_scope`, `country_code`. This endpoint is indicative and does not apply user/payment-details ownership checks; for executable pricing use quote (which still requires an API key). **Authentication:** None. This is a public endpoint — no API key required (same as `/partner/liquidity`). operationId: getOnRampEstimate security: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PartnerPriceEstimateRequest' example: crypto_currency: USDT fiat_currency: VND fiat_amount: "26345" payment_method_slug: zalopay payment_network_slug: napas-vietnam country_code: VN provider_scope: all partner_fee_pct: "1" responses: '200': description: Estimate retrieved successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PartnerPriceEstimateResponse' example: success: true data: rate: "26345.00" crypto_amount: "1.005000" fiat_amount: "26345.00" fee_breakdown: platform_fee: "0.005000" platform_fee_pct: 0.5 partner_fee: "0.010000" partner_fee_pct: 1 total_fee: "0.015000" payment_method_slug: zalopay payment_network_slug: napas-vietnam provider_scope: all is_indicative: true '400': description: | Bad request — invalid parameters, missing required fields, unsupported cryptocurrency, or invalid provider_scope. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' examples: invalid_amount: summary: Invalid amount configuration value: success: false error: code: INVALID_REQUEST message: "exactly one of crypto_amount or fiat_amount must be provided" unsupported_crypto: summary: Unsupported cryptocurrency value: success: false error: code: INVALID_REQUEST message: "unsupported cryptocurrency: BTC" invalid_provider_scope: summary: Invalid provider_scope value value: success: false error: code: INVALID_REQUEST message: "invalid provider_scope: must be all, licensed_only, or p2p_only" '409': description: No offers available for the requested pair/amount content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: NO_OFFERS_AVAILABLE message: "no matching offers found for the provided criteria" '500': description: Internal Server Error /api/v1/partner/onramp/quote: post: tags: - On-Ramp summary: Get on-ramp quote description: | Get a price quote for an on-ramp operation (fiat to crypto). Returns the exchange rate, amounts, and a quote ID that can be used to initiate the order. Quotes expire after 60 seconds. The `user_uuid` is the public UUID returned by `POST /partner/users` (the `id` field). **Fee structure:** The `fee_breakdown` object shows all fee components transparently: `platform_fee` (our fee in crypto), `partner_fee` (your per-order markup in crypto — declare it by passing `partner_fee_pct` on the quote/estimate request, where `1` means 1%), `partner_fee_pct` (the percentage applied), and `total_fee` (sum of both). The partner fee is computed on the same crypto base as the platform fee (non-compounding). There's no separate transfer leg for on-ramp: at release the full buyer amount lands in your partner wallet, and the markup is captured by withholding it when the crypto bridges out at send-out (for a crypto-anchored order, the trade is sized up beforehand so the requested amount still arrives net of the withheld fee). The withheld markup stays in your partner wallet: a fee wallet set in the partner dashboard (see the off-ramp quote) does not move it. For a non-custodial (external_wallet) customer nothing is withheld at send-out: the markup is paid at release, to your fee wallet (or your partner wallet if none is set). What the end user receives: `crypto_amount − fee_breakdown.platform_fee − fee_breakdown.partner_fee` for a fiat-anchored order, or exactly the `crypto_amount` you requested for a crypto-anchored order. Apply your fee on the **same side** the platform does, or your receipts won't reconcile with our orders. `crypto_amount` in responses and webhooks stays partner-fee-exclusive, with two exceptions: a crypto-anchored onramp order (request declares `crypto_amount`) is sized up so the delivered amount stays exact after the markup is withheld, so `crypto_amount` there includes the markup; a crypto-anchored offramp order (request declares `crypto_amount`) carves both fees out of the pinned deposit, so `crypto_amount` and `platform_fee` both shrink relative to a no-markup request even though the markup itself stays out of `crypto_amount`. Every other case is unaffected — the markup shows only in `fee_breakdown` (and in the funding amount returned by transfer authorization for offramp). Fiat-anchored offramp orders have no cap on the markup — the deposit grows to cover it. Every other case hits a formula domain bound, not a business cap: onramp rejects `partner_fee_pct >= 100` (the withheld or grossed-up fee would consume the entire buyer amount, leaving nothing delivered); crypto-anchored offramp rejects it when the fee would consume the entire pinned deposit. **Payment method:** Provide `payment_method_slug` and/or `payment_network_slug` to narrow routing. If omitted, the best available option for the pair is selected automatically. **KYC requirement:** The customer must be KYC-cleared before you can quote or transact for them. If the customer is not cleared, this endpoint returns `422 KYC_NOT_CLEARED` and `error.details.kyc_status` carries their current partner-facing KYC status. A customer still in compliance review is reported as `IN_PROGRESS` — treat `IN_PROGRESS` as "not cleared yet" and keep polling `GET /api/v1/partner/users/{user_uuid}/verification-status`. operationId: getOnRampQuote security: - ApiKeyAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PartnerOnRampQuoteRequest' example: user_uuid: "23d60610-9737-43b2-a751-a2c6a7bba457" fiat_amount: "26345" fiat_currency: VND crypto_currency: USDT payment_method_slug: zalopay payment_network_slug: napas-vietnam country_code: VN partner_fee_pct: "1" responses: '200': description: Quote retrieved successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PartnerOnRampQuoteResponse' example: success: true data: quote_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" rate: "26345.00" crypto_amount: "1.005000" fiat_amount: "26345.00" fee_breakdown: platform_fee: "0.005000" platform_fee_pct: 0.5 partner_fee: "0.010000" partner_fee_pct: 1 total_fee: "0.015000" payment_method_slug: zalopay payment_network_slug: napas-vietnam expires_at: "2026-03-30T19:15:50Z" '400': description: Bad request — invalid parameters or missing required fields content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INVALID_REQUEST message: "Missing required field: fiat_currency" '401': description: Unauthorized — invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: UNAUTHORIZED message: "Invalid or missing API key" '404': description: User not found content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INVALID_REQUEST message: "User not found" '409': description: No offers available for the requested pair content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: NO_OFFERS_AVAILABLE message: "No offers available for USDT/VND" '422': description: >- The customer is not KYC-cleared. `error.details.kyc_status` carries the customer's current partner-facing KYC status — one of `IN_PROGRESS`, `UNDER_REVIEW`, `PENDING_DOCUMENTS`, `VERIFICATION_REJECTED`, or `NOT_INITIATED`. `UNDER_REVIEW` means a manual compliance review (up to 24h); keep the customer waiting and re-check. The message stays generic. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: KYC_NOT_CLEARED message: "Customer is not cleared for this transaction" details: kyc_status: "IN_PROGRESS" '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/onramp/initiate: post: tags: - On-Ramp summary: Initiate on-ramp order description: | Initiate an on-ramp order using a previously obtained quote. The quote must still be active (not expired or already used). On success, returns the created order with status `awaiting_liquidity_provider`. Once a vendor accepts, the order moves to `awaiting_vendor_escrow_funding`, then `awaiting_fiat_transfer` when the crypto is locked in escrow. For an `external_wallet` customer the crypto is released to the customer's own address on completion, and your `partner_fee` is paid to your fee wallet (or your partner wallet if none is set) in the same release transaction. At `awaiting_fiat_transfer` the partner must call `confirm-payment-sent` to advance the order — unless the order's `fiat_funding_source` is `own_account`. Then `next_action` is `deposit_to_user_account`: the customer transfers the order's fiat amount into the fiat account issued to them, that transfer confirms the payment, and `confirm-payment-sent` is not used. If the money is already on that account, pay the order from it with `POST /api/v1/partner/orders/{order_id}/pay-from-balance` instead of a new transfer. If the order type is `payment_request`, call `submit-payer-details` first before confirming. **KYC requirement:** The customer must be KYC-cleared, as described on `POST /onramp/quote`. If they are not, this endpoint returns `422 KYC_NOT_CLEARED` with the customer's partner-facing status in `error.details.kyc_status`. The check is re-applied as the order moves toward payout. operationId: initiateOnRamp security: - ApiKeyAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PartnerInitiateRequest' example: quote_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" reference_id: "your-internal-order-id" responses: '200': description: >- On-ramp order created. Success answers `200`, not `201`. content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PartnerInitiateResponse' example: success: true data: order_id: "ce3cfd6a-1234-5678-abcd-ef1234567890" status: awaiting_liquidity_provider quote_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" reference_id: "your-internal-order-id" order_type: onramp amounts: crypto_amount: "1.005000" fiat_amount: "26476.72" crypto_currency: USDT fiat_currency: VND rate: "26345.00" fee_breakdown: platform_fee: "0.005000" platform_fee_pct: 0.5 partner_fee: "0.010000" partner_fee_pct: 1 total_fee: "0.015000" timeline: [] created_at: "2026-03-30T19:00:05Z" '400': description: Bad request — missing required fields content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '401': description: Unauthorized — invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: Quote not found content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: QUOTE_NOT_FOUND message: "Quote not found" '409': description: Quote expired or already used. Also `WALLET_NOT_LINKED` (an `external_wallet` customer with no linked address) and `OPERATION_NOT_ALLOWED` (a partner fee on an `external_wallet` customer's order while your partner account has neither a fee wallet nor a partner wallet to receive it). content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' examples: quote_expired: summary: Quote has expired value: success: false error: code: QUOTE_EXPIRED message: "Quote has expired, please request a new quote" quote_already_used: summary: Quote already consumed value: success: false error: code: QUOTE_ALREADY_USED message: "quote has already been used to initiate an order" details: order_id: "b2c3d4e5-f6a7-8901-bcde-f12345678901" '422': description: >- The customer is not KYC-cleared. `error.details.kyc_status` carries the customer's current partner-facing KYC status — one of `IN_PROGRESS`, `UNDER_REVIEW`, `PENDING_DOCUMENTS`, `VERIFICATION_REJECTED`, or `NOT_INITIATED`. `UNDER_REVIEW` means a manual compliance review (up to 24h); keep the customer waiting and re-check. The message stays generic. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: KYC_NOT_CLEARED message: "Customer is not cleared for this transaction" details: kyc_status: "IN_PROGRESS" '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/orders/{order_id}/submit-payer-details: post: tags: - On-Ramp summary: Submit payer details description: | Submit the end-user's payment details for a `payment_request` on-ramp order. Only required when the order type is `payment_request` — regular on-ramp orders do not need this step. **Order types:** - **Regular on-ramp** — the vendor sends fiat to the end-user directly. No payer details needed. The partner receives vendor payment details in the `vendor_payment_details` field of `GET /orders/:id` and forwards them to the end-user to initiate the transfer. - **`payment_request` on-ramp** — the vendor sends a payment request (e.g. M-Pesa push) to the end-user. The end-user's account details must be submitted here first so the vendor knows where to send the request. Check `payment_request: true` in the order response to identify this type. Call this endpoint after initiating the order and before calling `confirm-payment-sent`. The order must be in `awaiting_fiat_transfer` status. Provide either a `payment_details_id` (referencing a previously saved payment profile) or an inline `payment_details` object with the payer's account information. operationId: submitPayerDetails security: - ApiKeyAuth: [] parameters: - name: order_id in: path required: true description: Order UUID returned by the initiate endpoint schema: type: string format: uuid example: "ce3cfd6a-1234-5678-abcd-ef1234567890" requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SubmitPayerDetailsRequest' examples: by_id: summary: Using a saved payment profile value: payment_details_id: 1444 inline: summary: Providing details inline value: payment_details: payment_method_id: 5 payment_network_id: 12 details: phone: "+254712345678" name: "John Doe" country_code: KE responses: '200': description: Payer details submitted successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: object properties: message: type: string example: "payer details submitted successfully" example: success: true data: message: "payer details submitted successfully" '400': description: Bad request — invalid or missing payer details content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '401': description: Unauthorized — invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: Order not found content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: ORDER_NOT_FOUND message: "Order not found" '409': description: Order is not in the correct status or not a payment_request order content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INVALID_STATUS message: "Order is not in awaiting_fiat_transfer status" '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/orders/{order_id}/confirm-payment-sent: post: tags: - On-Ramp summary: Confirm fiat payment sent description: | Confirm that the end-user has initiated the fiat payment to the vendor. This advances the order from `awaiting_fiat_transfer` to `fiat_transfer_pending`, signalling to the vendor that the fiat is on its way. For `payment_request` orders, call `submit-payer-details` first. No request body required. operationId: confirmPaymentSent security: - ApiKeyAuth: [] parameters: - name: order_id in: path required: true description: Order UUID schema: type: string format: uuid example: "ce3cfd6a-1234-5678-abcd-ef1234567890" responses: '200': description: Payment confirmed successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: object properties: order_id: type: string format: uuid example: "ce3cfd6a-1234-5678-abcd-ef1234567890" status: type: string example: fiat_transfer_pending example: success: true data: order_id: "ce3cfd6a-1234-5678-abcd-ef1234567890" status: fiat_transfer_pending '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '401': description: Unauthorized — invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: Order not found content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: ORDER_NOT_FOUND message: "Order not found" '409': description: Order is not in awaiting_fiat_transfer status content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INVALID_STATUS message: "Order is not in awaiting_fiat_transfer status" '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/orders/{order_id}/pay-from-balance: post: tags: - On-Ramp summary: Pay an on-ramp from the customer's account balance description: | Pays an on-ramp order with `fiat_funding_source: own_account` out of money already standing on the customer's fiat account, instead of a new transfer. The order's `fiat_amount` is taken from the account named in the order's `fiat_account_id` (or, for an order opened before the account was issued, the customer's open account in that currency), and the order then continues exactly as if that amount had just arrived. Offered in `allowed_actions` as `pay-from-balance` while the order is `awaiting_fiat_transfer` and its fiat has not been collected. Read the account's `balances` first: `available` is what can be spent. No request body. Repeating the call for the same order never takes the money twice: a payment already taken is answered from its record. If a transfer has already funded the order, the call is refused. **KYC requirement:** the customer must still be KYC-cleared; otherwise `422 KYC_NOT_CLEARED`. operationId: payOnRampFromBalance security: - ApiKeyAuth: [] parameters: - name: order_id in: path required: true description: Order UUID schema: type: string format: uuid example: "ce3cfd6a-1234-5678-abcd-ef1234567890" responses: '200': description: The fiat was taken from the balance. The order, as `GET /api/v1/partner/orders/{order_id}` returns it. content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PartnerOrderResponse' '400': description: '`INVALID_REQUEST` — malformed `order_id`, or the order is not an on-ramp.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '401': description: Unauthorized — invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: '`ORDER_NOT_FOUND`' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: | - `OPERATION_NOT_ALLOWED` — the order is not paid from the customer's own account, a transfer already funds it, or part of the balance is under review and the rest does not cover the order. - `INVALID_STATUS` — the order is not waiting for its fiat, or its payment window has closed. - `FIAT_ACCOUNT_REQUIRED` — the customer has no open fiat account this order can be paid from. Nothing was taken. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INVALID_STATUS message: "this order's payment window has closed" '422': description: | - `INSUFFICIENT_BALANCE` — the available balance does not cover the order's `fiat_amount`. - `KYC_NOT_CLEARED` — the customer is no longer cleared. Nothing was taken. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INSUFFICIENT_BALANCE message: "the available balance on the customer's account does not cover this order" '500': description: '`INTERNAL_ERROR` — read the order before retrying; a retry never takes the money twice.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '502': description: '`INTERNAL_ERROR` from the gateway — the order service could not be reached or failed. The payment may have been taken: read the order (`GET /api/v1/partner/orders/{order_id}`) before retrying; a retry never takes the money twice.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INTERNAL_ERROR message: "the request could not be completed and may have been applied: read the order before retrying" '503': description: '`PAY_FROM_BALANCE_UNAVAILABLE` — not available right now. Nothing was taken; the customer can still transfer.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '504': description: '`INTERNAL_ERROR` from the gateway — the order service did not answer within 90 s. The payment may still have been taken: read the order before retrying; a retry never takes the money twice.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INTERNAL_ERROR message: "the request did not complete in time and may still have been applied: read the order before retrying" /api/v1/partner/send-out/routes: get: tags: - On-Ramp summary: List send-out destinations description: | Lists where a completed on-ramp order of the given crypto can be withdrawn with `bridge-authorization-parameters` / `authorize-bridge`. Same catalog and names as the withdraw screen on unigox.com: the token is the order's crypto, and each route is a chain that carries that token. Pass `destination_chain` exactly as listed (or the `chain_id`). operationId: getSendOutRoutes security: - ApiKeyAuth: [] parameters: - name: crypto in: query required: true description: The order's crypto code, e.g. `USDT` or `USDC` schema: type: string example: USDT responses: '200': description: Destination chains for that crypto content: application/json: example: success: true data: crypto: USDT routes: - destination_chain: Arbitrum One chain_id: "42161" chain_type: EVM token: code: USDT address: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9" decimals: 6 - destination_chain: Tron chain_id: "728126428" chain_type: TVM token: code: USDT address: "0xa614f803b6fd780986a42c78ec9c7f77e6ded13c" decimals: 6 '400': description: Missing crypto content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/orders/{order_id}/bridge-authorization-parameters: get: tags: - On-Ramp summary: Get send-out authorization parameters description: | After an on-ramp order reaches `completed` status (crypto on your partner wallet), the partner can optionally initiate a cross-chain send-out to transfer the USDT to an external network (e.g. Arbitrum). `partner_wallet` customers only. For an `external_wallet` customer the crypto is released to the customer's own address, and they move it onward with `POST /api/v1/partner/users/{user_uuid}/withdrawals/quote`; this endpoint answers `422 WALLET_TYPE_MISMATCH`. This endpoint returns the EIP-712 `ForwardRequest` parameters required to authorize the transfer. The partner must sign the request locally and submit the signature to `POST /api/v1/partner/orders/{order_id}/authorize-bridge`. **Prerequisites:** - Order status must be `completed` (internal: `escrow_released_to_buyer`) - `destination_chain` is a chain name exactly as `GET /partner/send-out/routes` lists it (e.g. `Arbitrum One`, `BNB Smart Chain`, case-insensitive) or its `chain_id` - The order's own crypto is sent; only chains that carry that token are accepted - `destination_address` must be valid for the chain type (EVM `0x…`, Tron `T…`, Solana, TON) **Response includes:** - `forward_request` — pre-filled EIP-712 ForwardRequest object to sign - `eip712_domain` — domain parameters for EIP-712 signing - `quote_id` — bridge quote ID embedded in the transfer calldata - `to_amount` — estimated USDT amount to be received on the destination chain (atomic units) - `forwarder_nonce` — current on-chain nonce for your partner wallet operationId: getBridgeAuthorizationParameters security: - ApiKeyAuth: [] parameters: - name: order_id in: path required: true description: Order UUID schema: type: string format: uuid example: "ce3cfd6a-1234-5678-abcd-ef1234567890" - name: destination_chain in: query required: true description: Destination chain name as listed by `GET /partner/send-out/routes` (e.g. `Arbitrum One`), case-insensitive, or its `chain_id` schema: type: string example: Arbitrum One - name: destination_address in: query required: true description: Recipient address on the destination chain, in that chain's format schema: type: string example: "0x5555555555555555555555555555555555555555" responses: '200': description: Authorization parameters returned successfully content: application/json: example: success: true data: order_id: "ce3cfd6a-1234-5678-abcd-ef1234567890" chain_id: "660279" rpc_url: "https://xai-chain.net/rpc" token_address: "0xf86Cc81F4E480CF54Eb013FFe6929a0C2Ad5EdCA" forwarder_address: "0x6fFCF38bEc8c733b096958fcd2a8E31A00530EDC" solver_address: "0x6666666666666666666666666666666666666666" sender_address: "0x4444444444444444444444444444444444444444" amount_atomic: "10100" amount_human: "0.010100" crypto_currency: "USDT" crypto_decimals: 6 recommended_gas: "500000" recommended_ttl: 3600 transfer_data: "0xa9059cbb..." forwarder_nonce: "63" quote_id: "0x9b0539b1..." to_amount: "10100" destination_chain: "Arbitrum One" destination_address: "0x5555555555555555555555555555555555555555" expires_at: "2026-04-03T17:13:12Z" authorization_path: "/api/v1/partner/orders/ce3cfd6a-1234-5678-abcd-ef1234567890/authorize-bridge" '400': description: '`INVALID_REQUEST` — invalid destination_chain or destination_address, or a destination the chain cannot pay (`error.details.reason`)' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '401': description: Unauthorized — invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: Order not found content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: Order is not in `completed` status content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '422': description: | - `WALLET_TYPE_MISMATCH` — the order belongs to an `external_wallet` customer. - `AMOUNT_TOO_LOW` — the order amount is too small to bridge to that chain: the bridge refused it (`error.details.reason`), or its fee would exceed 2% (`error.details.bridge_fee`, `estimated_minimum_amount`, `max_fee_pct`). content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/orders/{order_id}/authorize-bridge: post: tags: - On-Ramp summary: Authorize send-out (cross-chain transfer) description: | Submit the signed EIP-712 ForwardRequest to initiate a cross-chain send-out. Unigox recovers the signer before relaying: a signature not made by `from`, a `deadline` in the past, or a `nonce` that is not your current forwarder nonce is refused with `400 INVALID_REQUEST`, and nothing is relayed. Call `GET bridge-authorization-parameters` first to get the parameters to sign. After submission the order transitions to `send_out_pending`. Unigox monitors the bridge transfer and updates the status to `send_out_completed` or `send_out_failed` when the transfer settles. The partner receives a webhook for each transition. When the send-out completes, the `send_out_tx_hash` field in `GET /orders/:id` contains the destination-chain transaction hash. **This endpoint is idempotent at the on-chain level** — the EIP-712 nonce prevents duplicate submissions. A second call with the same nonce will be rejected. operationId: authorizeBridge security: - ApiKeyAuth: [] parameters: - name: order_id in: path required: true description: Order UUID schema: type: string format: uuid example: "ce3cfd6a-1234-5678-abcd-ef1234567890" requestBody: required: true content: application/json: schema: type: object required: [destination_chain, destination_address, forward_request, signature] properties: destination_chain: type: string description: Destination chain name as listed by `GET /partner/send-out/routes` (or its `chain_id`); must match the value used in bridge-authorization-parameters example: Arbitrum One destination_address: type: string description: Recipient address on the destination chain, in that chain's format example: "0x5555555555555555555555555555555555555555" forward_request: type: object description: EIP-712 ForwardRequest object (values from bridge-authorization-parameters) required: [from, to, value, gas, nonce, deadline, data] properties: from: type: string example: "0x4444444444444444444444444444444444444444" to: type: string example: "0xf86Cc81F4E480CF54Eb013FFe6929a0C2Ad5EdCA" value: type: string example: "0" gas: type: string example: "500000" nonce: type: string example: "63" deadline: type: string example: "1775236548" data: type: string example: "0xa9059cbb..." signature: type: string description: EIP-712 signature of the ForwardRequest (hex, with 0x prefix) example: "0xc9a69a67..." example: destination_chain: Arbitrum One destination_address: "0x5555555555555555555555555555555555555555" forward_request: from: "0x4444444444444444444444444444444444444444" to: "0xf86Cc81F4E480CF54Eb013FFe6929a0C2Ad5EdCA" value: "0" gas: "500000" nonce: "63" deadline: "1775236548" data: "0xa9059cbb..." signature: "0xc9a69a67..." responses: '200': description: Send-out submitted successfully content: application/json: example: success: true data: order_id: "ce3cfd6a-1234-5678-abcd-ef1234567890" status: send_out_pending '400': description: Invalid request — bad forward_request, nonce mismatch, or invalid destination content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '401': description: Unauthorized — invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: Order not found content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: Order is not in `completed` status or send-out already in progress. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '422': description: '`WALLET_TYPE_MISMATCH` — the order belongs to an `external_wallet` customer.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '502': description: Transactor service unavailable content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' # ============================================ # 10. OFF-RAMP OPERATIONS # ============================================ /api/v1/partner/offramp/estimate: post: tags: - Off-Ramp summary: Get off-ramp price estimate description: | Get indicative off-ramp pricing (crypto to fiat) without creating a quote. Pricing can be driven from either side: provide `crypto_amount` to compute the fiat payout, or `fiat_amount` to compute the crypto required (exactly one of the two). This endpoint is lightweight and does not reserve liquidity. Use this when you need quick pricing discovery before calling `/partner/offramp/quote`. Optional filters: `payment_method_slug`, `payment_network_slug`, `provider_scope`, `country_code`. Two optional booleans narrow the offers priced: `recipient_payout` prices only what a third-party (recipient) payout can be matched to, and `exclude_delayed_settlement` leaves delayed settlement (T+1) offers out. Neither changes what a quote or an order matches. To price a payout to one of your recipients at the rate its quote will give, name the destination with `recipient_id` and `recipient_destination_id` (both, with your API key): the estimate is then priced on the destination's own bank or wallet method, rail and country, as the quote is, including any fee a licensed partner charges for that bank. Without the destination the bank is unknown, a per-bank fee cannot be included, and the estimate can show a better rate than the quote. This endpoint is indicative and does not apply user/payment-details ownership checks; for executable pricing use quote (which still requires an API key). It also reports `delayed_settlement` and `settlement_hours`, so you can discover at which amounts a corridor stops settling instantly without burning quotes. Both are **indicative**, like the price: the estimate reserves nothing, and the quote runs the match again, so a corridor that estimates as T+1 can quote as instant if instant liquidity has appeared (and the other way round). Read the class off the quote; the order response is final once a licensed partner has accepted the order. `source_of_funds_required` says whether the order would need a source-of-funds review before its release, and a delayed estimate carries the threshold in force as `source_of_funds_threshold_usd`. Both are indicative too: the order's own fields decide. An estimate sent with your credentials prices only the offers your quote would be matched on: it leaves T+1 offers out until Unigox has enabled delayed settlement for you. Without credentials it prices T+1 offers for anyone. **Authentication:** Optional. A request with neither an `X-API-Key` nor an `Authorization: Bearer` token is public (same as `/partner/liquidity`) and prices T+1 offers for anyone. A request with your `X-API-Key` (checked first) or a `Bearer` token that authenticates is priced as your quote would be matched. `X-Secret-Key` is not a credential here: a request that sends it is priced as anonymous. An `Authorization` header with another scheme is ignored. A credential that does not authenticate is refused only when the body names `recipient_id` or `recipient_destination_id`, whose destination only your key may read: a wrong key or an expired or unknown token answers `401 UNAUTHORIZED`; a valid token of a user who is not a partner, or whose account is inactive, `403 UNAUTHORIZED`; and while Unigox's authentication service is unavailable, `503` (or `500`) `INTERNAL_ERROR`. Any other request with such a credential is priced as an anonymous caller without T+1 offers, the instant price it got before: it answers `409 NO_OFFERS_AVAILABLE` when no instant offer covers the amount. A key is required to name a recipient destination. **Note:** EUR, AUD, and GBP off-ramp payouts require the user's physical address. Ensure the user's KYC includes `address`, `city`, and `postal_code` before initiating. See `PATCH /partner/users/{user_uuid}/kyc` to update. operationId: getOffRampEstimate security: - {} - ApiKeyAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PartnerPriceEstimateRequest' example: crypto_currency: USDT fiat_currency: NGN crypto_amount: "100.00" payment_method_slug: access-bank payment_network_slug: nibss country_code: NG provider_scope: all partner_fee_pct: "1" responses: '200': description: Estimate retrieved successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PartnerPriceEstimateResponse' example: success: true data: rate: "1530.12" crypto_amount: "99.024390" fiat_amount: "151519.20" fee_breakdown: platform_fee: "1.463415" platform_fee_pct: 1.5 partner_fee: "0.975610" partner_fee_pct: 1 total_fee: "2.439025" fiat_rail_fee: "0.00" payment_method_slug: access-bank payment_network_slug: nibss provider_scope: all is_indicative: true matching_type: network network_matching_available: true delayed_settlement: false settlement_hours: null source_of_funds_required: false '400': description: | Bad request — invalid parameters, missing required fields, unsupported cryptocurrency, or invalid provider_scope. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' examples: invalid_amount: summary: Invalid amount configuration value: success: false error: code: INVALID_REQUEST message: "exactly one of crypto_amount or fiat_amount must be provided" unsupported_crypto: summary: Unsupported cryptocurrency value: success: false error: code: INVALID_REQUEST message: "unsupported cryptocurrency: BTC" invalid_provider_scope: summary: Invalid provider_scope value value: success: false error: code: INVALID_REQUEST message: "invalid provider_scope: must be all, licensed_only, or p2p_only" '401': description: >- The body names `recipient_id` or `recipient_destination_id`, and no `X-API-Key` or `Bearer` token was sent, or the one sent does not authenticate (a wrong key, an expired or unknown token). Without a recipient, such a request is priced as anonymous instead. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: UNAUTHORIZED message: "invalid API key" '403': description: >- The body names `recipient_id` or `recipient_destination_id`, and the `Bearer` token is a valid token of a user who is not a partner, or whose account is inactive. Without a recipient, such a request is priced as anonymous instead. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: UNAUTHORIZED message: "user is not a partner" '409': description: No offers available for the requested pair/amount content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: NO_OFFERS_AVAILABLE message: "no matching offers found for the provided criteria" '500': description: >- Internal Server Error. On a request with credentials whose body names a recipient, also when the authentication service could not be reached. '503': description: >- The body names a recipient, credentials were sent, and the authentication service is temporarily unavailable, so they could not be checked. Retry later. Without a recipient, such a request is priced as anonymous instead. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INTERNAL_ERROR message: "authentication service temporarily unavailable" /api/v1/partner/recipients: get: tags: [Recipients] summary: List recipients description: | Lists third parties registered by the authenticated partner. A recipient is the person or business a KYC-verified sender pays; it is not the sender's own payment profile. Results are tenant-scoped and never expose an unmasked account number. operationId: listPartnerRecipients security: - ApiKeyAuth: [] parameters: - in: query name: search schema: { type: string } description: Search by recipient name or partner-visible identifier. - in: query name: screening_status schema: { type: string } - in: query name: recipient_country schema: { type: string, minLength: 2, maxLength: 2 } - in: query name: currency schema: { type: string, minLength: 3, maxLength: 3 } - in: query name: rail schema: { type: string } - in: query name: limit schema: { type: integer, minimum: 1, maximum: 100, default: 20 } - in: query name: offset schema: { type: integer, minimum: 0, default: 0 } responses: '200': description: Recipients returned content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PartnerRecipientListResponse' '401': description: Partner not authenticated '500': description: Internal Server Error post: tags: [Recipients] summary: Register a recipient description: | Registers a partner-scoped third-party recipient identity. Add payout destinations separately with `POST /recipients/{recipient_id}/destinations`. Vendor-specific terms such as beneficiary or receiver are intentionally absent. operationId: createPartnerRecipient security: - ApiKeyAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PartnerCreateRecipientRequest' responses: '200': description: Recipient registered content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PartnerRecipientResponse' '400': description: | Invalid recipient. `error.message` names what to fix; `error.details.reason` carries a stable machine slug. Screening runs asynchronously AFTER creation, so it never rejects here — a recipient is created with `screening_status: pending` and becomes usable for a quote only once it reaches `cleared`. '401': description: Partner not authenticated '503': description: Recipient directory unreachable. The request was not wrong; retry with backoff. '500': description: Internal Server Error /api/v1/partner/recipients/{recipient_id}: parameters: - in: path name: recipient_id required: true schema: { type: string, format: uuid } get: tags: [Recipients] summary: Get recipient operationId: getPartnerRecipient security: - ApiKeyAuth: [] responses: '200': description: Recipient returned content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PartnerRecipientResponse' '404': description: Recipient not found for this partner patch: tags: [Recipients] summary: Update recipient identity description: | Updates recipient identity by creating a new immutable version. Existing quotes and orders keep their original snapshot; request a new quote to use the updated data. operationId: updatePartnerRecipient security: - ApiKeyAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PartnerUpdateRecipientRequest' responses: '200': description: Updated recipient returned content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PartnerRecipientResponse' '400': description: Invalid update '404': description: Recipient not found for this partner delete: tags: [Recipients] summary: Archive recipient description: Archives the recipient for future use. Existing immutable order snapshots remain auditable. operationId: archivePartnerRecipient security: - ApiKeyAuth: [] responses: '200': description: Recipient archived '404': description: Recipient not found for this partner /api/v1/partner/recipients/{recipient_id}/destinations: get: tags: [Recipients] summary: List recipient destinations description: Returns masked payout destinations belonging to this recipient and partner. operationId: listPartnerRecipientDestinations security: - ApiKeyAuth: [] parameters: - in: path name: recipient_id required: true schema: { type: string, format: uuid } responses: '200': description: Masked destinations returned content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PartnerRecipientDestinationsResponse' '404': description: Recipient not found for this partner post: tags: [Recipients] summary: Add a recipient destination description: | Adds a payout route for this recipient. `rail` and `institution_id` are resolved to the platform payment-network and payment-method IDs. `details` is validated against the selected rail configuration. Relationship and purpose are supplied later on the quote. `country_code`, `currency`, `rail`, `institution_id` and `details` are all required, on every rail. Unlike a customer's own payment details, `institution_id` cannot be omitted on a rail that reports `institution_required: false`: on `alipay-wallet` send `alipay`, on `wechat-wallet` send `wechat-pay`. A request missing any of the five answers `400 INVALID_REQUEST` with the message `invalid recipient destination request body`, which does not name the field. **The recipient's kind picks the format.** On a rail with an individual and a business format (`cnaps-bank` and `cnaps-bank_business`), a recipient registered with `recipient_kind: business` is validated against the business format and one registered as `individual` against the individual format. `details.beneficiary_type` does not choose: it is overwritten with the recipient's kind and returned that way. A wallet rail has no business format, so a business recipient cannot hold a wallet destination. **Names on the wallet rails.** `alipay-wallet` and `wechat-wallet` take `first_name`, `last_name`, `account_number` and `mobile_number`, as `/api/v1/supported/payment-rails` advertises. A `full_name` is still accepted from older integrations and split at the first space: the first word becomes `first_name`, the rest `last_name`. `"Li Wei"` is stored as `first_name: "Li"`, `last_name: "Wei"`. Send the two halves yourself to control the order; a one-word `full_name` is refused. **Chinese mobile numbers.** On `cnaps`, `mobile_number` accepts the 11-digit number with or without a `86` or `+86` prefix; spaces and dashes are removed and the number is stored with the prefix you sent. On the wallet rails only the bare 11 digits pass (`13800138000`). Send the bare 11 digits on every rail. operationId: createPartnerRecipientDestination security: - ApiKeyAuth: [] parameters: - in: path name: recipient_id required: true schema: { type: string, format: uuid } requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PartnerRecipientDestinationInput' responses: '200': description: Destination created content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PartnerRecipientDestination' '400': description: | The destination was rejected (`INVALID_REQUEST`). When a top-level field is missing or the body is not JSON the message is `invalid recipient destination request body` and names nothing; check `country_code`, `currency`, `rail`, `institution_id` and `details`. Otherwise `error.message` is the validator's own diagnostic. It names the rail, the institution and the format the details were measured against, then every problem at once — e.g. `unknown fields for this format: company_name, company_name_native` when company fields are sent for an `individual` recipient, `missing required fields: ...`, or `field 'mobile_number' does not match the required pattern` — and `error.details.reason` carries a machine slug such as `invalid_destination_details` or `unknown_institution`. '404': description: Recipient not found for this partner '503': description: Recipient directory unreachable. The request was not wrong; retry with backoff. /api/v1/partner/offramp/quote: post: tags: - Off-Ramp summary: Get off-ramp quote description: | Get a price quote for an off-ramp operation (crypto to fiat). Returns the exchange rate, amounts, and a quote ID that can be used to initiate the order. Quotes expire after 60 seconds. The `user_uuid` is the public UUID returned by `POST /partner/users` (the `id` field). **Choose exactly one payout ownership mode:** - Self-payout: provide `payment_details_id` for an account owned by `user_uuid`. - Third-party payout: omit `payment_details_id` and provide `sender_id`, `recipient_id`, `recipient_destination_id`, `sender_recipient_relationship`, and `purpose_of_payment`. For a third-party payout, `sender_id` must identify the same real KYC subject as `user_uuid`. At quote time Unigox validates tenant ownership, sender eligibility, destination currency/rail, recipient screening, relationship, and purpose. It persists an immutable canonical recipient snapshot on the quote. Updating or archiving the recipient afterwards does not mutate the quote; request a new quote to use changed details. On `/initiate`, Unigox revalidates the quote snapshot and creates a durable compliance case. In v1 there is no partner-visible review state machine: every control is enforced BEFORE the order exists, so a payout that fails one is rejected with an error code rather than returned as a held order. An order that was created was authorized (`compliance.status: authorized`, `risk_decision: allow`, `requires_review: false`). Operator review happens on the Unigox side over the same records; API-created third-party payouts use the same Compliance queue as portal-created payouts. **Anchor mode — provide exactly one of `crypto_amount` or `fiat_amount`:** | Field | Anchor | Guarantee | |---|---|---| | `crypto_amount` | Crypto-anchored | Exact crypto cost; fiat payout varies by the rate at settlement | | `fiat_amount` | Fiat-anchored | Exact fiat delivery to recipient; crypto cost may vary within a 1.20× safety bound | The response `anchor_type` field tells you which side is guaranteed: `"crypto"` or `"fiat"`. **Fiat-anchored notes:** - Useful for exact-payout use cases (e.g. deliver exactly 500,000 NGN). - If the crypto cost we quote exceeds 1.20× the expected amount, the order moves to `failed` status and the deposit is automatically refunded from escrow back to the partner wallet. Create a new quote to retry. - `slippage_tolerance.type=amount` in fiat-anchored mode is evaluated as crypto-side delta, not fiat-side (fiat is always exact by construction). - Integer-minor-unit currencies (NGN, UGX, TZS, KES, GHS): `fiat_amount` must be a whole number. **Fee structure:** The `fee_breakdown` object shows all fee components transparently: `platform_fee` (our fee in crypto), `partner_fee` (your per-order markup in crypto — declare it by passing `partner_fee_pct` on the quote/estimate request, where `1` means 1%), `partner_fee_pct` (the percentage applied), and `total_fee` (sum of both). The partner fee is computed on the same crypto base as the platform fee (non-compounding) and is settled on-chain, on XAI, to your fee wallet on successful release. Your fee wallet is the address you set under **Fee wallet** in the partner dashboard, or your partner wallet if you have not set one. It can only be changed from the dashboard (or by Unigox), never with the API key. A change applies to orders created after it; an order keeps the fee wallet it was created with. The fee wallet only receives the markup: funding, refunds and the balance check still use your partner wallet (for an `external_wallet` customer, the customer's address). An order that does not settle is never charged the markup, and the refund returns the full funded amount with the markup in it. Note that the refund is not automatic once the escrow has been funded: the crypto stays there until you sign for it — see `POST /orders/{order_id}/authorize-refund`. Apply your fee on the **same side** the platform does, or your receipts won't reconcile with our orders. `crypto_amount` in responses and webhooks stays partner-fee-exclusive, with two exceptions: a crypto-anchored onramp order (request declares `crypto_amount`) is sized up so the delivered amount stays exact after the markup is withheld, so `crypto_amount` there includes the markup; a crypto-anchored offramp order (request declares `crypto_amount`) carves both fees out of the pinned deposit, so `crypto_amount` and `platform_fee` both shrink relative to a no-markup request even though the markup itself stays out of `crypto_amount`. Every other case is unaffected — the markup shows only in `fee_breakdown` (and in the funding amount returned by transfer authorization for offramp — `crypto_amount + fee_breakdown.partner_fee` is what you actually fund). Fiat-anchored offramp orders have no cap on the markup — the deposit grows to cover it. Every other case hits a formula domain bound, not a business cap: onramp rejects `partner_fee_pct >= 100` (the withheld or grossed-up fee would consume the entire buyer amount, leaving nothing delivered); crypto-anchored offramp rejects it when the fee would consume the entire pinned deposit. **Address requirement for EUR/AUD/GBP:** EUR, AUD, and GBP payouts require the user's physical address (street, city, postal code). If the user's KYC does not include address data, the quote response will include a `beneficiary_requirements` field indicating which fields are needed. You can update the user's KYC with `PATCH /partner/users/{user_uuid}/kyc` to provide the address before or after initiating the order. If you initiate without address, the order will be created with status `pending_address` until the address is provided. **KYC requirement:** The customer must be KYC-cleared before you can quote or transact for them. If the customer is not cleared, this endpoint returns `422 KYC_NOT_CLEARED` and `error.details.kyc_status` carries their current partner-facing KYC status. The same check is re-applied as the order moves toward payout. A customer still in compliance review is reported as `IN_PROGRESS` — treat `IN_PROGRESS` as "not cleared yet" and keep polling `GET /api/v1/partner/users/{user_uuid}/verification-status`. operationId: getOffRampQuote security: - ApiKeyAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PartnerQuoteRequest' examples: crypto_anchored: summary: Crypto-anchored (exact crypto cost) value: user_uuid: "550e8400-e29b-41d4-a716-446655440000" payment_details_id: 987 crypto_currency: USDT crypto_amount: "100.00" fiat_currency: NGN provider_scope: all has_fiat_settlement_notification: false partner_fee_pct: "1" slippage_tolerance: type: percent value: 1.5 fiat_anchored: summary: Fiat-anchored (exact fiat delivery) value: user_uuid: "550e8400-e29b-41d4-a716-446655440000" payment_details_id: 987 crypto_currency: USDT fiat_amount: "500000" fiat_currency: NGN provider_scope: all has_fiat_settlement_notification: false partner_fee_pct: "1" slippage_tolerance: type: percent value: 1.5 third_party_cny: summary: Third-party CNY payout to a registered recipient value: user_uuid: "550e8400-e29b-41d4-a716-446655440000" sender_id: "550e8400-e29b-41d4-a716-446655440000" recipient_id: "6a973b80-6f66-4fd4-a48d-b81e544790e5" recipient_destination_id: "bbfa34e7-1dce-47d9-95bf-cbf71c9fbc0d" sender_recipient_relationship: supplier purpose_of_payment: goods_and_services purpose_details: "Invoice INV-2026-0042" crypto_currency: USDT fiat_amount: "500000" fiat_currency: CNY rail: cnaps responses: '200': description: Quote retrieved successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PartnerQuoteResponse' examples: crypto_anchored: summary: Crypto-anchored quote value: success: true data: quote_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" anchor_type: "crypto" rate: "1530.12" crypto_amount: "99.024390" fiat_amount: "151519.20" fee_breakdown: platform_fee: "1.463415" platform_fee_pct: 1.5 partner_fee: "0.975610" partner_fee_pct: 1 total_fee: "2.439025" fiat_rail_fee: "0.00" payment_details_id: 987 payment_method_id: 5 payment_network_id: 12 matching_type: network network_matching_available: true expires_at: "2026-02-01T12:01:00Z" delayed_settlement: false settlement_hours: null fiat_anchored: summary: Fiat-anchored quote value: success: true data: quote_id: "b2c3d4e5-f6a7-8901-bcde-ef1234567890" anchor_type: "fiat" rate: "1530.12" crypto_amount: "328.10" fiat_amount: "500000" fee_breakdown: platform_fee: "4.92" platform_fee_pct: 1.5 partner_fee: "3.23" partner_fee_pct: 1 total_fee: "8.15" fiat_rail_fee: "0.00" payment_details_id: 987 payment_method_id: 5 payment_network_id: 12 matching_type: network network_matching_available: true expires_at: "2026-02-01T12:01:00Z" delayed_settlement: false settlement_hours: null delayed_settlement: summary: Delayed settlement (T+1) quote value: success: true data: quote_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" anchor_type: "fiat" rate: "7.18" crypto_amount: "3000.00" fiat_amount: "21540.00" fee_breakdown: platform_fee: "45.00" platform_fee_pct: 1.5 partner_fee: "30.00" partner_fee_pct: 1 total_fee: "75.00" fiat_rail_fee: "0.00" payment_details_id: 987 payment_method_id: 5 payment_network_id: 12 matching_type: network network_matching_available: true expires_at: "2026-09-18T12:01:00Z" delayed_settlement: true settlement_hours: 24 '400': description: >- Bad request — invalid parameters or missing required fields (`INVALID_REQUEST`). On a self-payout, a `rail` or `route` that does not match the payment details answers `RAIL_ROUTE_MISMATCH`. A third-party payout never answers `RAIL_ROUTE_MISMATCH`: a `rail` that is not the destination's own is a `422 THIRD_PARTY_CONTEXT_INVALID`. On a third-party payout, `INVALID_REQUEST` also covers: a missing third-party field, `payment_details_id` sent with `recipient_destination_id`, a `fiat_currency` served by no recipient payout route your orders can match (`third-party recipient payout is not available for {CURRENCY}`, checked before the destination is read; a currency only T+1 offers serve reads so until delayed settlement is enabled for you), a relationship or purpose the corridor cannot declare, and a USD payout to China, Hong Kong or Singapore (`provider_confirmation_pending`). `INVALID_PAYMENT_DETAILS` also answers a `payment_details_id` that is the payment details of a fiat account you opened for the customer, whether or not off-ramps paid through the customer's own fiat account are switched on for you; while they are, also the payment details of any other account Unigox issued to the customer. Name the customer's outside bank instead; the payout goes through their account on its own. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' examples: own_account_details_named: summary: payment_details_id is the customer's own fiat account (own-account payouts on) value: success: false error: code: INVALID_PAYMENT_DETAILS message: "payment_details_id names the customer's own issued account; name the customer's bank instead — the payout is routed through their own account automatically" rail_route_mismatch: summary: Self-payout rail does not match the payment details value: success: false error: code: RAIL_ROUTE_MISMATCH message: "rail does not match payment details" missing_currency: summary: Missing required field value: success: false error: code: INVALID_REQUEST message: "Missing required field: crypto_currency" ambiguous_amount: summary: Both or neither amount fields provided value: success: false error: code: INVALID_REQUEST message: "exactly one of crypto_amount or fiat_amount must be provided" sub_minor_unit: summary: Fractional fiat for integer-minor-unit currency value: success: false error: code: INVALID_REQUEST message: "fiat_amount must be a whole number for integer-minor-unit currencies" '401': description: Unauthorized — invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: UNAUTHORIZED message: "Invalid or missing API key" '404': description: User or payment details not found content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INVALID_PAYMENT_DETAILS message: "Payment details not found or do not belong to user" '409': description: >- `NO_OFFERS_AVAILABLE` — no offer your orders can match serves the requested pair and amount. Until delayed settlement is enabled for you, T+1 offers do not count, so an amount only a T+1 offer covers gets this answer on every retry. On a third-party payout also: `THIRD_PARTY_RAIL_NOT_SUPPORTED` — the currency is open to recipient payouts, but not over the rail the destination settles on (a rail only T+1 offers serve reads as not open until delayed settlement is enabled for you); and `THIRD_PARTY_PAYOUT_AGENT_NOT_READY` — recipient payouts are switched off on our side, or their availability could not be determined. Both are opened on our side; do not retry in a loop. EUR and GBP off-ramps paid through the customer's own account (see Fiat Accounts): `FIAT_ACCOUNT_OPENING` — the customer's account is being opened (`details.fiat_account_id`, `details.fiat_account_status`); quote again once `fiat_account.updated` reports it active. `FIAT_ACCOUNT_REQUIRED` — the order cannot be paid through the customer's account (`details.reason`, `details.missing_fields`). `FIAT_ACCOUNTS_NOT_ENABLED` — customer fiat accounts are not active for your partner in this currency. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' examples: no_offers: summary: No offer serves the pair and amount value: success: false error: code: NO_OFFERS_AVAILABLE message: "No offers available for USDT/NGN" fiat_account_opening: summary: The customer's EUR account is being opened value: success: false error: code: FIAT_ACCOUNT_OPENING message: "EUR off-ramps are paid through the customer's own account, which is being opened; retry the quote once the fiat_account.updated webhook reports it active" details: currency: EUR fiat_account_id: "6b1d2c3e-0000-4000-8000-000000000007" fiat_account_status: pending rail_not_supported: summary: Recipient payouts are not open on the destination's rail value: success: false error: code: THIRD_PARTY_RAIL_NOT_SUPPORTED message: "third-party recipient payout is not available for CNY over wechat-wallet" '422': description: >- `KYC_NOT_CLEARED` — the customer is not KYC-cleared. `error.details.kyc_status` carries the customer's current partner-facing KYC status — one of `IN_PROGRESS`, `UNDER_REVIEW`, `PENDING_DOCUMENTS`, `VERIFICATION_REJECTED`, or `NOT_INITIATED`. `UNDER_REVIEW` means a manual compliance review (up to 24h); keep the customer waiting and re-check. The message stays generic. On a third-party payout also: `THIRD_PARTY_CONTEXT_INVALID` — the sender, recipient or destination cannot be used for this quote. The message says which: `sender_id` is not `user_uuid`; the sender, recipient or destination is not found for your partner account or is archived (`sender not found or not eligible`, `recipient not found or not eligible`, `recipient destination not found or not eligible`); the recipient is not cleared by screening; the destination route is incomplete; the `rail` you sent is not the destination's rail (`rail does not match the recipient destination`); or the destination's currency is not `fiat_currency` (`recipient destination does not support the payout corridor`, or `fiat_currency does not match the recipient destination`). `THIRD_PARTY_RELATIONSHIP_NOT_SUPPORTED` — the rail refuses that beneficiary: a Chinese wallet pays the sender themselves (`self`) or a family member (`family`) only. `THIRD_PARTY_SENDER_COUNTRY_NOT_SUPPORTED` — the rail refuses money sent from the country on the customer's verified identity. The message names the country. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' examples: kyc_not_cleared: summary: Customer not KYC-cleared value: success: false error: code: KYC_NOT_CLEARED message: "Customer is not cleared for this transaction" details: kyc_status: "IN_PROGRESS" rail_mismatch: summary: The rail sent is not the destination's rail value: success: false error: code: THIRD_PARTY_CONTEXT_INVALID message: "rail does not match the recipient destination" currency_mismatch: summary: The destination's currency is not fiat_currency value: success: false error: code: THIRD_PARTY_CONTEXT_INVALID message: "recipient destination does not support the payout corridor" '503': description: '`FIAT_ACCOUNT_CHECK_UNAVAILABLE` — the payout route of an EUR or GBP off-ramp could not be checked. Nothing was created; retry shortly.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/offramp/initiate: post: tags: - Off-Ramp summary: Initiate off-ramp order description: | Initiate an off-ramp order using a previously obtained quote. The quote must still be active (not expired or already used). The system refreshes the price and checks slippage tolerance before creating the order. If the price has moved beyond the slippage tolerance, a `PRICE_CHANGED_REQUOTE` error is returned with details about the old and new rates, so the partner can request a new quote. On success, returns the created order with status `awaiting_liquidity_provider`. **Address requirement for EUR/AUD/GBP:** For EUR/AUD/GBP orders, if the user's KYC does not include a physical address, the order will be created with status `pending_address`. The response will include `required_fields: ["address", "city", "postal_code"]` and `next_action: "provide_address"`. Call `PATCH /partner/users/{user_uuid}/kyc` to add the address, and the order will automatically advance. **Recommended flow for EUR/AUD/GBP:** 1. Submit KYC with address/city/postal_code (`POST /kyc-submissions`) 2. Create payment details (`POST /payment-details`) — address auto-populated from KYC 3. Get quote (`POST /offramp/quote`) 4. Initiate (`POST /offramp/initiate`) — proceeds without delays **KYC requirement:** The customer must be KYC-cleared, exactly as described on `POST /offramp/quote`. If they are not, this endpoint returns `422 KYC_NOT_CLEARED` with the customer's partner-facing status in `error.details.kyc_status`. The check is re-applied as the order moves toward payout. operationId: initiateOffRamp security: - ApiKeyAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PartnerInitiateRequest' example: quote_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" responses: '200': description: >- Off-ramp order created. Success answers `200`, not `201`. On an ordinary order `timeline` is empty until a liquidity provider accepts the order, and `created_at` is the time of this answer. Only an order whose quote read `delayed_settlement: true` (delayed settlement, T+1) carries one entry, its creation, with `created_at` the order's creation. content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PartnerInitiateResponse' examples: ordinary: summary: An ordinary order value: success: true data: order_id: "b2c3d4e5-f6a7-8901-bcde-f12345678901" status: awaiting_liquidity_provider quote_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" amounts: crypto_amount: "99.024390" fiat_amount: "151519.20" crypto_currency: USDT fiat_currency: NGN rate: "1530.12" fee_breakdown: platform_fee: "1.463415" platform_fee_pct: 1.5 partner_fee: "0.975610" partner_fee_pct: 1 total_fee: "2.439025" timeline: [] created_at: "2026-02-01T12:00:05Z" t1_order: summary: An order quoted delayed settlement (T+1) value: success: true data: order_id: "c3d4e5f6-a7b8-9012-cdef-123456789012" status: awaiting_liquidity_provider quote_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" amounts: crypto_amount: "3000.000000" fiat_amount: "21540.00" crypto_currency: USDT fiat_currency: CNY rate: "7.18" fee_breakdown: platform_fee: "45.000000" platform_fee_pct: 1.5 partner_fee: "30.000000" partner_fee_pct: 1 total_fee: "75.000000" timeline: - status: awaiting_liquidity_provider timestamp: "2026-09-18T12:00:04Z" description: "Order created and awaiting liquidity provider" created_at: "2026-09-18T12:00:04Z" '400': description: Bad request — missing required fields content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '401': description: Unauthorized — invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: Quote not found content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: QUOTE_NOT_FOUND message: "Quote not found" '409': description: >- Quote expired, already used, slippage exceeded, or — for a third-party payout — the payout route has not confirmed recipient-context support, in which case no order is created and the quote is left untouched. `WALLET_NOT_LINKED` — an `external_wallet` customer with no linked address. EUR and GBP off-ramps paid through the customer's own account (see Fiat Accounts): `FIAT_ACCOUNT_OPENING` — the customer's account is being opened (`details.fiat_account_id`, `details.fiat_account_status`); quote again once `fiat_account.updated` reports it active. `FIAT_ACCOUNT_REQUIRED` — the order cannot be paid through the customer's account (`details.reason`, `details.missing_fields`). `FIAT_ACCOUNTS_NOT_ENABLED` — customer fiat accounts are not active for your partner in this currency. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' examples: agent_not_ready: summary: Third-party payout capability not enabled value: success: false error: code: THIRD_PARTY_PAYOUT_AGENT_NOT_READY message: "third-party CNY payout is temporarily unavailable: the payout agent has not confirmed recipient-context support" quote_expired: summary: Quote has expired value: success: false error: code: QUOTE_EXPIRED message: "Quote has expired, please request a new quote" quote_already_used: summary: Quote already consumed value: success: false error: code: QUOTE_ALREADY_USED message: "quote has already been used to initiate an order" details: order_id: "b2c3d4e5-f6a7-8901-bcde-f12345678901" slippage_exceeded: summary: Price changed beyond tolerance value: success: false error: code: PRICE_CHANGED_REQUOTE message: "Price has changed beyond slippage tolerance, please request a new quote" details: quoted_rate: 1530.12 current_rate: 1545.00 fiat_difference: 1510.38 '422': description: >- The request is well-formed but the party is not payable yet. No order is created and the quote is reverted, so the same customer can retry once the cause is fixed. `KYC_NOT_CLEARED` — the customer is not KYC-cleared. `error.details.kyc_status` carries their current partner-facing status: `IN_PROGRESS`, `UNDER_REVIEW`, `PENDING_DOCUMENTS`, `VERIFICATION_REJECTED`, or `NOT_INITIATED`. `UNDER_REVIEW` means a manual compliance review (up to 24h); keep the customer waiting and re-check. The message stays generic. `THIRD_PARTY_CONTEXT_INVALID` — the frozen third-party recipient context is no longer usable (archived recipient, screening no longer `cleared`, recipient details changed since the quote, or a destination that stopped resolving). Request a new quote. `THIRD_PARTY_PAYOUT_UNDER_REVIEW` — compliance put this payout in review. Do not retry the same payout; wait for the outcome. `THIRD_PARTY_PAYOUT_DECLINED` — compliance refused the payout: a breached sender limit, a hold, or another initiation for the same sender still in flight. An identical retry fails identically. `SENDER_IDENTITY_REQUIRED` — the corridor settles consumer-to-consumer (Chinese mobile wallets: the remitter shown on the receiving wallet has to be the paying customer, not Unigox) and their record cannot name them. `error.details.missing_fields` is what the rail needs; `error.details.kyc_fields` is the subset you can supply yourself, as the request body of `PATCH /partner/users/{user_uuid}/kyc`. When `kyc_fields` is shorter than `missing_fields`, the remainder (the name on the document, the country of residence) can only come from verification itself — the customer has to complete or redo KYC. Send the customer's own details: substituting anyone else's is what the rail's identity check exists to catch. A field is also listed when the record holds a value the rail would refuse for its length: the rail rejects the whole payment, at payout, after the customer has funded, so it is refused here while a retry is still free. `error.details.field_limits` is the vendor's ceiling on any listed field that has one, keyed the way you write it in the KYC patch and counted in characters, not bytes; it is absent when no listed field has one. Read the ceilings from there rather than hard-coding them — they differ per corridor. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' examples: kyc_not_cleared: summary: Customer not KYC-cleared value: success: false error: code: KYC_NOT_CLEARED message: "Customer is not cleared for this transaction" details: kyc_status: "IN_PROGRESS" sender_identity_required: summary: C2C corridor cannot name the sender value: success: false error: code: SENDER_IDENTITY_REQUIRED message: "payout corridor requires the sender's own identity details; missing: date_of_birth, id_number, source_of_funds" details: corridor: cn_wallet missing_fields: ["date_of_birth", "id_number", "source_of_funds"] kyc_fields: ["dob", "id_number", "source_of_funds"] field_limits: {"id_number": 30} '503': description: '`FIAT_ACCOUNT_CHECK_UNAVAILABLE` — the payout route of an EUR or GBP off-ramp could not be checked. Nothing was created; retry shortly.' content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' # ============================================ # 11. ORDER MANAGEMENT # ============================================ /api/v1/partner/orders/{order_id}: get: tags: - Orders summary: Order details description: | Get the current status, amounts, and full timeline for a specific order. The `next_action` field indicates what the partner **must** do to advance the order. `null` means no action is required from the partner at this stage — the order is waiting for the counterparty (e.g. the buyer to submit fiat payment proof). The `allowed_actions` array lists all API actions the partner **can** perform at the current status. An action can be in `allowed_actions` even when `next_action` is absent — this means the action is optional. For example, on an ordinary off-ramp order `confirm-fiat-received` is available at `crypto_received` as a fast-track: if you already know the fiat has arrived (via your own systems), you can confirm immediately without waiting for the buyer's payment proof flow to complete. **That fast-track does not exist on a delayed settlement (T+1) order.** There the crypto leaves escrow before the customer is paid, so at `crypto_received` `confirm-fiat-received` is **removed** from `allowed_actions` and the endpoint refuses the order; `["settlement-consent", "cancel"]` take its place and `next_action` is `sign_settlement_consent`, then `submit_source_of_funds` or `await_review` — the latter meaning the order is waiting on us, for any required source-of-funds approval, for the licensed partner's payment check and for crypto release. Branch on `delayed_settlement` — the two orders share a status and differ in everything you may do with it. See the Delayed settlement (T+1) reference. `allowed_actions` is `[]` for a **widget order** — one your customer created through the embedded widget under your `widgetKey`. Those orders are attributed to you, and readable here, but the crypto is the end user's, so every action endpoint answers `404 ORDER_NOT_FOUND` for them. `status`, `next_action` and the timeline still describe the order; they describe your customer's step, not one for you to take. **A `cancelled` order can still owe you money.** An off-ramp order that stopped after its escrow was funded reads `cancelled` — the same as one that never funded and the same as one whose refund has already been paid out. The status does not distinguish them and never will. What distinguishes them is `allowed_actions`: `["authorize-refund"]` means the crypto is still in the escrow and your signature is the only thing that can send it back, with `next_action: "authorize_refund"` and `action_required` naming the endpoint. Check it before writing an order off. The `order.refund.required` webhook says the same thing once, if you would rather not poll. **Order flow summary:** | Status | next_action | Who acts | |---|---|---| | `created` | — | Partner (or wait for vendor match) | | `awaiting_crypto_transfer_authorization` | `authorize_crypto_transfer` | **Partner** | | `crypto_transfer_authorization_pending` | — | System (on-chain confirmation) | | `crypto_received` | — | **Buyer** submits fiat payment proof | | `fiat_payment_started` | — | System reviews proof | | `fiat_payment_review_started` | — | System accepts/rejects proof | | `awaiting_fiat_received_confirmation` | `confirm_fiat_received` | **Partner** | | `completed` | — | — | A **delayed settlement (T+1)** order replaces the `crypto_received` row — no buyer submits proof, because the fiat is paid after the release, not before: | Status | next_action | Who acts | |---|---|---| | `crypto_received` | `sign_settlement_consent` | **Partner** signs the release | | `crypto_received` | `submit_source_of_funds` | **Partner** supplies the source-of-funds case | | `crypto_received` | `await_review` | **Unigox**: document review, the licensed partner's payment check, or release processing | | `crypto_received` | — | Held: Unigox holds the order for a check, or a payout failed and a refund is under way | | `settlement_in_progress` | — | Payout in flight; the fiat has not arrived | | `returned` | — | The bank sent the payout back; Unigox pays again or refunds the crypto | The "Who acts" column describes an order **you** created. On a widget order the rows reading **Partner** are your customer's step, not yours — `next_action` is populated the same way for both, because it describes where the order stands rather than who may move it. `allowed_actions` is what tells you apart: `[]` on a widget order at every status. Acting on a `next_action` for a widget order returns `404 ORDER_NOT_FOUND`. A delayed order is never a widget order: the wallet must be yours for anyone on this API to sign the release. **Fiat settlement and confirmation** (ordinary orders; a delayed order never takes a fiat confirmation)**:** You can call `confirm-fiat-received` at any time after crypto is in escrow. You do not need to wait for a system notification. If you know through your own systems that the recipient has received the fiat payment, confirm immediately. Some liquidity providers also send automatic settlement confirmations when the recipient receives the fiat. When the order's `has_fiat_settlement_notification` is `true` (see the quote/order response), the order moves to `completed` on its own and you receive the `status=completed` webhook — no manual confirm needed. If you already confirmed manually, the auto-confirmation is a no-op; if the auto-confirmation arrives first, your manual confirm call is also a no-op. Both paths are safe. See the Webhooks page → "Settlement notifications" for details. **How to implement:** - Always implement a `confirm-fiat-received` call in your flow. - Listen for webhooks. If you receive `status=completed`, no further action needed. - If `next_action=confirm_fiat_received`, call `confirm-fiat-received` when you know fiat has been received. - Do not wait for `next_action` if you already have confirmation from your own banking or payment systems. - On a delayed order do not call `confirm-fiat-received`, and treat `completed` as meaning the fiat actually reached the customer. **Possible statuses:** see `PartnerOrderStatus`. Off-ramp: `created`, `awaiting_liquidity_provider`, `awaiting_crypto_transfer_authorization`, `crypto_transfer_authorization_pending`, `crypto_received`, `fiat_payment_started`, `fiat_payment_review_started`, `dispute_started`, `awaiting_fiat_received_confirmation`, `completed`, `cancelled`, `failed`, `price_changed_requote_needed`, plus `settlement_in_progress` and `returned` on a delayed order. On-ramp: `awaiting_vendor_escrow_funding`, `awaiting_fiat_transfer`, `fiat_transfer_pending`, `send_out_pending`, `send_out_completed`, `send_out_failed`. operationId: getOrder security: - ApiKeyAuth: [] parameters: - name: order_id in: path required: true description: Order UUID returned by the initiate endpoint schema: type: string format: uuid example: "b2c3d4e5-f6a7-8901-bcde-f12345678901" responses: '200': description: Order retrieved successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PartnerOrderResponse' example: success: true data: order_id: "b2c3d4e5-f6a7-8901-bcde-f12345678901" status: awaiting_crypto_transfer_authorization next_action: authorize_crypto_transfer allowed_actions: ["authorize-crypto-transfer", "cancel"] crypto_transfer_authorization_seconds_left: 1720 amounts: crypto_amount: "101.50" fiat_amount: "152880.00" crypto_currency: USDT fiat_currency: NGN rate: "1530.12" fee_breakdown: platform_fee: "1.50" platform_fee_pct: 1.5 partner_fee: "1.00" partner_fee_pct: 1 total_fee: "2.50" timeline: - status: created timestamp: "2026-02-01T12:00:05Z" description: "Order created" - status: awaiting_crypto_transfer_authorization timestamp: "2026-02-01T12:00:06Z" description: "Awaiting crypto transfer authorization" created_at: "2026-02-01T12:00:05Z" updated_at: "2026-02-01T12:00:06Z" '401': description: Unauthorized — invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: Order not found or does not belong to this partner content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: ORDER_NOT_FOUND message: "Order not found" '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/orders/{order_id}/transfer-authorization-parameters: get: tags: - SDK - Orders summary: Get transfer authorization parameters description: | Returns pre-filled parameters required to build and sign the EIP-712 forward request. Use this endpoint first, then sign locally and send the signature to `/api/v1/partner/orders/{order_id}/authorize-crypto-transfer`. operationId: getTransferAuthorizationParameters security: - ApiKeyAuth: [] parameters: - name: order_id in: path required: true description: Order UUID schema: type: string format: uuid responses: '200': description: Transfer authorization parameters returned content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: object properties: order_id: type: string format: uuid network_preset: type: string chain_id: type: string rpc_url: type: string description: JSON-RPC URL for the target chain token_address: type: string forwarder_address: type: string recipient_address: type: string description: Escrow address to receive the crypto sender_address: type: string description: | Address that must sign the request: your partner wallet for a `partner_wallet` customer, the customer's linked address for an `external_wallet` customer. amount_atomic: type: string amount_human: type: string crypto_currency: type: string crypto_decimals: type: integer recommended_gas_limit: type: string recommended_ttl_seconds: type: integer transfer_data: type: string description: Pre-encoded ERC20 transfer(address,uint256) calldata (hex with 0x prefix) forwarder_nonce: type: string description: Current forwarder nonce for the sender address (used in EIP-712 signing) authorization_path: type: string '401': description: Unauthorized '404': description: No order with this id belongs to your partner account. '409': description: >- The order exists but is not at a stage where it can be funded. A new order starts at `awaiting_liquidity_provider` with no escrow yet, so this is the normal answer until a provider accepts — poll `GET /orders/{order_id}` until `next_action` becomes `authorize_crypto_transfer`. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INVALID_STATUS message: "order is not ready for this action yet: no liquidity provider has accepted it" /api/v1/partner/orders/{order_id}/authorize-crypto-transfer: post: tags: - SDK - Orders summary: Authorize crypto transfer description: | Submit signed EIP-712 `forward_request` to authorize transfer of order crypto to escrow. **Security note:** Your private key is never sent to the API. The SDK uses it locally to construct and sign the EIP-712 ForwardRequest on your machine. Only the resulting signature and the unsigned forward_request fields are submitted. You can verify this by reading the SDK source code. Recommended: use SDK helper files (only 4 arguments needed): - Python: `https://github.com/Unigox/sdk_python/blob/main/partner_authorize_crypto_transfer_sdk.py` - JavaScript: `https://github.com/Unigox/sdk_javascript/blob/main/partner_authorize_crypto_transfer_sdk.js` The SDK automatically fetches all required parameters (chain, token, forwarder, escrow address, RPC URL) from the `transfer-authorization-parameters` endpoint. SDK helper options: - End-to-end one call: `authorize_crypto_transfer(...)` / `authorizeCryptoTransfer(...)` - Build unsigned request only: `build_forward_request(...)` / `buildForwardRequest(...)` - Sign existing request only: `sign_forward_request(...)` / `signForwardRequest(...)` - Build full request body `{forward_request, signature}`: `build_authorize_crypto_transfer_payload(...)` / `buildAuthorizeCryptoTransferPayload(...)` Manual implementation: call `GET /transfer-authorization-parameters` first, then build the EIP-712 typed data and sign with your partner wallet private key locally. **Non-custodial customers** (`wallet_type: external_wallet`): the request must be signed by the customer's linked address (`sender_address`), in your app, where the customer's key is. A request whose `from` is not that address, or that does not move exactly this order's amount to this order's escrow, is refused with `400 INVALID_REQUEST` naming the field. A short balance answers `422 INSUFFICIENT_BALANCE` and nothing is relayed. **Signature check.** Unigox recovers the signer before relaying. A signature not made by `from`, a `deadline` in the past, or a `nonce` that is not the signer's current forwarder nonce is refused with `400 INVALID_REQUEST`, and nothing is relayed. Fetch new parameters and sign again. If an earlier request for this order failed without moving funds, a new signed request is accepted. operationId: authorizeCryptoTransfer security: - ApiKeyAuth: [] parameters: - name: order_id in: path required: true description: Order UUID schema: type: string format: uuid example: "b2c3d4e5-f6a7-8901-bcde-f12345678901" requestBody: required: true content: application/json: schema: type: object required: - forward_request - signature properties: forward_request: type: object description: Signed EIP-712 ForwardRequest payload signature: type: string description: >- 65-byte EIP-712 signature of `forward_request` by `forward_request.from`, hex-encoded. `0x` prefix recommended; a signature without it is accepted. example: forward_request: from: "0x4444444444444444444444444444444444444444" to: "0x2222222222222222222222222222222222222222" value: "0" gas: "500000" nonce: "0" deadline: "1760000000" data: "0xa9059cbb000000000000000000000000..." signature: "0xabc123..." responses: '200': description: Crypto authorization accepted '400': description: | `INVALID_REQUEST` — the request does not match the order (`from`, token, amount, escrow), the signature does not recover to `from`, the `deadline` has passed, or the `nonce` is not the current forwarder nonce. Nothing is relayed; fetch new parameters and sign again. '401': description: Unauthorized '404': description: Order not found '409': description: Order is not in the correct status for crypto authorization '422': description: | Insufficient token balance — the funding address (your partner wallet, or the `external_wallet` customer's linked address) does not hold enough tokens to fund the escrow. Nothing is relayed. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INSUFFICIENT_BALANCE message: "insufficient USDC balance: wallet 0x... has 1928961 but 3000000 is required" '502': description: '`TRANSACTOR_ERROR` — the transaction could not be submitted, although the request passed every check. Retry.' /api/v1/partner/orders/{order_id}/refund-authorization-parameters: get: tags: - SDK - Orders summary: Get refund authorization parameters description: | Returns the EIP-712 Safe transaction to sign in order to send a funded escrow back to the seller. This is the way out of an off-ramp order that stopped before settlement — the payment window expired, a payment proof was declined, the bank returned the payment, or a dispute was resolved for the seller. In every one of those the crypto is still sitting in escrow and owes its way back. Use this endpoint first, sign the returned typed data locally with the key that owns `signer_address`, then send the signature to `/api/v1/partner/orders/{order_id}/authorize-refund`. **Who signs.** The escrow is a 2-of-3 Safe whose owners are the buyer side, the seller side and Unigox. For a `partner_wallet` customer the seller-side owner is *your* wallet — the customer never holds a key. For an `external_wallet` customer it is the customer's linked address, and the customer signs; the refund then lands on the customer's own address. `signer_address` names the key either way; sign with that key and no other, or the Safe rejects the transaction. **Where the money goes is not yours to choose.** The recipient is read from the escrow's seller address on the server. `recipient_address` is returned so you can verify it before signing; there is no parameter that changes it. operationId: getRefundAuthorizationParameters security: - ApiKeyAuth: [] parameters: - name: order_id in: path required: true description: Order UUID schema: type: string format: uuid example: "b2c3d4e5-f6a7-8901-bcde-f12345678901" responses: '200': description: Refund authorization parameters returned content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: object properties: order_id: type: string format: uuid status: type: string description: The order's current status escrow_address: type: string description: The Safe holding the crypto signer_address: type: string description: >- The escrow's seller-side owner — the address whose key must produce the signature. On an order opened for your end customer this is your wallet. recipient_address: type: string description: >- Where the refund lands. Server-derived and identical to `signer_address` on a partner order; returned for verification, not as an input. amount_human: type: string description: Amount to be refunded, in whole units crypto_currency: type: string crypto_decimals: type: integer direction: type: string description: Always `to_seller`. Refunds have no other direction. example: to_seller safe_params: type: object description: The Safe transaction fields to sign properties: to: type: string description: Token contract address value: type: string data: type: string description: Encoded ERC20 transfer calldata operation: type: integer safeTxGas: type: string baseGas: type: string gasPrice: type: string gasToken: type: string refundReceiver: type: string nonce: type: string description: Safe nonce domain: type: object description: EIP-712 domain properties: chainId: type: integer verifyingContract: type: string types: type: object description: EIP-712 type definitions (`SafeTx`) authorization_path: type: string description: The endpoint to POST the signature to example: success: true data: order_id: "b2c3d4e5-f6a7-8901-bcde-f12345678901" status: "refund_pending" escrow_address: "0x3333333333333333333333333333333333333333" signer_address: "0x4444444444444444444444444444444444444444" recipient_address: "0x4444444444444444444444444444444444444444" amount_human: "250.5" crypto_currency: "USDT" crypto_decimals: 6 direction: "to_seller" safe_params: to: "0x2222222222222222222222222222222222222222" value: "0" data: "0xa9059cbb000000000000000000000000..." operation: 0 safeTxGas: "0" baseGas: "0" gasPrice: "0" gasToken: "0x0000000000000000000000000000000000000000" refundReceiver: "0x0000000000000000000000000000000000000000" nonce: "0" domain: chainId: 660279 verifyingContract: "0x3333333333333333333333333333333333333333" types: SafeTx: - name: "to" type: "address" - name: "value" type: "uint256" authorization_path: "/api/v1/partner/orders/b2c3d4e5-f6a7-8901-bcde-f12345678901/authorize-refund" '401': description: Unauthorized '404': description: No order with this id belongs to your partner account. '409': description: >- The order does not owe a refund. Either it has already been refunded or released, its status is one where the crypto is not owed back (`INVALID_STATUS`), or it is held for review and no automatic refund may run against it (`OPERATION_NOT_ALLOWED`) — the message says which. A held order is settled by our operations team, not by retrying. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INVALID_STATUS message: "this order has already been refunded" '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/orders/{order_id}/authorize-refund: post: tags: - SDK - Orders summary: Authorize refund description: | Submit the signature produced from `GET /refund-authorization-parameters` to send the escrow back to the seller. Unigox adds the second of the two signatures the Safe requires and executes the transaction. **Security note:** your private key is never sent to the API. Sign the typed data locally and submit only the resulting signature. The recipient is fixed server-side to the escrow's seller address. A signature is an authorization to move the money back, never an instruction about where it goes. Safe to retry: the on-chain Safe executes a given transaction at most once, so a duplicate call after a successful refund is refused on status rather than paying twice. operationId: authorizeRefund security: - ApiKeyAuth: [] parameters: - name: order_id in: path required: true description: Order UUID schema: type: string format: uuid example: "b2c3d4e5-f6a7-8901-bcde-f12345678901" requestBody: required: true content: application/json: schema: type: object required: - signature properties: signature: type: string description: Hex-encoded signature over the returned `safe_params` signed_data: type: string description: >- The exact payload that was signed. Optional — the server rebuilds it from the order and uses its own copy for verification. example: signature: "0xabc123..." responses: '200': description: Refund accepted content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: object properties: order_id: type: string format: uuid status: type: string description: The status the order landed in after the refund tx_hash: type: string description: >- On-chain transaction hash. Absent when the refund still needs another signature or is executing — poll `GET /orders/{order_id}`. example: success: true data: order_id: "b2c3d4e5-f6a7-8901-bcde-f12345678901" status: "refunded" tx_hash: "0x7f1e...c4" '400': description: Missing or malformed signature content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INVALID_REQUEST message: "signature is required" '401': description: Unauthorized '404': description: No order with this id belongs to your partner account. '409': description: >- The order does not owe a refund — already refunded, already released, or in a status where the crypto is not owed back (`INVALID_STATUS`); or it is held for review and no automatic refund may run against it (`OPERATION_NOT_ALLOWED`), in which case retrying will not clear it and our operations team settles the order. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INVALID_STATUS message: "this order has already been released to the buyer" '502': description: >- The refund could not be executed on-chain — most often a signature from a key that does not own the escrow. Verify you signed with `signer_address` and retry. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: TRANSACTOR_ERROR message: "refund execution failed, please retry" /api/v1/partner/orders/{order_id}/confirm-fiat-received: post: tags: - Orders summary: Confirm fiat received description: | Confirm that the recipient has received the fiat payment for an off-ramp order. This triggers the crypto release from escrow. Call this endpoint as soon as you know fiat has been received. You do not need to wait for a system prompt. If you have confirmation from your own banking or payment systems, confirm immediately. Call it while the order offers `confirm-fiat-received` in `allowed_actions`. Once the order has moved past that point (it was already confirmed, or it completed through the liquidity provider's own settlement confirmation), the call answers `409 INVALID_STATUS` and changes nothing: read the order instead. Not for delayed settlement (T+1) orders. On such an order, whatever its status, this answers `409 INVALID_STATUS` ("this order settles T+1: the payout is confirmed by the provider, not with confirm-fiat-received"). operationId: confirmFiatReceived security: - ApiKeyAuth: [] parameters: - name: order_id in: path required: true description: Order UUID schema: type: string format: uuid example: "b2c3d4e5-f6a7-8901-bcde-f12345678901" responses: '200': description: Fiat receipt confirmed successfully '400': description: Bad Request '401': description: Unauthorized '404': description: Order not found '409': description: >- `INVALID_STATUS` — nothing was changed. The order's status does not allow the confirmation (it is not funded yet, or it has already moved past it); the order is under review; or it is a delayed settlement (T+1) order, which refuses this call at every status. Read the order. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' examples: status: summary: The order has moved past the confirmation value: success: false error: code: INVALID_STATUS message: "order status \"completed\" does not allow fiat confirmation" t1_order: summary: A delayed settlement (T+1) order waiting for its release signature value: success: false error: code: INVALID_STATUS message: "this order settles T+1: the payout is confirmed by the provider, not with confirm-fiat-received; to release the crypto, sign the consent with POST /api/v1/partner/orders/{order_id}/settlement-consent" /api/v1/partner/orders/{order_id}/cancel: post: tags: - Orders summary: Cancel order description: | Cancel an order if cancellation is allowed at the current status. Check `allowed_actions` on the order response — `cancel` is available when cancellation is permitted. Once `authorize-crypto-transfer` has submitted the escrow funding, an off-ramp cannot be cancelled while that transfer may still execute: the call answers `409 OPERATION_NOT_ALLOWED`. It can be cancelled again only if the submitted transfer failed without reaching the chain. operationId: cancelOrder security: - ApiKeyAuth: [] parameters: - name: order_id in: path required: true description: Order UUID schema: type: string format: uuid example: "b2c3d4e5-f6a7-8901-bcde-f12345678901" requestBody: required: false description: >- Optional. Send no body, or a JSON object. A body that is present must be valid JSON, otherwise the call answers `400`. content: application/json: schema: type: object properties: reason: type: string description: >- Free-text reason. On an order a liquidity provider has already accepted, the reason is kept with the cancellation for Unigox support, and `cancelled by partner` is recorded when it is omitted or empty. On an order still waiting for a liquidity provider to accept it, the reason is not recorded. It is never returned on the order. example: reason: "customer changed their mind" responses: '200': description: Order cancelled successfully. Returns the order as it reads after the cancellation. content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PartnerOrderResponse' '400': description: >- `INVALID_REQUEST` — malformed `order_id`, or a request body that is present but not JSON. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INVALID_REQUEST message: "invalid request body" '401': description: Unauthorized — invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: UNAUTHORIZED message: "invalid API key" '404': description: Order not found '409': description: >- `OPERATION_NOT_ALLOWED` — cancellation not allowed at the current status, including a delayed settlement (T+1) order whose consent is signed or whose crypto transfer is already submitted. Read the order: `allowed_actions` says whether `cancel` is still offered. On a delayed order a consent call that is still running, or one cut off before its signature was stored, also refuses the cancel, for up to two minutes after that call while `allowed_actions` still offers `cancel`. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: OPERATION_NOT_ALLOWED message: "order cannot be cancelled in current status: crypto_received" '500': description: >- `INTERNAL_ERROR` — the cancellation could not be completed. Read the order before retrying: its `status` and `allowed_actions` say whether it was cancelled. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' example: success: false error: code: INTERNAL_ERROR message: "internal error" /api/v1/partner/orders: get: tags: - Orders summary: List orders description: | Get a paginated list of orders with optional filtering by status. Each order includes `allowed_actions` indicating which API actions are available. The list also contains **widget orders** — orders your customers created through the embedded Unigox widget under your `widgetKey`. Those are attributed to you for reporting and markup, but the crypto belongs to the end user, so they are **notify-only**: they appear here and in your webhook stream, and every action endpoint answers `404 ORDER_NOT_FOUND` for them. The guarantee runs one way only. A widget order is always `[]`, and any action listed is one the endpoint will accept — but `[]` does NOT mean an order is a widget order. Your own orders are also `[]` whenever their status carries no action for you, including the mid-flight `crypto_transfer_authorization_pending`. Reading an empty array as "this is a customer's order" would misclassify your own live orders and stop you tracking them. Keep acting only on order ids your own `initiate` call returned. That rule still holds as defence in depth, and it is the one that does not depend on reading a field correctly. To read a specific widget order, the embedded widget's `onTradeStarted` and `onTradeCompleted` callbacks carry `orderId` — the same `order_id` used here and in your webhooks. Its sibling `tradeId` is a Unigox-internal numeric id and is **not** accepted by this API: `GET /partner/orders/{order_id}` validates the path segment as a UUID and answers `400 invalid order_id format` for it. operationId: listOrders security: - ApiKeyAuth: [] parameters: - name: status in: query required: false description: | Accepts exactly the values of the `PartnerOrderStatus` enum below, on-ramp and off-ramp alike. Anything else answers `400 INVALID_REQUEST` — including `awaiting_vendor_acceptance`, `awaiting_crypto_submit` and `crypto_submit_pending`, which are internal constants this API never reports and the enum does not carry. Two of the accepted values can never match a row and answer an empty `200`: `fiat_received_confirmed` and `crypto_release_pending` are shadowed by `completed`, which every internal status behind them reports. `awaiting_liquidity_provider` and `price_changed_requote_needed` return the orders no liquidity provider has accepted yet that report them: an order that is still waiting for acceptance, and one whose price moved past its slippage at initiation. Poll `awaiting_liquidity_provider` to follow a new order until it is accepted. The other statuses an unaccepted order can report (`created`, `awaiting_crypto_transfer_authorization`, `cancelled`, `failed`) return it under their filters too. A ramp-specific status implies its trade type, so `status` and `type` need not be paired. Passing a `type` that contradicts the status is not an error either — it is simply a filter nothing satisfies, and answers an empty page. `send_out_pending`, `send_out_completed` and `send_out_failed` narrow on an on-ramp order's send-out sub-state, which lives beside `completed` rather than in the trade status. The same fact runs the other way: `status=completed` can return an on-ramp row whose own `status` reads `send_out_pending`, `send_out_completed` or `send_out_failed`, because the trade did complete and the bridge-out is a later step — a failed one stays visible instead of hiding as "completed". On **delayed settlement (T+1)** orders the four release-bearing filters mean: - `completed` — ordinary released orders, and delayed orders whose fiat actually reached the customer. A released but unpaid delayed order is not here - `settlement_in_progress` — delayed, released, and not yet resolved either way. A standing bank return with no new attempt approved yet belongs under `returned` - `returned` — the bank sent the payout back and nobody has authorized another attempt - `cancelled` — orders that stopped before settlement, as before, **plus** delayed orders whose crypto was refunded after the release For these four values a filter returns exactly the orders whose `status` reports that value. So do `awaiting_crypto_transfer_authorization` and `crypto_transfer_authorization_pending`: the two share one internal status and are told apart by whether the funding transfer was submitted, exactly as the order reports them. `crypto_received` is wider on purpose: it returns every off-ramp order whose crypto is in escrow while the payment is unfinished, including rows that report `fiat_payment_started`, `fiat_payment_review_started` or `dispute_started`. schema: $ref: '#/components/schemas/PartnerOrderStatus' example: "completed" - name: type in: query required: false description: >- Restrict to one ramp: `onramp` or `offramp`. Omit for both. Any other value is ignored rather than refused, so a typo widens the page instead of failing it. schema: type: string enum: [onramp, offramp] example: offramp - name: reference_id in: query required: false description: | Return only the orders you created with this `reference_id` on initiate, newest first, at most 100. Use it to find an order when the initiate response was lost. Each entry is the same object `GET /partner/orders/{order_id}` returns. `reference_id` is not enforced unique, so the answer is a list. Combines with `type`, `page` and `limit`. Combined with `status` it answers `400 INVALID_REQUEST`. At most 255 characters. schema: type: string maxLength: 255 example: "your-order-000123" - name: page in: query required: false description: Page number (default 1) schema: type: integer default: 1 example: 1 - name: limit in: query required: false description: Results per page (default 20, max 100) schema: type: integer default: 20 maximum: 100 example: 20 responses: '200': description: Orders retrieved successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: object properties: orders: type: array items: $ref: '#/components/schemas/PartnerOrderResponse' pagination: type: object properties: page: type: integer example: 1 limit: type: integer example: 20 total_count: type: integer example: 42 total_pages: type: integer example: 3 example: success: true data: orders: - order_id: "b2c3d4e5-f6a7-8901-bcde-f12345678901" status: completed allowed_actions: [] amounts: crypto_amount: "101.50" fiat_amount: "152880.00" crypto_currency: USDT fiat_currency: NGN rate: "1530.12" fee_breakdown: platform_fee: "1.50" platform_fee_pct: 1.5 partner_fee: "1.00" partner_fee_pct: 1 total_fee: "2.50" timeline: - status: created timestamp: "2026-02-01T12:00:05Z" description: "Order created" - status: completed timestamp: "2026-02-01T12:30:00Z" description: "Order completed" created_at: "2026-02-01T12:00:05Z" updated_at: "2026-02-01T12:30:00Z" pagination: page: 1 limit: 20 total_count: 42 total_pages: 3 '401': description: Unauthorized — invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/stats: get: tags: - Orders summary: Order stats description: | Headline numbers for your whole order history in one call: how many orders you have, how many completed, and the fiat volume and markup earned on the completed ones. This is what the partner dashboard tiles show. Volume and earnings cover **completed** orders only and are reported in **USD**, each order converted at the rate snapshotted when it was created, so the totals are comparable across the fiat currencies you trade in and do not move with today's FX. `total_orders` equals `pagination.total_count` of `GET /partner/orders` with no filter. A delayed settlement (T+1) order counts as completed — in `completed_orders`, `volume_usd` and `earned_usd` — only once its payment is recorded paid (`delayed_settlement_fiat_paid_to_customer_at`), the rule the `completed` filter of `GET /partner/orders` applies. Released but unpaid, returned, or refunded after the release, it is not counted. operationId: getOrderStats security: - ApiKeyAuth: [] responses: '200': description: Aggregate order statistics content: application/json: schema: type: object properties: success: type: boolean example: true data: $ref: '#/components/schemas/PartnerStatsResponse' '401': description: Unauthorized — invalid or missing API key content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' # ============================================ # 12. WEBHOOKS # ============================================ /api/v1/partner/webhooks: post: tags: - Webhooks summary: Register webhook URL description: | Register or update the webhook URL for your partner account. The URL must use HTTPS. Once registered, the webhook is automatically enabled and will start receiving order status events. operationId: registerWebhook security: - ApiKeyAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RegisterWebhookRequest' example: url: "https://partner.example.com/webhooks/unigox" responses: '200': description: Webhook registered successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/WebhookConfigResponse' example: success: true data: url: "https://partner.example.com/webhooks/unigox" enabled: true '400': description: | Bad request — missing or invalid URL. This endpoint answers with a bare message string under `error`, not the `{"success": false, "error": {"code", "message"}}` object the off-ramp and order endpoints use, and not the `data.error_key` shape. Read `error` as text; there is no code to branch on. content: application/json: schema: type: object required: [success, error] properties: success: type: boolean example: false error: type: string description: Human-readable message. Not an object, and not a stable key. examples: url_required: summary: URL is required value: success: false error: "webhook URL is required" url_not_https: summary: URL must use HTTPS value: success: false error: "webhook URL must use HTTPS" '401': description: Unauthorized — invalid or missing API key get: tags: - Webhooks summary: Get webhook config description: | Returns the current webhook configuration for your partner account, including the URL and whether the webhook is enabled. operationId: getWebhook security: - ApiKeyAuth: [] responses: '200': description: Webhook configuration retrieved content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/WebhookConfigResponse' example: success: true data: url: "https://partner.example.com/webhooks/unigox" enabled: true '401': description: Unauthorized — invalid or missing API key /api/v1/partner/webhooks/{id}: delete: tags: - Webhooks summary: Delete webhook description: | Remove the webhook URL and disable webhook delivery for your partner account. No further events will be sent until a new URL is registered. operationId: deleteWebhook security: - ApiKeyAuth: [] parameters: - name: id in: path required: true description: Webhook ID (any value accepted — the system uses the authenticated partner context) schema: type: string example: "1" responses: '200': description: Webhook deleted successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: object properties: message: type: string example: "webhook deleted" example: success: true data: message: "webhook deleted" '401': description: Unauthorized — invalid or missing API key /api/v1/partner/webhooks/test: post: tags: - Webhooks summary: Test webhook description: | Send a signed test event to your configured webhook URL. Uses the same HMAC-SHA256 signature scheme as production events. Use this to verify your endpoint is reachable and correctly validating signatures. **No body** (or an empty one) sends a `ping` event with empty `data`, as it always has. **With a body** `{"event_type": "..."}` it sends a sample of that real event instead, in the exact shape your endpoint will receive in production, so you can test your handler before real money moves. Supported `event_type` values: | `event_type` | Sample | | --- | --- | | `ping` | Same as no body. | | `order.status.changed` | A completed off-ramp order. | | `fiat_account.deposit.received` | A credit on an issued account. `holder_type`: `retail` (default) or `business`. | | `fiat_account.payment.sent` | Money leaving a business customer's account. | | `fiat_account.payment.updated` | A status step of a business account payment (`status: pending`). | | `business_customer.kyb.updated` | A business customer's KYB reaching `approved`. | Any other value returns `400` with the supported list. Every sample is clearly marked: `event_id` starts with `evt_test_` and the envelope carries `"test": true` at the top level (inside the signed body, so signature verification is unchanged). Ids inside `data` are placeholders (`00000000-0000-4000-8000-00000000000N`, `business_0`) that match nothing in your account. A test event is sent once, is not retried, and does not appear in `GET /api/v1/partner/webhooks/events`. operationId: testPingWebhook security: - ApiKeyAuth: [] requestBody: required: false content: application/json: schema: $ref: '#/components/schemas/WebhookTestRequest' examples: ping: summary: Ping (same as no body) value: {} business_deposit: summary: A business account deposit value: event_type: fiat_account.deposit.received holder_type: business responses: '200': description: | The test event was sent. `delivered` says whether your endpoint accepted it: `true` for a 2xx answer, `false` for any other answer (its code in `http_status`) or none at all (`http_status: null`). A `false` here is your endpoint's result, not an error of the call, so it is a `200` too. content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/WebhookTestPingResponse' examples: delivered: summary: Your endpoint answered 2xx value: success: true data: delivered: true http_status: 200 rejected: summary: Your endpoint answered non-2xx value: success: true data: delivered: false http_status: 401 error: webhook endpoint answered non-2xx unreachable: summary: No answer (DNS, TLS, connection or timeout) value: success: true data: delivered: false http_status: null error: webhook endpoint unreachable '400': description: Webhook URL not configured, malformed body, or an unsupported `event_type` / `holder_type` content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: url_not_set: summary: Webhook URL not configured value: success: false data: error_key: "webhook URL is not set" unsupported_event: summary: Unsupported event_type value: success: false error: "unsupported event_type; supported: business_customer.kyb.updated, fiat_account.deposit.received, fiat_account.payment.sent, fiat_account.payment.updated, order.status.changed, ping" '401': description: Unauthorized — invalid or missing API key /api/v1/partner/webhooks/events: get: tags: - Webhooks summary: List webhook events (replay) description: | Read back the webhook events sent to you, oldest first, with how each delivery went. Use it to catch up after your endpoint was down or your webhook was switched off, or to reconcile what you processed against what was sent. Each item is the event **exactly as it was signed and sent** (`event_id`, `event_type`, `created_at`, `data`) with a `delivery` object added, so the same code that handles the live webhook can process it. Deduplicate on `event_id`, as you do for live deliveries. **Which events appear.** Events delivered through Unigox's retrying event queue: `order.status.changed`, `order.refund.required`, `order.own_account_payout.updated`, `user.kyc.updated`, `business_customer.kyb.updated`, `fiat_account.updated` when an account is closed, and the business account events `fiat_account.deposit.received`, `fiat_account.payment.sent` and `fiat_account.payment.updated`. The retail `fiat_account.deposit.received`, other `fiat_account.updated` notices and test events are sent once and are not retried. `wallet.deposit.received` is retried on its own schedule (see Webhooks). None of these appear here. **Events from while your webhook was off are listed too.** They were never sent: their `delivery.status` is `failed` with `failure_reason: webhook_disabled`. Read them here, or ask for one to be sent with the redeliver endpoint once your webhook is on. **Paging.** Pass `next_cursor` back as `cursor` for the next page. `next_cursor` is set on every non-empty page, including the last one, so you can keep polling with it; an empty page returns the cursor you sent. When `cursor` is sent without `since`, the cursor alone is the starting point. An event is stamped when the change that raised it began, so one can become visible slightly after a later-stamped one: when polling, re-read with a small overlap (`since` a few minutes back) and deduplicate on `event_id`. operationId: listWebhookEvents security: - ApiKeyAuth: [] parameters: - name: since in: query required: false description: | RFC 3339 timestamp; events created at or after it. Default: 24 hours ago, or no lower bound when `cursor` is sent. schema: type: string format: date-time example: "2026-10-25T00:00:00Z" - name: event_type in: query required: false description: Only events of this type (exact match). schema: type: string example: order.status.changed - name: limit in: query required: false description: Page size. Default 50, maximum 200 (larger values are read as 200). schema: type: integer minimum: 1 maximum: 200 default: 50 - name: cursor in: query required: false description: The `next_cursor` of the previous page. Opaque; do not build it yourself. schema: type: string responses: '200': description: One page of events content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/WebhookEventPage' example: success: true data: events: - event_id: "evt_3c1f9a52-7d0e-4b8a-9f61-2a4d5e6f7a8b" event_type: "order.status.changed" created_at: "2026-10-26T09:14:02Z" data: order_id: "ord-2026-10-26-0001" status: "completed" user_id: "5f0c6b1e-2a3d-4e5f-8a9b-0c1d2e3f4a5b" crypto_amount: "100" crypto_currency: "USDT" fiat_amount: "92.50" fiat_currency: "EUR" provider: "licensed" payment_details_id: "812" partner_fee: "0" partner_fee_pct: 0 order_type: "offramp" delivery: status: "delivered" attempts: 1 delivered_at: "2026-10-26T09:14:03Z" last_http_status: 200 failure_reason: null - event_id: "evt_fiat_account_payment_sent_9b1c2d3e" event_type: "fiat_account.payment.sent" created_at: "2026-10-26T09:20:11Z" data: fiat_account_id: "business_17" holder_type: "business" business_customer_id: "3f6b2a10-9c1e-4d7a-8b2f-1c2d3e4f5a6b" payment_id: "9b1c2d3e" transaction_id: "9b1c2d3e" order_id: null direction: "outgoing" amount: "1000.00" currency: "EUR" status: "completed" rail: "sepa" delivery: status: "failed" attempts: 1 delivered_at: null last_http_status: null failure_reason: "webhook_disabled" since: "2026-10-25T10:00:00Z" has_more: false next_cursor: "MTc2MTQ3MDQxMTAwMDAwMC40MjE" '400': description: Malformed `since`, `limit` or `cursor` content: application/json: schema: $ref: '#/components/schemas/WebhookErrorResponse' example: success: false error: "since must be an RFC 3339 timestamp, e.g. 2026-10-26T00:00:00Z" '401': description: Unauthorized — invalid or missing API key /api/v1/partner/webhooks/events/{event_id}/redeliver: post: tags: - Webhooks summary: Redeliver a webhook event description: | Send one of your events again: same `event_id`, same payload, a fresh signature and timestamp, and the full retry schedule (up to 10 attempts with backoff), as for a new event. Delivery happens within seconds; the response confirms it is queued, not that your endpoint accepted it — read the event back with `GET /api/v1/partner/webhooks/events` to follow it. The previous `delivered_at` / `last_http_status` stay until the new attempt replaces them. Your webhook must be registered and enabled; an event that is being delivered at this moment returns `409`, retry a few seconds later. operationId: redeliverWebhookEvent security: - ApiKeyAuth: [] parameters: - name: event_id in: path required: true description: The event's `event_id`. schema: type: string example: "evt_fiat_account_payment_sent_9b1c2d3e" responses: '200': description: Queued for delivery. The event as it now stands. content: application/json: schema: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/WebhookEvent' example: success: true data: event_id: "evt_fiat_account_payment_sent_9b1c2d3e" event_type: "fiat_account.payment.sent" created_at: "2026-10-26T09:20:11Z" data: fiat_account_id: "business_17" holder_type: "business" direction: "outgoing" amount: "1000.00" currency: "EUR" delivery: status: "pending" attempts: 0 delivered_at: null last_http_status: null failure_reason: null '400': description: No webhook URL registered (`WEBHOOK_URL_NOT_SET`) or webhook switched off (`WEBHOOK_DISABLED`) content: application/json: schema: $ref: '#/components/schemas/WebhookErrorResponse' example: success: false error: "WEBHOOK_DISABLED" '401': description: Unauthorized — invalid or missing API key '404': description: No such event for your account content: application/json: schema: $ref: '#/components/schemas/WebhookErrorResponse' example: success: false error: "Webhook event not found" '409': description: The event is being delivered right now; retry shortly content: application/json: schema: $ref: '#/components/schemas/WebhookErrorResponse' example: success: false error: "Webhook event is being delivered right now; retry shortly" /api/v1/partner/fiat-accounts/config: get: tags: - Fiat Accounts summary: What fiat accounts you can offer operationId: getFiatAccountsConfig description: | Whether you may issue fiat accounts right now, which currencies an account may be denominated in, and which jurisdictions each currency can be issued from. The one fiat account route that names no customer. Entitlement is never an error here: when the product is not active it answers `200` with `enabled: false` and a `disabled_reason`. `issues_accounts: false` with `enabled: true` means you may read accounts but not open them. security: - ApiKeyAuth: [] responses: '200': description: Current configuration content: application/json: schema: $ref: '#/components/schemas/FiatAccountConfigResponse' '401': description: Missing or invalid credential content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/fiat-accounts: get: tags: - Fiat Accounts summary: List a customer's fiat accounts operationId: listFiatAccounts description: | Every fiat account issued to one of your customers. A customer with none yet answers an empty list. Only the last four digits of the identifier travel here. Read a single account for the pay-in details a customer needs. security: - ApiKeyAuth: [] parameters: - name: user_uuid in: query required: true description: The customer whose accounts to list. schema: type: string format: uuid example: "550e8400-e29b-41d4-a716-446655440000" responses: '200': description: Accounts content: application/json: schema: $ref: '#/components/schemas/FiatAccountListResponse' '404': description: No such customer, or not yours (`CUSTOMER_NOT_FOUND`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' post: tags: - Fiat Accounts summary: Issue a fiat account operationId: issueFiatAccount description: | Opens a fiat account for one of your customers. The customer must be KYC-verified by Unigox; everything the bank needs about them comes from that verification, so there is no identity to submit here. The account is opened asynchronously. It answers `201` with `status: "pending"` and no pay-in details; watch for `fiat_account.updated` — or poll the account — until it reads `active`, and only then tell the customer where to transfer. **Idempotent per (user_uuid, currency, issuer_country).** A repeat answers `201` with the same account and `created: false`. When the bank needs a field the KYC record does not have, this answers `422 ISSUANCE_NOT_READY` and names those fields in `error.details.missing_fields`. They are KYC field names: fill them with `PATCH /api/v1/partner/users/{user_uuid}/kyc` and post again. security: - ApiKeyAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/FiatAccountCreateRequest' responses: '201': description: | Opened, or the existing account for this (customer, currency, jurisdiction). `created` distinguishes the two. content: application/json: schema: $ref: '#/components/schemas/FiatAccountResponse' '400': description: | `UNSUPPORTED_CURRENCY`, `UNSUPPORTED_ISSUER_COUNTRY` or `POSTAL_CODE_REQUIRED`. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '403': description: Not entitled (`PRODUCT_NOT_ACTIVATED`, `ISSUANCE_NOT_GRANTED`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: No such customer, or not yours (`CUSTOMER_NOT_FOUND`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: The same account is already being opened (`PROVISIONING_IN_PROGRESS`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '422': description: | The customer is not verified (`KYC_NOT_CLEARED`), the bank needs fields the KYC record does not have (`ISSUANCE_NOT_READY`, with `error.details.missing_fields`), or the currency has no pricing (`CURRENCY_NOT_PRICED`). content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '503': description: The bank could not be reached (`BANKING_UNAVAILABLE`). Safe to retry. content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/fiat-accounts/{fiat_account_id}: get: tags: - Fiat Accounts summary: One fiat account operationId: getFiatAccount description: | One account: its status, its live balances, and — once it is `active` — the pay-in details to show the customer. Those details are shaped by the rail the account is on: `iban` and `bic` for a euro (SEPA) account, `account_number` and `sort_code` for a sterling (Faster Payments) one. Keys that do not apply are absent rather than empty. `balances_unavailable: true` means the balance read failed. Balances are reported as unavailable rather than as zero: a zero you act on is worse than a gap. security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/FiatAccountId' responses: '200': description: Account content: application/json: schema: $ref: '#/components/schemas/FiatAccountResponse' '404': description: No such account, or not yours (`FIAT_ACCOUNT_NOT_FOUND`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/fiat-accounts/{fiat_account_id}/transactions: get: tags: - Fiat Accounts summary: Money that moved on a fiat account operationId: getFiatAccountTransactions description: | One page of the money that moved on the account, newest first. v1 is receive-only, so every row is a `credit`: a transfer the customer's payer sent to the account. A credit that funded an on-ramp carries that order in `order_id`; one that matched no order carries `null` and simply sits on the account. Paging is `page`. `has_more` says whether another page exists. security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/FiatAccountId' - name: page in: query required: false description: 1-based page number. Omitted or unparseable means the first page. schema: type: integer minimum: 1 example: 1 responses: '200': description: Transactions page content: application/json: schema: $ref: '#/components/schemas/FiatTransactionsResponse' '404': description: No such account, or not yours (`FIAT_ACCOUNT_NOT_FOUND`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '503': description: The bank could not be read (`BANKING_UNAVAILABLE`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/business-customers: get: tags: - Business Customers summary: List your business customers operationId: listBusinessCustomers description: | Companies you onboarded through KYB to issue accounts to, newest first, with their KYB status. `can_open_accounts` is `true` once the KYB is approved. security: - ApiKeyAuth: [] parameters: - name: status in: query required: false description: Only cases in this KYB status, one of `not_started`, `in_progress`, `submitted`, `automated_review`, `manual_review`, `additional_information_required`, `resubmitted`, `approved`, `rejected`. schema: type: string - name: search in: query required: false description: Matches the company name, the case reference or your `external_ref`. schema: type: string - name: limit in: query required: false schema: type: integer minimum: 1 maximum: 100 - name: offset in: query required: false schema: type: integer minimum: 0 responses: '200': description: One page of business customers content: application/json: schema: $ref: '#/components/schemas/BusinessCustomerListResponse' '403': description: Not enabled for you (`CAPABILITY_NOT_GRANTED`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' post: tags: - Business Customers summary: Start KYB for a business customer operationId: createBusinessCustomer description: | Opens a KYB case for a company and answers with the onboarding link its representative fills the questionnaire in at. `representative_email` is required: the link is emailed there and only that person can open it. Everything else is optional: whatever you send is pre-filled, and the representative completes the rest. security: - ApiKeyAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BusinessCustomerCreateRequest' responses: '201': description: Case opened content: application/json: schema: $ref: '#/components/schemas/BusinessCustomerCreateResponse' '400': description: Invalid body (`INVALID_REQUEST`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '403': description: Not enabled for you (`CAPABILITY_NOT_GRANTED`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/business-customers/{business_customer_id}: get: tags: - Business Customers summary: One business customer and its KYB status operationId: getBusinessCustomer description: | The case, with what is still asked of the company (`information_requests`) and each person's identity check (`identity_verifications`, each with the link to resend if they lost it). security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/BusinessCustomerId' responses: '200': description: The business customer content: application/json: schema: $ref: '#/components/schemas/BusinessCustomerResponse' '404': description: No such business customer, or not yours (`BUSINESS_CUSTOMER_NOT_FOUND`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/business-customers/{business_customer_id}/onboarding-link: get: tags: - Business Customers summary: The current onboarding link operationId: getBusinessCustomerOnboardingLink security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/BusinessCustomerId' responses: '200': description: The link and when it expires content: application/json: schema: $ref: '#/components/schemas/BusinessOnboardingLinkResponse' '404': description: No such business customer, or not yours (`BUSINESS_CUSTOMER_NOT_FOUND`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: The KYB is already decided, so there is no link (`CONFLICT`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/business-customers/{business_customer_id}/resend-invitation: post: tags: - Business Customers summary: Issue a fresh onboarding link operationId: resendBusinessCustomerInvitation description: The previous link stops working. The new one is emailed to the representative when one is on file. security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/BusinessCustomerId' responses: '200': description: The new link content: application/json: schema: $ref: '#/components/schemas/BusinessOnboardingLinkResponse' '404': description: No such business customer, or not yours (`BUSINESS_CUSTOMER_NOT_FOUND`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: The KYB is already decided, so there is no link to resend (`CONFLICT`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/business-customers/{business_customer_id}/fiat-accounts: get: tags: - Business Customers summary: A business customer's accounts operationId: listBusinessFiatAccounts description: Every account issued to this company, closed ones included, with live bank details and balances. security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/BusinessCustomerId' responses: '200': description: The accounts content: application/json: schema: $ref: '#/components/schemas/BusinessFiatAccountListResponse' '404': description: No such business customer, or not yours (`BUSINESS_CUSTOMER_NOT_FOUND`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' post: tags: - Business Customers summary: Issue an account to a business customer operationId: issueBusinessFiatAccount description: | Opens an account in the company's name. Refused until the KYB is approved (`KYB_NOT_APPROVED`). A second account in a currency the company already holds needs `allow_duplicate: true`. security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/BusinessCustomerId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BusinessFiatAccountCreateRequest' responses: '201': description: Account opened content: application/json: schema: $ref: '#/components/schemas/BusinessFiatAccountResponse' '403': description: Not enabled for you (`CAPABILITY_NOT_GRANTED`, `PRODUCT_DOES_NOT_ISSUE_ACCOUNTS`, `ISSUANCE_DISABLED`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '422': description: KYB not approved yet (`KYB_NOT_APPROVED`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '400': description: Bad currency or issuer country (`UNSUPPORTED_CURRENCY`, `INVALID_ISSUER_COUNTRY`, `BUSINESS_NAME_MISSING`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: No such business customer, or not yours (`BUSINESS_CUSTOMER_NOT_FOUND`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: The company already holds an account in this currency; send `allow_duplicate` as true for a second one (`CURRENCY_ALREADY_ISSUED`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/business-customers/{business_customer_id}/fiat-accounts/{fiat_account_id}: get: tags: - Business Customers summary: One business account operationId: getBusinessFiatAccount security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/BusinessCustomerId' - $ref: '#/components/parameters/BusinessFiatAccountId' responses: '200': description: The account content: application/json: schema: $ref: '#/components/schemas/BusinessFiatAccountResponse' '404': description: No such account under this customer (`FIAT_ACCOUNT_NOT_FOUND`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/business-customers/{business_customer_id}/fiat-accounts/{fiat_account_id}/ledger: get: tags: - Business Customers summary: Every entry on the account's book operationId: getBusinessFiatAccountLedger description: Credits, debits, conversions, internal transfers and fees, newest first, with the balance after each when the bank reports it. security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/BusinessCustomerId' - $ref: '#/components/parameters/BusinessFiatAccountId' - name: page in: query required: false schema: type: integer minimum: 1 responses: '200': description: One page of entries content: application/json: schema: $ref: '#/components/schemas/BusinessLedgerResponse' '404': description: No such account under this customer (`FIAT_ACCOUNT_NOT_FOUND`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/business-customers/{business_customer_id}/fiat-accounts/{fiat_account_id}/payments: get: tags: - Business Customers summary: Bank transfers in and out of the account operationId: getBusinessFiatAccountPayments security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/BusinessCustomerId' - $ref: '#/components/parameters/BusinessFiatAccountId' - name: page in: query required: false schema: type: integer minimum: 1 responses: '200': description: One page of payments content: application/json: schema: $ref: '#/components/schemas/BusinessPaymentsResponse' '404': description: No such account under this customer (`FIAT_ACCOUNT_NOT_FOUND`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/business-customers/{business_customer_id}/fiat-accounts/{fiat_account_id}/transfer-to-partner: post: tags: - Business Customers summary: Move the account's balance to your operating account operationId: transferBusinessFiatAccountToPartner description: | Moves `amount` of `currency` (the whole available balance when `amount` is omitted) from the company's account to your own operating account. Requires an `Idempotency-Key` header; a retry with the same key answers from the first attempt (`replayed: true`) and moves nothing. security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/BusinessCustomerId' - $ref: '#/components/parameters/BusinessFiatAccountId' - $ref: '#/components/parameters/IdempotencyKeyHeader' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BusinessTransferRequest' responses: '200': description: Moved content: application/json: schema: $ref: '#/components/schemas/BusinessTransferResponse' '400': description: No idempotency key (`IDEMPOTENCY_KEY_REQUIRED`) or a bad amount content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: The key was used for a different transfer, is still running, or is held for reconciliation (`IDEMPOTENCY_KEY_CONFLICT`, `TRANSFER_IN_PROGRESS`, `TRANSFER_UNRECONCILED`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '403': description: Moving funds is not enabled for you, or is switched off (`CAPABILITY_NOT_GRANTED`, `ISSUANCE_DISABLED`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: No such account under this customer (`FIAT_ACCOUNT_NOT_FOUND`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '422': description: Nothing can move (`NOTHING_TO_MOVE`, `INSUFFICIENT_FUNDS`, `FUNDS_NOT_SETTLED`, `ACCOUNT_CLOSED`, `NO_OPERATING_ACCOUNT`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '504': description: The bank did not confirm in time and the transfer may still have gone through (`BANKING_TIMEOUT_UNKNOWN`). Do not retry with a new key; contact Unigox support content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/business-customers/{business_customer_id}/fiat-accounts/{fiat_account_id}/fund: post: tags: - Business Customers summary: Fund the account from your operating account operationId: fundBusinessFiatAccount description: The mirror of transfer-to-partner. Enabled per partner. Requires an `Idempotency-Key` header. security: - ApiKeyAuth: [] parameters: - $ref: '#/components/parameters/BusinessCustomerId' - $ref: '#/components/parameters/BusinessFiatAccountId' - $ref: '#/components/parameters/IdempotencyKeyHeader' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BusinessFundRequest' responses: '200': description: Funded content: application/json: schema: $ref: '#/components/schemas/BusinessTransferResponse' '400': description: No idempotency key (`IDEMPOTENCY_KEY_REQUIRED`), a bad amount (`INVALID_AMOUNT`) or a currency the account does not hold (`CURRENCY_MISMATCH`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '403': description: Funding is not enabled for you, or is switched off (`CAPABILITY_NOT_GRANTED`, `ISSUANCE_DISABLED`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: The key was used for a different transfer, is still running, or is held for reconciliation (`IDEMPOTENCY_KEY_CONFLICT`, `TRANSFER_IN_PROGRESS`, `TRANSFER_UNRECONCILED`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: No such account under this customer (`FIAT_ACCOUNT_NOT_FOUND`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '422': description: Nothing can move (`NOTHING_TO_MOVE`, `INSUFFICIENT_FUNDS`, `FUNDS_NOT_SETTLED`, `ACCOUNT_CLOSED`, `NO_OPERATING_ACCOUNT`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '504': description: The bank did not confirm in time and the transfer may still have gone through (`BANKING_TIMEOUT_UNKNOWN`). Do not retry with a new key; contact Unigox support content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/operating-account/conversions: post: tags: [Business Customers] summary: Convert operating fiat balance to crypto operationId: convertOperatingAccount description: | Not available until the operating-account money API release is deployed. Buys USDC or USDT with EUR or GBP using the portal conversion and fee path. This is a market submission, not a quote. Requires Idempotency-Key. Repeating the identical normalized request returns its stored receipt without executing it again. Keys are shared by both operating-account money endpoints. An in_progress or needs_review operation blocks another key for this partner. submitted means bank acknowledgement, not final delivery. Read balances/ledger before spending. See [integration and retry rules](https://developers.unigox.com/tutorials/fiat-accounts#converting-and-withdrawing-your-operating-balance). security: - ApiKeyAuth: [] parameters: - in: header name: Idempotency-Key required: true schema: type: string pattern: '^[A-Za-z0-9._:-]{1,128}$' requestBody: required: true content: application/json: schema: type: object additionalProperties: false required: [amount, currency, crypto_currency] properties: amount: type: string pattern: '^[0-9]{1,12}(\.[0-9]{1,2})?$' description: Positive decimal amount. Exponents, zero and excess precision are rejected. example: '1.00' currency: type: string enum: [EUR, GBP] crypto_currency: type: string enum: [USDC, USDT] responses: '202': description: Recorded submission outcome; inspect status, which may also be failed or needs_review content: application/json: schema: $ref: '#/components/schemas/OperatingMoneyResponse' '200': description: Idempotent replay of a recorded operation; no new debit content: application/json: schema: $ref: '#/components/schemas/OperatingMoneyResponse' '400': description: INVALID_REQUEST, INVALID_AMOUNT or INVALID_IDEMPOTENCY_KEY content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '403': description: NO_OPERATING_ACCOUNT content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: IDEMPOTENCY_CONFLICT or OPERATION_UNRESOLVED content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '422': description: OWNER_WALLET_REQUIRED for withdrawal content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '503': description: SERVICE_UNAVAILABLE, WALLET_UNAVAILABLE or OPERATION_UNCONFIRMED; retry only with the same key content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/operating-account/withdrawals: post: tags: [Business Customers] summary: Withdraw operating crypto to your own UNIGOX wallet operationId: withdrawOperatingAccount description: | Not available until the operating-account money API release is deployed. Withdraws to the single partner owner's server-resolved UNIGOX deposit address on Ethereum. No caller-supplied destination, network, owner or source account is accepted. Does not pay end-customer wallets. Requires Idempotency-Key. Repeating the identical normalized request returns its stored receipt without executing it again. Keys are shared by both operating-account money endpoints. An in_progress or needs_review operation blocks another key for this partner. submitted means bank acknowledgement, not final delivery. Read balances/ledger before spending. See [integration and retry rules](https://developers.unigox.com/tutorials/fiat-accounts#converting-and-withdrawing-your-operating-balance). security: - ApiKeyAuth: [] parameters: - in: header name: Idempotency-Key required: true schema: type: string pattern: '^[A-Za-z0-9._:-]{1,128}$' requestBody: required: true content: application/json: schema: type: object additionalProperties: false required: [amount, currency] properties: amount: type: string pattern: '^[0-9]{1,12}(\.[0-9]{1,6})?$' description: Positive decimal amount. Exponents, zero and excess precision are rejected. example: '1.00' currency: type: string enum: [USDC, USDT] responses: '202': description: Recorded submission outcome; inspect status, which may also be failed or needs_review content: application/json: schema: $ref: '#/components/schemas/OperatingMoneyResponse' '200': description: Idempotent replay of a recorded operation; no new debit content: application/json: schema: $ref: '#/components/schemas/OperatingMoneyResponse' '400': description: INVALID_REQUEST, INVALID_AMOUNT or INVALID_IDEMPOTENCY_KEY content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '403': description: NO_OPERATING_ACCOUNT content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '409': description: IDEMPOTENCY_CONFLICT or OPERATION_UNRESOLVED content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '422': description: OWNER_WALLET_REQUIRED for withdrawal content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '503': description: SERVICE_UNAVAILABLE, WALLET_UNAVAILABLE or OPERATION_UNCONFIRMED; retry only with the same key content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/operating-account/operations/{operation_id}: get: tags: [Business Customers] summary: Read an operating-account submission receipt operationId: getOperatingOperation description: | Not available until the operating-account money API release is deployed. Returns the durably recorded submission outcome, scoped to your partner. This is not a live bank or blockchain status poll. submitted does not confirm final wallet delivery. No new operation-status webhook is emitted. If in_progress persists or status is needs_review, contact Unigox; do not submit a replacement under another key or through the portal. security: - ApiKeyAuth: [] parameters: - in: path name: operation_id required: true schema: type: string format: uuid responses: '200': description: Recorded receipt content: application/json: schema: $ref: '#/components/schemas/OperatingMoneyResponse' '403': description: NO_OPERATING_ACCOUNT content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '404': description: OPERATION_NOT_FOUND, also for another partner's operation content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' '503': description: SERVICE_UNAVAILABLE content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/operating-account: get: tags: - Business Customers summary: Your operating account's balances operationId: getOperatingAccount description: | What your operating account holds, fiat and crypto apart. Amounts are what you can spend now: any fees Unigox has reserved on the account are already taken off. security: - ApiKeyAuth: [] responses: '200': description: The balances content: application/json: schema: $ref: '#/components/schemas/OperatingAccountResponse' '403': description: No operating account is set up for you (`NO_OPERATING_ACCOUNT`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/operating-account/ledger: get: tags: - Business Customers summary: Every entry on your operating account's book operationId: getOperatingAccountLedger description: | Newest first: money moved in from a business customer's account (`internal_transfer`), conversions, crypto transfers, bank transfers and fees. security: - ApiKeyAuth: [] parameters: - name: page in: query required: false schema: type: integer minimum: 1 responses: '200': description: One page of entries content: application/json: schema: $ref: '#/components/schemas/BusinessLedgerResponse' '403': description: No operating account is set up for you (`NO_OPERATING_ACCOUNT`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' /api/v1/partner/operating-account/payments: get: tags: - Business Customers summary: Bank transfers in and out of your operating account operationId: getOperatingAccountPayments security: - ApiKeyAuth: [] parameters: - name: page in: query required: false schema: type: integer minimum: 1 responses: '200': description: One page of payments content: application/json: schema: $ref: '#/components/schemas/BusinessPaymentsResponse' '403': description: No operating account is set up for you (`NO_OPERATING_ACCOUNT`) content: application/json: schema: $ref: '#/components/schemas/PartnerErrorResponse' components: schemas: OperatingMoneyResponse: type: object required: [success, data] properties: success: type: boolean enum: [true] data: type: object required: [operation_id, type, status] properties: operation_id: type: string format: uuid type: type: string enum: [conversion, withdrawal] status: type: string enum: [in_progress, submitted, failed, needs_review] description: Submission outcome, not final blockchain delivery or settled balance. amount: type: string currency: type: string crypto_currency: type: string destination_address: type: string description: Server-resolved owner UNIGOX deposit address; withdrawal only. message: type: string conversion: type: object description: Bank-reported fiat_amount, crypto_amount, price, bank_fee and bank_status, where available. fee: type: object description: Recorded Unigox fee (rate, amount and currency), where available. WalletType: type: string enum: [partner_wallet, external_wallet] default: partner_wallet description: | Whose address holds this customer's funds, fixed at creation. - `partner_wallet` — your partner wallet holds them and you sign (default, and every customer created before this field existed). - `external_wallet` — the customer's own EVM address holds them and the customer signs. Requires non-custodial mode. example: external_wallet CustomerWalletSummary: type: object nullable: true required: [address, status] description: Present for `external_wallet` customers, `null` for `partner_wallet` ones. properties: address: type: string nullable: true description: The linked address in lower case, `null` until linked example: "0x8ba1f109551bd432803012645ac136ddd64dba72" status: type: string enum: [unlinked, linked] example: unlinked WalletChallenge: type: object properties: message: type: string description: EIP-4361 message to sign with `personal_sign`, unchanged example: | unigox.com wants you to link your Ethereum account: 0x8ba1f109551bD432803012645Ac136ddd64DBA72 Link this address to customer 550e8400-e29b-41d4-a716-446655440000 of Acme on Unigox. Funds you deposit are held at this address and move only with your signature. URI: https://unigox.com Version: 1 Chain ID: 660279 Nonce: 8f3a2c9b1d4e7f60 Issued At: 2026-10-12T10:00:00Z Expiration Time: 2026-10-12T10:10:00Z nonce: type: string example: 8f3a2c9b1d4e7f60 expires_at: type: string format: date-time example: "2026-10-12T10:10:00Z" CustomerWallet: type: object required: [address, status, linked_at, chain_id, balances] properties: address: type: string nullable: true description: The linked address in lower case example: "0x8ba1f109551bd432803012645ac136ddd64dba72" status: type: string enum: [unlinked, linked] example: linked linked_at: type: string format: date-time nullable: true example: "2026-10-12T10:01:12Z" chain_id: type: string description: Chain where the balance is held (XAI) example: "660279" balances: type: array description: Balance at the linked address on XAI for USDT and USDC. Empty until linked. On `POST …/wallet` also empty when the balance could not be read at that moment; `GET …/wallet` answers `502 BALANCE_UNAVAILABLE` instead. Amounts drop trailing zeros. Compare token addresses case-insensitively. items: type: object properties: crypto_currency: type: string example: USDC token_address: type: string example: "0x37BF70ee0dC89a408De31B79cCCC3152F0C8AF43" amount_human: type: string example: "25" decimals: type: integer example: 6 WithdrawalQuote: type: object properties: withdrawal_quote_id: type: string format: uuid example: "0b8e6c1e-3f0a-4c2e-9d55-6a1f4c3b2e10" expires_at: type: string format: date-time example: "2026-10-12T10:20:00Z" crypto_currency: type: string example: USDC amount: type: string description: Debited from the customer's XAI balance, with the token's full precision example: "25.000000" to_amount: type: string description: Estimated amount arriving, in the destination token's decimals example: "24.910000" fee: type: string description: Bridge and network cost, in `crypto_currency`; `"0.000000"` for `xai` example: "0.090000" destination_chain: type: string example: Arbitrum One destination_address: type: string example: "0x1111111111111111111111111111111111111111" forward_request: type: object description: EIP-712 `ForwardRequest` to sign unchanged properties: from: type: string description: The customer's linked address example: "0x8ba1f109551bd432803012645ac136ddd64dba72" to: type: string description: Token contract on XAI example: "0x37BF70ee0dC89a408De31B79cCCC3152F0C8AF43" value: type: string example: "0" gas: type: string description: Always `"500000"` example: "500000" nonce: type: string example: "3" deadline: type: string description: Unix seconds; equals `expires_at` example: "1791800400" data: type: string description: ERC-20 `transfer` calldata example: "0xa9059cbb…" eip712_domain: type: object properties: name: type: string example: SyntheticAssetForwarder version: type: string example: "1" chainId: type: string example: "660279" verifyingContract: type: string description: The XAI forwarder example: "0x6fFCF38bEc8c733b096958fcd2a8E31A00530EDC" CustomerWithdrawal: type: object properties: withdrawal_id: type: string format: uuid description: Equals `withdrawal_quote_id` example: "0b8e6c1e-3f0a-4c2e-9d55-6a1f4c3b2e10" withdrawal_quote_id: type: string format: uuid example: "0b8e6c1e-3f0a-4c2e-9d55-6a1f4c3b2e10" status: type: string enum: [submitted, bridging, completed, failed, needs_review] description: | `submitted` — accepted for submission; `bridging` — executed on XAI, on its way to the destination chain; `completed` — arrived; `failed` — did not take effect on XAI (reverted, or not executed before the quote's deadline), the funds are still on the customer's address; `needs_review` — could not be settled automatically (for example the bridge failed after the funds left XAI, or still open after 24 hours), Unigox reconciles it. example: bridging crypto_currency: type: string example: USDC amount: type: string example: "25.000000" to_amount: type: string example: "24.910000" destination_chain: type: string example: Arbitrum One destination_address: type: string example: "0x1111111111111111111111111111111111111111" source_tx_hash: type: string nullable: true description: Transaction on XAI example: "0x5c1e…9a02" destination_tx_hash: type: string nullable: true description: Transaction on the destination chain, once known example: null failure_reason: type: string nullable: true example: null created_at: type: string format: date-time example: "2026-10-12T10:11:04Z" updated_at: type: string format: date-time example: "2026-10-12T10:11:40Z" PartnerWalletLinkedData: type: object required: [user_uuid, address, linked_at] description: Data for wallet.linked, delivered in the signed partner webhook envelope. properties: user_uuid: type: string format: uuid description: Customer belonging to the receiving partner. address: type: string description: Linked EVM address. linked_at: type: string format: date-time description: UTC time at which the address was linked. PartnerWalletDepositData: type: object required: [deposit_id, user_uuid, address, chain_id, crypto_currency, token_address, amount, amount_atomic, source_chain_id, source_tx_hash, tx_hash, credited_at] description: | Data for wallet.deposit.received in the signed partner webhook envelope. Identifies a completed bridge credit to the customer's linked XAI wallet. Does not include a memo, memo-lock ID or collection address. Amounts are strings and describe the XAI credit. properties: deposit_id: type: string description: Stable credited-payment identifier. Treat as opaque; deduplicate within your partner account and environment. example: 'intent:12345' user_uuid: type: string format: uuid description: Customer belonging to the receiving partner. address: type: string description: Linked customer wallet credited on XAI. chain_id: type: string enum: ['660279'] description: XAI settlement chain ID as a decimal string. crypto_currency: type: string description: Credited token symbol. token_address: type: string description: Credited token's contract address on XAI. amount: type: string description: Credited amount in whole-token units as a decimal string. example: '1' amount_atomic: type: string description: Same credited amount in the token's smallest units, as an integer string. example: '1000000' source_chain_id: type: string description: Source chain ID as a decimal string; empty if absent from the payment record. source_tx_hash: type: string description: Source transaction identifier; empty if absent from the payment record. tx_hash: type: string description: XAI settlement transaction hash; empty if absent from the payment record. credited_at: type: string format: date-time description: UTC time the XAI settlement transaction was mined. PartnerDepositAddressMonitoring: type: object required: [watched, chains] description: | Monitoring result for this saved address. A false or missing confirmation means unconfirmed, not proof that monitoring is absent. Older responses without monitoring metadata are returned as `watched: false` and `chains: []`. EVM and Tron report each network independently. Solana confirms address registration with Helius. TON monitors saved addresses without an external registration step; its confirmation is not a live service-health check. Solana and TON return `chains: []`. properties: watched: type: boolean description: | Whether monitoring is confirmed for all required networks of this address. For EVM and Tron, use the per-network confirmations when selecting a payment network. example: false chains: type: array description: Per-network confirmations for EVM and Tron. Missing networks are unconfirmed. items: type: object required: [chainId, confirmed] properties: chainId: type: integer format: int64 minimum: 1 description: Numeric chain identifier of the network being checked. example: 1 confirmed: type: boolean description: Whether this address's monitoring is confirmed on that network. example: true PartnerDepositAddress: type: object required: [chain_type, address, monitoring] description: One saved customer deposit address with its monitoring result. properties: chain_type: type: string enum: [evm, svm, tvm, ton] description: Address family; svm is Solana and tvm is Tron. example: evm address: type: string description: The saved collection address. Allocation and subsequent lists retain this address. example: "0x1111111111111111111111111111111111111111" monitoring: $ref: '#/components/schemas/PartnerDepositAddressMonitoring' PartnerDepositAddressesResponse: type: object required: [success, data] description: Successful address allocation or retrieval; readiness is separate from HTTP success. properties: success: type: boolean enum: [true] description: The allocation or list request completed successfully. data: type: object required: [deposit_addresses] properties: deposit_addresses: type: array description: Saved addresses for the requested customer; listing may return an empty array. items: $ref: '#/components/schemas/PartnerDepositAddress' PartnerDepositAddressPendingResponse: type: object required: [success, error, data] description: Monitoring is unconfirmed; returned addresses remain saved and must not be reallocated. properties: success: type: boolean enum: [false] description: Monitoring confirmation did not complete. error: type: object required: [code, message] properties: code: type: string enum: [DEPOSIT_ADDRESS_NOT_WATCHED] description: Allocation may have completed, but monitoring was not confirmed. message: type: string description: Explanation of the pending monitoring result. data: type: object required: [deposit_addresses] properties: deposit_addresses: type: array description: Saved addresses returned by the allocation. An empty array does not prove no allocation occurred. items: $ref: '#/components/schemas/PartnerDepositAddress' KycDocumentType: type: string description: >- Complete set of document types accepted by the partner KYC upload endpoint. `document_type` only selects the upload slot (front/back/selfie); it is not a document-category and does not set the country — our verification system detects the document type from the image, and the country comes from the customer's KYC profile. Values named after a country (`ghana_card`, `ghana_ssnit_card`, `kenya_alien_card`, `green_book`, `colombia_ppt`) are country-specific hints; all others (`passport`, `national_id`, `driver_license`, `voter_id`, `resident_card`, `id_card`, `tax_id`, `identity_front`/`identity_back`, `selfie`) are general — any country. Nigeria's NIN is submitted as `national_id`. enum: [identity_front, identity_back, selfie, passport, passport_front, national_id, national_id_front, national_id_back, driver_license, driver_license_front, driver_license_back, voter_id, voter_id_front, voter_id_back, resident_card, resident_card_front, resident_card_back, id_card, id_card_front, id_card_back, ghana_card, ghana_card_front, ghana_card_back, ghana_ssnit_card, ghana_ssnit_card_front, ghana_ssnit_card_back, kenya_alien_card, kenya_alien_card_front, kenya_alien_card_back, green_book, green_book_front, green_book_back, tax_id, tax_id_front, tax_id_back, colombia_ppt, colombia_ppt_front, colombia_ppt_back] example: identity_front APIResponse: type: object required: - success properties: success: type: boolean description: Indicates if the request was successful example: true data: description: Response data (structure varies by endpoint) or error information if success is false ErrorResponse: type: object required: - success - data properties: success: type: boolean example: false data: type: object required: - error_key properties: error_key: type: string description: Standardized error key for client error handling example: "required_fields_missing" CryptoCurrencyCapability: type: object properties: code: type: string description: Cryptocurrency code. Unigox settles in stablecoins only — today USDC, USDT and USDT0. example: USDC name: type: string description: Cryptocurrency name example: USD Coin contract: type: string description: | Token contract address on this blockchain. Within `/supported/blockchains` this is always the address on the enclosing chain. Within `/supported/crypto-currencies`, where one entry aggregates every chain, it is the address on the FIRST chain listed in `blockchains` — use `/supported/blockchains` when you need a specific chain's address. example: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" decimals: type: integer format: int64 description: Token decimals (number of decimal places) example: 6 blockchains: type: array items: type: string description: | Blockchain slugs this token is available on. Slugs are the same values returned in `BlockchainCapability.slug` — note they are fully qualified (`ethereum-mainnet`, `base-mainnet`, `arbitrum-one`), not bare chain names. example: ["base-mainnet", "ethereum-mainnet", "polygon"] CryptoCurrenciesResponse: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: array items: $ref: '#/components/schemas/CryptoCurrencyCapability' BlockchainCapability: type: object properties: name: type: string description: Blockchain name example: Ethereum Mainnet slug: type: string description: Blockchain slug identifier. Match on this, not on `name`. example: ethereum-mainnet ticker: type: string description: | Blockchain ticker symbol. Empty for chains that have no ticker mapping yet, so treat it as optional and key your own logic off `slug`. example: eth crypto_currencies: type: array items: $ref: '#/components/schemas/CryptoCurrencyCapability' description: List of cryptocurrencies supported on this blockchain BlockchainsResponse: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: array items: $ref: '#/components/schemas/BlockchainCapability' FiatCurrencyCapability: type: object properties: code: type: string description: Fiat currency code (ISO 4217) example: USD name: type: string description: Fiat currency name example: United States Dollar institution_id: type: array items: type: string description: List of payment method slugs that support this currency (retrieved from active payment method options) example: ["wise", "revolut", "bank-transfer"] countries: type: array items: type: string description: List of ISO 2-letter country codes where this currency is supported (retrieved from active payment method options) example: ["US", "GB", "EU"] onramp: type: boolean description: | Whether onramp (fiat to crypto) is supported. Currently set to true if there are any active payment method options for this currency. This will be refined in future updates based on trade types and explicit direction configuration. example: true offramp: type: boolean description: | Whether offramp (crypto to fiat) is supported. Currently set to true if there are any active payment method options for this currency. This will be refined in future updates based on trade types and explicit direction configuration. example: true FiatCurrenciesResponse: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: array items: $ref: '#/components/schemas/FiatCurrencyCapability' CorridorRateQuote: type: object description: | One partner-type variant of a corridor rate (P2P or Licensed). properties: rate: type: number format: double nullable: true description: All-in fiat-per-USDT rate (platform fee already applied). example: 1542.6 min_notional_fiat: type: number format: double nullable: true description: Smallest amount accepted by any active offer in this variant, in the corridor's local currency. Set only when it exceeds the reference notional in dollar terms — i.e. the customer would need to size up to use this variant. example: 3465 CorridorDirectionInfo: type: object description: | Per-direction info for one fiat corridor. The whole object is omitted when no active offer exists in that direction. Either `p2p` or `licensed` (or both) will be present. properties: supported: type: boolean description: Always `true` when the object is present (the object is omitted otherwise). Reserved for future states where a corridor may be configured but temporarily without liquidity. example: true p2p: $ref: '#/components/schemas/CorridorRateQuote' licensed: $ref: '#/components/schemas/CorridorRateQuote' Corridor: type: object properties: code: type: string example: NGN name: type: string example: Nigerian Naira mid_market_rate: type: number format: double nullable: true description: Open Exchange Rates reference rate (fiat per USDT) for this currency. Same value applies to both directions. example: 1358.97 mid_market_updated_at: type: string format: date-time nullable: true example: '2026-04-27T15:56:11Z' unigox_fee_pct: type: number format: double nullable: true description: Cheapest active Unigox platform fee for this corridor, in percent. Already baked into every `rate` below. example: 0.25 onramp: $ref: '#/components/schemas/CorridorDirectionInfo' offramp: $ref: '#/components/schemas/CorridorDirectionInfo' SupportedCorridorsPayload: type: object properties: notional_usdt: type: number format: double example: 500 generated_at: type: string format: date-time example: '2026-04-27T15:56:11Z' currencies: type: array items: $ref: '#/components/schemas/Corridor' SupportedCorridorsResponse: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/SupportedCorridorsPayload' PaymentField: type: object properties: key: type: string description: Field identifier/key example: vpa label: type: string description: Human-readable field label example: UPI ID type: type: string description: Field input type (text, number, select, etc.) example: text required: type: boolean description: Whether this field is required example: true pattern: type: string description: Regex pattern for validation (optional) example: "^[\\w.-]+@[\\w.-]+$" placeholder: type: string description: Placeholder text for input (optional) example: "username@upi" lookup: type: boolean description: Whether field can be used for lookup (optional) example: true options: type: array description: Options for select fields (optional) items: type: object properties: code: type: string example: CBU name: type: string example: "CBU (Traditional Bank)" Rails: type: object properties: slug: type: string description: Payment rail slug identifier example: upi-india name: type: string description: Payment rail name example: UPI India institution_required: type: boolean description: Whether institution (bank) selection is required by the rail itself. In the current partner API, omission of `institution_id` is explicitly supported for `iban-sepa`, `nip-nigeria`, and `imps-neft-india` (which returns `false` and is routed by `ifsc_code` instead). example: false institution_lookup_key: type: string nullable: true description: Lookup key for institution search, e.g., ifsc or sort_code example: ifsc currencies: type: array items: type: string description: List of supported fiat currency codes example: ["INR"] settlement: type: object nullable: true description: Settlement information properties: speed: type: string enum: [INSTANT, SAME_DAY, NEXT_DAY, STANDARD] description: Settlement speed example: INSTANT typical_minutes: type: integer description: Typical settlement time in minutes example: 2 note: type: string nullable: true description: Optional note about settlement limits: type: object nullable: true description: Transaction limits properties: min_amount: type: number nullable: true description: Minimum transaction amount max_amount: type: number nullable: true description: Maximum transaction amount (null = no limit) max_per_transaction: type: number nullable: true description: Maximum per transaction (null = no limit) fields: type: array items: $ref: '#/components/schemas/PaymentField' description: > Required fields for payment details input. For a multi-format rail (see `formats`) this is a single best-effort field set kept for backward compatibility; the authoritative, institution-specific fields are in `formats`. formats: type: array description: > Present only when a rail accepts more than one field-set (e.g. GHIPSS and EthSwitch accept a mobile-money format keyed on `phone_number` and a bank format keyed on `account_number`). The required field set depends on the chosen institution's type, so pick an institution from `/api/v1/supported/institutions`, match its `institution_type` to a format via `institution_types`, and submit that format's `fields`. items: $ref: '#/components/schemas/RailFormat' RailFormat: type: object properties: id: type: string description: Format identifier example: mobile-money name: type: string description: Human-readable format name example: Mobile Money institution_types: type: array items: type: string description: Institution types this format applies to. Match the chosen institution's type to select the format. example: ["mobile-money", "mobile-wallets"] has_liquidity: type: boolean description: > Whether a vendor/provider can currently settle this format in the corridor. Computed only when the query names both `country` and `currency`; omitted otherwise, and when liquidity could not be determined (treat as unknown, not "no"). This reflects configured liquidity; live availability is confirmed at quote time. example: true beneficiary_type: type: string enum: [individual, business] description: > Present only for rails that distinguish an individual vs a business beneficiary. A `business` format shares its individual sibling's `institution_types` but collects a company's details. To use it, submit this format's `fields` AND set `"beneficiary_type": "business"` inside the create-payment-details `details` object. Omitting `"beneficiary_type"` in the request details defaults to the individual variant. A recipient destination is different: there the recipient's `recipient_kind` selects the format and any `beneficiary_type` you send is replaced by it. example: business fields: type: array items: $ref: '#/components/schemas/PaymentField' description: Required fields for payment details input when paying out to an institution of this format's type. PaymentRailsResponse: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: object required: - country - direction - rails properties: country: type: string description: Country code used in the query example: NG currency: type: string description: Currency code (from query parameter or first rail) example: NGN direction: type: string enum: [onramp, offramp] description: Transaction direction example: offramp rails: type: array items: $ref: '#/components/schemas/Rails' description: List of available payment rails links: type: object additionalProperties: type: string description: Related API endpoints example: search_institutions: "/api/v1/supported/institutions" InstitutionBranch: type: object nullable: true properties: code: type: string description: Branch code (e.g., IFSC, sort code) example: HDFC0001234 name: type: string description: Branch name example: Mumbai Main Branch address: type: string description: Branch address example: "123 Financial Street, Mumbai 400001" Institution: type: object properties: id: type: string description: Institution identifier (slug) — pass this as `institution_id` when creating payment details example: hdfc-bank payment_method_id: type: integer format: int64 description: >- Numeric payment method id. Retail clients submit this (with `payment_network_id`) when saving a payment detail or creating a trade. Omitted for the `imps-neft-india` directory, which has no `payment_methods` rows. example: 396 payment_network_id: type: integer format: int64 description: >- Numeric id of the queried rail (the `rail` query parameter), submitted alongside `payment_method_id`. Omitted for the `imps-neft-india` directory. example: 3 name: type: string description: Institution name example: HDFC Bank type: type: string description: Broad institution category (e.g., BANK, WALLET) example: BANK institution_type: type: string description: >- Fine-grained institution type slug (e.g. `mobile-money`, `mobile-wallets`, `traditional-banks`, `digital-banks`). On a multi-format rail, match this to the rail's `formats[].institution_types` to select the right field set. example: mobile-wallets code: type: string description: >- Corridor-specific institution code: the 4-letter IFSC bank prefix for `imps-neft-india`, the NIBSS code for `nip-nigeria`, the reference BIC for `iban-sepa`, etc. Omitted when the institution has no code. For SEPA the BIC is a reference identifier and may not be unique per institution — do not rely on it as a routing BIC. example: HDFC branch: $ref: '#/components/schemas/InstitutionBranch' supported_rails: type: array items: type: string description: List of payment rail slugs this institution supports example: ["imps-neft-india"] Pagination: type: object properties: total: type: integer description: Total number of items example: 1 limit: type: integer description: Items per page example: 20 offset: type: integer description: Current offset example: 0 InstitutionsResponse: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: object required: - institutions - pagination properties: institutions: type: array items: $ref: '#/components/schemas/Institution' pagination: $ref: '#/components/schemas/Pagination' SupportedPair: type: object properties: crypto_currency_code: type: string description: Cryptocurrency code (e.g., USDC, BTC) example: USDC fiat_currency_code: type: string description: Fiat currency code (e.g., USD, EUR) example: USD type: type: string enum: [BUY, SELL] description: Trading pair type - BUY (fiat to crypto) or SELL (crypto to fiat) example: BUY SupportedPairsResponse: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: array items: $ref: '#/components/schemas/SupportedPair' CreateUserResponse: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: object properties: user_uuid: type: string format: uuid description: | Public UUID of the user. **Use this value in every subsequent call** — it is the `{user_uuid}` in `/partner/users/{user_uuid}/…`. example: "550e8400-e29b-41d4-a716-446655440000" id: type: string format: uuid description: | The same value as `user_uuid`, kept for integrations written before that name existed. Either can be read; they never differ. example: "550e8400-e29b-41d4-a716-446655440000" email: type: string format: email example: user@example.com kyc_status: type: string enum: [NOT_INITIATED, IN_PROGRESS, UNDER_REVIEW, VERIFIED, VERIFICATION_REJECTED] example: NOT_INITIATED wallet_type: $ref: '#/components/schemas/WalletType' wallet: $ref: '#/components/schemas/CustomerWalletSummary' created_at: type: string format: date-time example: "2026-01-06T14:30:00Z" GetUserResponse: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: object properties: user_uuid: type: string format: uuid description: Public UUID of the user. Use this value in all subsequent API calls. example: "550e8400-e29b-41d4-a716-446655440000" email: type: string format: email example: user@example.com wallet_type: $ref: '#/components/schemas/WalletType' wallet: $ref: '#/components/schemas/CustomerWalletSummary' created_at: type: string format: date-time example: "2026-01-06T14:30:00Z" kyc: type: object properties: status: type: string enum: [NOT_INITIATED, IN_PROGRESS, UNDER_REVIEW, VERIFIED, VERIFICATION_REJECTED] description: | Current partner-facing KYC status. `UNDER_REVIEW` means the customer is under manual compliance review — not yet cleared, and unlike `IN_PROGRESS` (automated, usually a couple of minutes) it can take up to 24 hours. The internal review state name is never exposed. example: IN_PROGRESS kyc_method: type: string enum: [direct_data, external_token, handoff] description: KYC submission method used example: direct_data first_name: type: string description: User's first name from KYC data example: John last_name: type: string description: User's last name from KYC data example: Doe country_code: type: string description: User's country code (ISO 2-letter) from KYC data example: NG rejection_reasons: type: array description: Reasons from this partner customer's rejected verification session. Empty when not rejected or no reason is available. Also included as data.rejection_reasons by the verification-status endpoint; legacy provider_messages is retained there. items: type: string example: ["Document back not detected in the document image"] rejection_reason: type: string nullable: true description: Reason for KYC rejection (if status is VERIFICATION_REJECTED) example: "Document verification was not approved" updated_at: type: string format: date-time description: Last update timestamp for KYC status example: "2026-01-06T14:30:00Z" fiat_account_issuance: type: object description: | Whether a fiat account can be opened for this customer, and what the bank is still short of if not. It lives here because there is no second identity to register for an account: the gaps are gaps in this customer's KYC record. properties: ready: type: boolean description: True when `POST /api/v1/partner/fiat-accounts` will be accepted for this customer. example: false missing_fields: type: array items: { type: string } description: | The fields the bank needs that the KYC record does not have, in the names `PATCH /api/v1/partner/users/{user_uuid}/kyc` takes: `address`, `city`, `postal_code`, `dob`, `id_number`, `id_type`. example: ["address", "postal_code"] payment_profiles: type: array items: type: object properties: id: type: string example: "987" rail: type: string example: nip-nigeria currency: type: string example: NGN institution_name: type: string nullable: true example: Guaranty Trust Bank institution_id: type: string nullable: true description: Institution identifier (our internal slug) example: guaranty-trust-bank details: type: object additionalProperties: true example: account_number: "0123456789" KYCSubmitDirectData: type: object required: [method, data] properties: method: type: string enum: [direct_data] example: direct_data data: type: object required: [pii] properties: pii: type: object required: [first_name, last_name, country_code] properties: first_name: type: string example: John last_name: type: string example: Doe country_code: type: string example: NG dob: type: string format: date description: >- Date of birth (YYYY-MM-DD). Optional, but when provided it must be a real date in the past and indicate an age of at least 18. A future, malformed, or under-18 date is rejected with HTTP 400 (see error responses below). example: "1990-01-01" middle_name: type: string example: Michael phone_number: type: string description: E.164 format example: "+2348012345678" id_number: type: string description: >- Government identity/registry number. Enables the **NIN/BVN + selfie** verification option: instead of uploading an ID-document image, the customer proves identity with this number plus a live selfie (no ID photo). AiPrise validates the number against the national registry (NIN->NIMC, BVN->NIBSS) and face-matches the selfie against the registry photo. After this submission, upload only a `selfie` (document_type=selfie) to the documents endpoint - verification starts automatically. Supported for the registry number types listed under `id_type`, in the countries those registries cover. example: "12345678901" id_type: type: string description: >- Registry type for `id_number`. For the NIN/BVN + selfie option it must be one of the listed registry types (image-only IDs such as passport/driver licence are NOT accepted - those use the ID-image flow). An unsupported/missing value returns `400 { "error_key": "invalid_identity_number_type" }`. enum: [NIN, NIN_SLIP, BVN, NATIONAL_ID, VOTER_ID, TAX_ID, KENYA_KRA_PIN] example: NIN address: type: string description: Street address example: "Svitrigailos g 29" city: type: string description: City. Required for EUR/AUD/GBP offramp (auto-populates into payment details). example: "Vilnius" postal_code: type: string example: "03229" KYCSubmitExternalToken: type: object required: [method, data] properties: method: type: string enum: [external_token] example: external_token data: type: object required: [provider] description: | Provider-specific fields: - SumSub: requires `token` (SumSub share token) - Persona: requires `inquiry_id` (Persona inquiry ID, e.g. inq_xxx) properties: provider: type: string enum: [sumsub, persona] description: KYC provider name example: persona token: type: string description: SumSub share token (required when provider=sumsub) example: "sumsub_external_session_id" inquiry_id: type: string description: Persona inquiry ID (required when provider=persona). This is the inq_xxx identifier returned by Persona when the inquiry was created. example: "inq_CWQzc5afzD4dmF66EJqjdPC2T79C" KYCSubmitHandoff: type: object required: [method, data] properties: method: type: string enum: [handoff] example: handoff data: type: object properties: pii: type: object properties: first_name: type: string example: John last_name: type: string example: Doe country_code: type: string example: NG KYCSubmitResponse: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: object properties: kyc_status: type: string enum: [NOT_INITIATED, IN_PROGRESS, UNDER_REVIEW, VERIFIED, VERIFICATION_REJECTED] description: | A submission may asynchronously move to `UNDER_REVIEW` (manual compliance review, up to 24 hours) via the status endpoint and the `user.kyc.updated` webhook — distinct from `IN_PROGRESS` (automated, usually a couple of minutes). Treat both as not cleared. example: IN_PROGRESS message: type: string example: "PII data accepted" verification_url: type: string format: uri nullable: true description: Verification URL (only returned for handoff method) example: "https://verify.example.com/session/4fd410c9-ba9b-46cf-a4f0-132204a9a564" VerificationStatusResponse: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: object properties: status: type: string enum: [NOT_INITIATED, PENDING_DOCUMENTS, IN_PROGRESS, UNDER_REVIEW, VERIFIED, FAILED, VERIFICATION_REJECTED] description: | Current verification status. - `NOT_INITIATED` — no verification started - `PENDING_DOCUMENTS` — awaiting customer document submission - `IN_PROGRESS` — automated verification underway (usually a couple of minutes); treat as not cleared yet - `UNDER_REVIEW` — under manual compliance review; the customer is being reviewed by our team and is NOT yet cleared. Unlike `IN_PROGRESS` (automated, usually a couple of minutes), this can take up to 24 hours. Keep polling; treat as not cleared. - `VERIFIED` — approved - `FAILED` — terminal error - `VERIFICATION_REJECTED` — completed with rejection example: "IN_PROGRESS" verification_url: type: string format: uri nullable: true description: Verification URL (for handoff method) example: "https://verify.example.com/session/abc123" verification_seconds_left: type: integer nullable: true description: Seconds remaining for verification session (if applicable) example: 3600 rejection_reasons: type: array description: Reasons for this customer's rejected verification, matching the KYC webhook. Empty for other statuses or when no reason is available. items: type: string example: ["Document back not detected in the document image"] provider_messages: type: array items: type: string nullable: true description: Status messages or rejection reasons example: ["Verification in progress"] CreatePaymentDetailsRequest: description: Conditional request schema for partner payment details. `institution_id` may be omitted for `iban-sepa`, `nip-nigeria`, and `imps-neft-india`. oneOf: - $ref: '#/components/schemas/CreatePaymentDetailsRequestInstitutionOptional' - $ref: '#/components/schemas/CreatePaymentDetailsRequestInstitutionRequired' CreatePaymentDetailsRequestBase: type: object required: [currency, rail, details] properties: currency: type: string description: ISO 3-letter fiat currency code (e.g., INR, EUR, USD) example: INR rail: type: string description: Payment rail identifier (e.g., "upi-india", "iban-sepa", "imps-neft-india") example: iban-sepa details: type: object description: Payment details object with fields specific to the payment network (e.g., account_number, vpa, iban, full_name) additionalProperties: true example: full_name: "John Doe" iban: DE89370400440532013000 country_code: type: string description: Optional ISO 2-letter country code example: DE CreatePaymentDetailsRequestInstitutionOptional: allOf: - $ref: '#/components/schemas/CreatePaymentDetailsRequestBase' - type: object properties: rail: type: string enum: [iban-sepa, nip-nigeria, imps-neft-india] description: Payment rail identifier for rails that support omission of `institution_id` example: iban-sepa institution_id: type: string description: | Optional for `iban-sepa`, `nip-nigeria`, and `imps-neft-india`. For `iban-sepa`/`nip-nigeria`, if omitted the backend assigns the generic `other-bank` payment method automatically. For `imps-neft-india` it is ignored entirely (resolves to the generic `imps-or-neft-transfer` method); the bank is taken from `details.bank_name` + `details.ifsc_code`. example: other-bank CreatePaymentDetailsRequestInstitutionRequired: allOf: - $ref: '#/components/schemas/CreatePaymentDetailsRequestBase' - type: object required: [institution_id] properties: rail: type: string description: Payment rail identifier for rails that require institution selection not: enum: [iban-sepa, nip-nigeria, imps-neft-india] example: cvu-cbu institution_id: type: string description: | Institution (payment method) identifier - our internal slug (e.g., "wise", "hdfc-bank", "revolut", "uala", "banco-santander-argentina"). Required for all rails except `iban-sepa`, `nip-nigeria`, and `imps-neft-india`. If omitted for any other rail, the API returns a validation error. For rails with multiple formats (e.g., CVU/CBU), the format is automatically determined based on the payment method type of this institution. example: wise PaymentProfile: type: object properties: payment_details_id: type: string description: Payment details ID. Use this value in offramp/onramp quote requests. example: "987" rail: type: string description: Payment rail identifier example: nip-nigeria currency: type: string description: Fiat currency code example: NGN institution_name: type: string nullable: true description: Institution (bank) name if applicable example: Guaranty Trust Bank institution_id: type: string nullable: true description: Institution identifier (our internal slug) example: guaranty-trust-bank details: type: object description: Payment details (account number, VPA, IBAN, etc.) additionalProperties: true example: account_number: "0123456789" CreatePaymentDetailsResponse: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PaymentProfile' GetPaymentDetailResponse: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: $ref: '#/components/schemas/PaymentProfile' GetPaymentDetailsResponse: allOf: - $ref: '#/components/schemas/APIResponse' - type: object properties: data: type: array items: $ref: '#/components/schemas/PaymentProfile' description: List of all payment profiles for the user # ============================================ # Off-Ramp & Order Schemas # ============================================ SlippageTolerance: type: object properties: type: type: string enum: [percent, amount, fiat] description: | Tolerance type: - `percent` — percentage of the quoted rate (e.g., 1.5 = 1.5%) - `amount` — absolute fiat amount (e.g., 50.00 = 50 NGN) - `fiat` — alias of `amount` example: percent value: type: number format: double description: Tolerance value (percentage or fiat amount depending on type) example: 1.5 LiquidityPair: type: object required: - crypto_currency_code - fiat_currency_code - trade_type - min_amount - max_amount - min_amount_usd - max_amount_usd - payment_methods properties: crypto_currency_code: type: string description: Cryptocurrency code (e.g. USDC, BTC) example: USDC fiat_currency_code: type: string description: Fiat currency code (ISO 4217) example: EUR trade_type: type: string enum: [BUY, SELL] description: | Partner-facing trade direction. `SELL` — partner sells crypto and receives fiat (off-ramp). `BUY` — partner buys crypto by sending fiat (on-ramp). example: SELL min_amount: type: number format: double description: Minimum fiat amount accepted across all eligible offers, in the pair's native fiat currency example: 50.00 max_amount: type: number format: double description: Maximum fiat amount accepted across all eligible offers, in the pair's native fiat currency example: 10000.00 min_amount_usd: type: number format: double description: Minimum fiat amount converted to USD example: 54.35 max_amount_usd: type: number format: double description: Maximum fiat amount converted to USD example: 10870.00 payment_methods: type: array items: type: string description: Deduplicated, alphabetically sorted list of payment method slugs available for this pair example: - sepa - wise PartnerPriceEstimateRequest: type: object required: [crypto_currency, fiat_currency] oneOf: - required: [crypto_amount] - required: [fiat_amount] properties: crypto_currency: type: string description: Cryptocurrency code (e.g., USDT, USDC) example: USDT fiat_currency: type: string description: Target fiat currency code (e.g., NGN, USD, EUR) example: NGN crypto_amount: type: string description: Crypto amount to estimate from. Provide exactly one of crypto_amount or fiat_amount. example: "100.00" fiat_amount: type: string description: Fiat amount to estimate from. Provide exactly one of crypto_amount or fiat_amount. example: "150000.00" payment_method_slug: type: string description: Optional payment method slug filter to narrow routing example: access-bank payment_network_slug: type: string description: Optional payment network slug filter to narrow routing example: nibss provider_scope: type: string description: Optional provider scope filter; defaults to all enum: [all, licensed_only, p2p_only] example: all country_code: type: string description: Optional ISO country code (alpha-2) used for fee/routing context example: NG partner_fee_pct: type: string pattern: '^[0-9]+(\.[0-9]+)?$' description: | Optional per-order markup you charge your end user, applied on the same crypto base as the platform fee (non-compounding). Percent units: `1` means 1%. Omitting the field from this request payload — or sending `0` — means no markup; the markup cannot be negative. Fiat-anchored offramp orders have no cap — the deposit grows to cover the markup. Every other case hits a formula domain bound, not a business cap: onramp rejects `partner_fee_pct >= 100` (the withheld or grossed-up fee would consume the entire buyer amount, leaving nothing delivered); crypto-anchored offramp rejects it when the fee would consume the entire pinned deposit. Note: you send this value as a JSON **string**, but it round-trips as a JSON **number** in `fee_breakdown.partner_fee_pct` and in the webhook `data.partner_fee_pct` field — don't parse those as strings. **Rejection reference:** | Rejection | `error.code` | HTTP status | |---|---|---| | `partner_fee_pct` is non-numeric, negative, `NaN`, or `Inf` | `INVALID_REQUEST` | 400 | | Onramp: fee would consume the entire buyer amount (`partner_fee_pct >= 100`) | `INVALID_REQUEST` | 400 | | Crypto-anchored offramp: fee would consume the entire pinned deposit | `INVALID_REQUEST` | 400 | | Fiat-anchored offramp: the computed fee is not a finite amount | `INVALID_REQUEST` | 400 | | Crypto-anchored offramp: the carved fee-exclusive gross falls outside the matched offer's min/max | `NO_OFFERS_AVAILABLE` | 409 | default: "0" example: "1" recipient_payout: type: boolean default: false description: >- Off-ramp estimate only; the on-ramp estimate ignores it. `true` prices only on the licensed partners a third-party (recipient) payout can be matched to, so the estimate describes a payout to a recipient. It can only narrow the offers priced; the estimate still reserves nothing. example: true exclude_delayed_settlement: type: boolean default: false description: >- Off-ramp estimate only; the on-ramp estimate ignores it. `true` leaves delayed settlement (T+1) offers out of the price, so when no instant offer covers the amount the estimate answers `409 NO_OFFERS_AVAILABLE`. It changes this estimate only, not what a quote or an order matches. example: false recipient_id: type: string format: uuid description: >- Off-ramp estimate only. With `recipient_destination_id`, prices a payout to that destination of your recipient: on its own payment method, rail and country, as the quote prices it, so a fee a licensed partner charges for that bank is included. Give both or neither; naming them implies `recipient_payout`. Needs your API key. Errors: `400 INVALID_REQUEST` when only one is given, an id is not a UUID, the destination's currency is not `fiat_currency`, or `payment_method_slug`, `payment_network_slug` or `country_code` differ from the destination's (omit them); `401 UNAUTHORIZED` without a key, or with one that does not authenticate (see the operation's authentication); `404 RECIPIENT_NOT_FOUND` when the recipient or the destination is not yours; `422 THIRD_PARTY_CONTEXT_INVALID` when the destination is not active. The estimate reads the destination and binds nothing. example: 3f0c2b9a-6d1e-4f7a-9b2c-0e1d2c3b4a59 recipient_destination_id: type: string format: uuid description: >- Off-ramp estimate only. The destination of `recipient_id` the payout would go to; see `recipient_id`. example: 8a7b6c5d-4e3f-4a1b-8c9d-0e1f2a3b4c5d ExactPaymentMethodMatchingOffer: type: object description: >- One route in the same crypto/fiat/network context that is reachable **only** by exact payment-method matching — a counterparty on this exact method, rather than anyone on the network. Quote with `payment_method_slug` and `payment_network_slug` set to these values to reach it. properties: payment_method_slug: type: string example: access-bank payment_method_name: type: string example: "Access Bank" payment_network_slug: type: string example: nibss payment_network_name: type: string example: "NIBSS Nigeria" country_code: type: string description: Omitted when the route was resolved without a country scope. example: NG country_name: type: string description: Omitted with `country_code`. example: Nigeria PartnerPriceEstimateResponse: type: object properties: rate: type: string description: Indicative crypto-to-fiat exchange rate example: "1530.12" crypto_amount: type: string description: | Estimated total crypto amount — the fee-exclusive gross: the user's amount plus the platform fee. Partner-fee-exclusive, except for a crypto-anchored onramp estimate (request declares `crypto_amount`): there the amount is sized up so the delivered amount stays exact after the partner fee is withheld, so this field includes the markup. A crypto-anchored offramp estimate carves both fees out of the pinned deposit instead, so this field and `fee_breakdown.platform_fee` both shrink relative to a no-markup request, even though the markup itself stays out of this field. Every other case is unaffected — the markup is reported separately in `fee_breakdown.partner_fee`. On-ramp: the end user would receive `crypto_amount − fee_breakdown.platform_fee − fee_breakdown.partner_fee` for a fiat-anchored estimate, or exactly this `crypto_amount` for a crypto-anchored estimate. Off-ramp: the amount you would actually fund at initiation is `crypto_amount + fee_breakdown.partner_fee`. example: "101.50" fiat_amount: type: string description: Estimated fiat amount example: "152880.00" fee_breakdown: $ref: '#/components/schemas/FeeBreakdown' payment_method_slug: type: string description: Matched payment method slug used for estimate example: access-bank payment_network_slug: type: string description: Matched payment network slug used for estimate example: nibss provider_scope: type: string description: Applied provider scope example: all is_indicative: type: boolean description: True when response is an estimate and not a reserving quote example: true matching_type: type: string enum: [network, exact_payment_method] description: >- How the priced offer matched. `network` — standard payment-network matching. `exact_payment_method` — the offer only matches a counterparty on one of the listed exact payment methods. Omitted when no offer was matched. example: network network_matching_available: type: boolean description: >- `true` when `matching_type` is `network`. `false` means this price is reachable only through exact payment-method matching. example: true exact_payment_method_matching_offers: type: array description: >- Routes in the same context that only exact payment-method matching can reach — the alternatives to the one this estimate priced. Omitted when there are none. It also travels under `error.details` on a `409 NO_OFFERS_AVAILABLE`, which is where it matters most: the refusal names the routes that would have worked. items: $ref: '#/components/schemas/ExactPaymentMethodMatchingOffer' delayed_settlement: type: boolean description: >- Whether pricing at this amount would currently open a **delayed settlement (T+1)** order. Always present. Indicative, like the numbers: the estimate reserves nothing and the quote matches again, so the class can change either way before the quote. Read the class off the quote (`false` there is binding); the order response is final once a licensed partner has accepted the order. Sent with your credentials, the estimate checks whether Unigox has enabled delayed settlement for you and, until it has, prices instant offers only, as your quotes match. Sent without credentials it does not check, and can report `true` for an amount your quote would refuse. example: false settlement_hours: type: integer nullable: true description: >- The expected payout window the order would get, counted from the release: the licensed partner's target for the bank payment, not a guaranteed deadline. Rounded to the nearest whole hour and never below `1`. `null` on an instant estimate. example: 24 source_of_funds_required: type: boolean description: >- Whether the order this price would open needs a source-of-funds review before its release: `true` when the price is on a delayed settlement (T+1) offer and the order's USD equivalent (the fiat amount at the current USD rate, falling back to the crypto amount at the current USD rate) is at or above `source_of_funds_threshold_usd`, or cannot be computed. Always present; `false` on an instant estimate and on every on-ramp estimate. Indicative like the rest of the estimate: the order's own `source_of_funds_required` decides. example: false source_of_funds_threshold_usd: type: number description: >- The source-of-funds threshold in force, in USD. Present only when `delayed_settlement` is `true`; absent on an instant estimate and on every on-ramp estimate. example: 50000 PartnerRecipientDestinationInput: type: object required: [country_code, currency, rail, institution_id, details] properties: country_code: type: string minLength: 2 maxLength: 2 example: CN currency: type: string minLength: 3 maxLength: 3 example: CNY rail: type: string example: cnaps institution_id: type: string description: >- Institution identifier returned by the supported-institutions endpoint. Required on every rail, including the wallet rails that report `institution_required: false`: send `alipay` on `alipay-wallet` and `wechat-pay` on `wechat-wallet`. example: china-construction-bank details: type: object additionalProperties: true description: >- Rail-specific fields validated using the selected payment network configuration: the `fields` of the format `/api/v1/supported/payment-rails` advertises for this institution's type. On a rail with a business format, the recipient's `recipient_kind` selects the individual or business format; `beneficiary_type` sent here is replaced by it. PartnerCreateRecipientRequest: type: object required: - recipient_name - recipient_country properties: recipient_kind: type: string enum: [individual, business] default: individual recipient_name: type: string recipient_native_name: type: string recipient_country: type: string minLength: 2 maxLength: 2 example: CN recipient_id_type: type: string example: national_id recipient_id_number: type: string writeOnly: true recipient_business_registration_number: type: string writeOnly: true PartnerUpdateRecipientRequest: type: object minProperties: 1 properties: recipient_name: { type: string } recipient_native_name: { type: string } recipient_country: { type: string, minLength: 2, maxLength: 2 } recipient_id_type: { type: string } recipient_id_number: { type: string, writeOnly: true } recipient_business_registration_number: { type: string, writeOnly: true } PartnerRecipient: type: object required: [id, kind, recipient_name, recipient_country, lifecycle, version, screening_status, created_at] properties: id: { type: string, format: uuid } kind: { type: string, enum: [individual, business] } recipient_name: { type: string } recipient_native_name: { type: string, nullable: true } recipient_country: { type: string } recipient_id_type: { type: string, nullable: true } recipient_id_number: type: string nullable: true description: Masked partner-visible identity value; full value is never returned. recipient_business_registration_number: type: string nullable: true description: Masked when returned. lifecycle: { type: string, enum: [draft, active, archived] } version: { type: integer, minimum: 1 } screening_status: type: string enum: [pending, cleared, hit, manual_review] screened_at: { type: string, format: date-time, nullable: true } created_at: { type: string, format: date-time } PartnerRecipientDestination: type: object required: - id - recipient_id - payment_method_id - payment_network_id - country_code - currency - version - lifecycle - created_at properties: id: { type: string, format: uuid } recipient_id: { type: string, format: uuid } payment_method_id: { type: integer, format: int64 } payment_network_id: { type: integer, format: int64 } country_code: type: string minLength: 2 maxLength: 2 currency: { type: string } details: type: object additionalProperties: true description: >- The rail's own fields, as submitted. On reads, values that identify an account or a person are masked to last-4 (`account_number`, `bank_account_number`, `iban`, `card_number`, `id_number`, `national_id`, `tax_id`, `mobile_number`, `phone_number`, `msisdn`); everything else — names, `bank_name`, `province`, `branch`, routing codes, `beneficiary_type` — is returned in full so destinations stay distinguishable. version: { type: integer, minimum: 1 } lifecycle: { type: string, enum: [active, archived] } created_at: { type: string, format: date-time } PartnerRecipientContext: type: object required: - sender_id - recipient_id - recipient_destination_id - sender_recipient_relationship - purpose_of_payment - screening_status properties: sender_id: { type: string, format: uuid } recipient_id: { type: string, format: uuid } recipient_destination_id: { type: string, format: uuid } sender_recipient_relationship: { type: string } purpose_of_payment: { type: string } purpose_details: { type: string } screening_status: { type: string } PartnerComplianceCase: type: object required: [case_id, status, risk_decision, requires_review] description: | The compliance record for a third-party payout. In v1 the controls run BEFORE the order is created, so a payout that fails one is rejected with an error rather than returned as a held order — see the error codes in the Third-party payouts guide. properties: case_id: type: string format: uuid description: | Identifier of the compliance record — the payout's `quote_id`, so a partner and a Unigox operator refer to the same record. status: type: string enum: [authorized] description: v1 emits `authorized`; a rejected payout returns an error instead. risk_decision: type: string enum: [allow] description: v1 emits `allow`; a blocking decision surfaces as an error, not a status. requires_review: type: boolean description: Always false in v1. Operator review happens Unigox-side over the same record. PartnerRecipientResponse: type: object required: [recipient] properties: recipient: $ref: '#/components/schemas/PartnerRecipient' recipient_destination: allOf: - $ref: '#/components/schemas/PartnerRecipientDestination' nullable: true PartnerRecipientListResponse: type: object required: [recipients, total, limit, offset] properties: recipients: type: array items: $ref: '#/components/schemas/PartnerRecipient' total: { type: integer, minimum: 0 } limit: { type: integer, minimum: 1 } offset: { type: integer, minimum: 0 } PartnerRecipientDestinationsResponse: type: object required: [recipient_destinations] properties: recipient_destinations: type: array items: $ref: '#/components/schemas/PartnerRecipientDestination' PartnerQuoteRequest: type: object required: [user_uuid, crypto_currency, fiat_currency] allOf: - oneOf: - required: [crypto_amount] - required: [fiat_amount] - oneOf: - required: [payment_details_id] - required: - sender_id - recipient_id - recipient_destination_id - sender_recipient_relationship - purpose_of_payment properties: user_uuid: type: string format: uuid description: Public UUID of the end-user (returned by `POST /partner/users` as `id`) example: "550e8400-e29b-41d4-a716-446655440000" payment_details_id: type: integer format: int64 description: >- Required for a self-payout. MUST be omitted for a third-party payout, which is routed by `recipient_destination_id`. Sending both is rejected with `400 INVALID_REQUEST` — the two modes are mutually exclusive and neither silently wins. example: 987 sender_id: type: string format: uuid description: | Canonical KYC subject who is funding the third-party payout. Required for third-party payout and must equal the real sender represented by `user_uuid`. recipient_id: type: string format: uuid description: Partner-owned recipient returned by `POST /partner/recipients`. recipient_destination_id: type: string format: uuid description: Active destination owned by `recipient_id`; replaces `payment_details_id` for third-party payout. sender_recipient_relationship: type: string minLength: 1 description: Payment-level relationship between the real sender and recipient, for example `supplier` or `family`. example: supplier purpose_of_payment: type: string minLength: 1 description: Canonical payment purpose used for compliance and translated only at the vendor boundary. example: goods_and_services purpose_details: type: string description: Optional invoice or free-text clarification of the payment purpose. example: "Invoice INV-2026-0042" crypto_currency: type: string description: Cryptocurrency code (e.g., USDT, USDC) example: USDT crypto_amount: type: string description: | Amount of crypto to sell (standard units, e.g., "100.00" for 100 USDT). Provide exactly one of `crypto_amount` or `fiat_amount`. When provided, the order is **crypto-anchored** — exact crypto cost is guaranteed, fiat payout varies by rate at settlement. example: "100.00" fiat_amount: type: string description: | Exact fiat amount the recipient will receive (e.g., "500000" for 500,000 NGN). Provide exactly one of `crypto_amount` or `fiat_amount`. When provided, the order is **fiat-anchored** — exact fiat delivery is guaranteed, crypto cost may vary within a 1.20× safety bound. For integer-minor-unit currencies (NGN, UGX, TZS, KES, GHS), must be a whole number. example: "500000" fiat_currency: type: string description: Target fiat currency code (e.g., NGN, USD, EUR) example: NGN rail: type: string description: Optional rail hint; must be compatible with payment details if provided example: Bank Transfer route: type: string description: Optional route hint; must be compatible with payment details if provided example: Instant Transfer provider_scope: type: string description: Optional provider scope filter; defaults to all enum: [all, licensed_only, p2p_only] example: all slippage_tolerance: allOf: - $ref: '#/components/schemas/SlippageTolerance' description: | Optional. Maximum tolerated price movement between `/quote` and `/initiate`, and between `/initiate` and vendor acceptance. When omitted, the default is `percent` / `0` — any rate movement returns `PRICE_CHANGED_REQUOTE` and the partner must request a fresh quote. Set this to opt in to silent execution for small market movements. has_fiat_settlement_notification: type: boolean description: | When `true`, only match liquidity providers that send fiat settlement notifications. Orders from these providers complete automatically when fiat is delivered. When omitted or `false`, all providers are eligible. partner_fee_pct: type: string pattern: '^[0-9]+(\.[0-9]+)?$' description: | Optional per-order markup you charge your end user, applied on the same crypto base as the platform fee (non-compounding). Percent units: `1` means 1%. Omitting the field from this request payload — or sending `0` — means no markup; the markup cannot be negative. Fiat-anchored offramp orders have no cap — the deposit grows to cover the markup. Every other case hits a formula domain bound, not a business cap: onramp rejects `partner_fee_pct >= 100` (the withheld or grossed-up fee would consume the entire buyer amount, leaving nothing delivered); crypto-anchored offramp rejects it when the fee would consume the entire pinned deposit. Note: you send this value as a JSON **string**, but it round-trips as a JSON **number** in `fee_breakdown.partner_fee_pct` and in the webhook `data.partner_fee_pct` field — don't parse those as strings. **Rejection reference:** | Rejection | `error.code` | HTTP status | |---|---|---| | `partner_fee_pct` is non-numeric, negative, `NaN`, or `Inf` | `INVALID_REQUEST` | 400 | | Onramp: fee would consume the entire buyer amount (`partner_fee_pct >= 100`) | `INVALID_REQUEST` | 400 | | Crypto-anchored offramp: fee would consume the entire pinned deposit | `INVALID_REQUEST` | 400 | | Fiat-anchored offramp: the computed fee is not a finite amount | `INVALID_REQUEST` | 400 | | Crypto-anchored offramp: the carved fee-exclusive gross falls outside the matched offer's min/max | `NO_OFFERS_AVAILABLE` | 409 | default: "0" example: "1" PartnerQuoteResponse: type: object properties: quote_id: type: string format: uuid description: Unique quote identifier — use this to initiate the order example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" anchor_type: type: string enum: [crypto, fiat] description: | Indicates which amount is guaranteed at settlement. - `crypto` — `crypto_amount` is exact; `fiat_amount` may vary by the rate at settlement. - `fiat` — `fiat_amount` is exact; `crypto_amount` may vary within a 1.20× safety bound. example: "crypto" rate: type: string description: Crypto-to-fiat exchange rate at quote time example: "1530.12" crypto_amount: type: string description: | Total crypto amount — the fee-exclusive gross: the sell amount plus the platform fee. Partner-fee-exclusive: your markup is reported separately in `fee_breakdown.partner_fee` and is not added here. This is not the total you fund: the amount you actually fund at initiation is `crypto_amount + fee_breakdown.partner_fee` (see the transfer authorization endpoint). example: "101.50" fiat_amount: type: string description: Fiat amount the recipient receives example: "152880.00" fee_breakdown: $ref: '#/components/schemas/FeeBreakdown' payment_details_id: type: integer format: int64 description: Payment details ID used for this quote example: 987 payment_method_id: type: integer format: int64 description: Matched payment method ID example: 5 payment_network_id: type: integer format: int64 description: Matched payment network ID example: 12 matching_type: type: string enum: [network, exact_payment_method] description: >- How the matched offer was reached. `network` — standard payment-network matching. `exact_payment_method` — the offer only matches a counterparty on one of the exact payment methods listed in `exact_payment_method_matching_offers`. Omitted when no offer was matched. example: network network_matching_available: type: boolean description: >- `true` when `matching_type` is `network`. `false` means this quote is reachable only through exact payment-method matching. example: true exact_payment_method_matching_offers: type: array description: >- Routes in the same context that only exact payment-method matching can reach — the alternatives to the one this quote matched. Omitted when there are none. It also travels under `error.details` on a `409 NO_OFFERS_AVAILABLE`, which is where it matters most: the refusal names the routes that would have worked. An absent key means none were found **or** the lookup failed; it is not a promise that no such route exists. items: $ref: '#/components/schemas/ExactPaymentMethodMatchingOffer' expires_at: type: string format: date-time description: >- Quote expiration timestamp: 60 seconds from creation, in UTC (`Z`). Initiate before it, or request a fresh quote. example: "2026-02-01T12:01:00Z" has_fiat_settlement_notification: type: boolean description: | Whether the matched liquidity provider sends fiat settlement notifications. When `true`, the order will complete automatically when fiat is delivered to the recipient. When `false`, you must call `confirm-fiat-received`. You can call `confirm-fiat-received` at any time regardless of this value. example: true recipient_context: type: object allOf: - $ref: '#/components/schemas/PartnerRecipientContext' nullable: true description: Immutable canonical recipient snapshot for a third-party quote; absent for self-payout. delayed_settlement: type: boolean description: | Whether initiating this quote would open a **delayed settlement (T+1)** order: the crypto leaves escrow before the fiat is paid, instead of both legs completing together. Your release signature authorises that move; Unigox then sends the crypto to the licensed partner, and the fiat is expected within `settlement_hours` of that release (a target, not a deadline). **Always present.** No parameter requests it. `provider_scope=licensed_only` leaves T+1 offers out, but it also leaves out every other P2P offer, so use it only if that is what you want. A delayed offer is considered only when no instant offer covers the amount, and only on orders whose crypto you hold — never on a widget order. It is also considered only once Unigox has enabled delayed settlement for you. Delayed settlement is switched on for your account by Unigox on request: tell us once your integration can sign the release (Step 4 of the Delayed settlement (T+1) reference). It is a configuration change on our side, not an automatic consequence of a signature. Until then your orders match instant offers only. The class is kept with the quote. `false` here means the order can never be T+1, whatever happens to the offer in the meantime. `true` means it will be T+1 unless the order ends up on an instant offer before a licensed partner accepts it (instant liquidity appeared by the time you initiate, or the order moved to an instant offer while it waited), in which case the order is instant — the money arrives sooner than quoted. The order response says which, provisionally until a licensed partner accepts the order. example: false settlement_hours: type: integer nullable: true description: | The expected payout window, counted from the release — not from now. It is the licensed partner's target for the bank payment, not a guaranteed deadline: nothing happens automatically when it passes, so present it to your customer as expected timing. Rounded to the nearest whole hour and never below `1`. `null` on an instant quote. example: 24 PartnerInitiateRequest: type: object required: [quote_id] properties: quote_id: type: string format: uuid description: Quote ID from the quote endpoint. Payment details are taken from the quote. example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" reference_id: type: string description: Optional partner-supplied external reference ID (e.g. your internal order ID). Stored on the order and echoed back in responses. example: "your-internal-order-id" PartnerInitiateResponse: type: object properties: order_id: type: string format: uuid description: Unique order identifier for tracking example: "b2c3d4e5-f6a7-8901-bcde-f12345678901" status: $ref: '#/components/schemas/PartnerOrderStatus' quote_id: type: string format: uuid description: Quote ID that was consumed example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" reference_id: type: string nullable: true description: Partner-supplied external reference ID (echoed from initiate request) example: "your-internal-order-id" order_type: type: string enum: [offramp, onramp] description: Direction of the order example: offramp amounts: $ref: '#/components/schemas/PartnerOrderAmounts' fee_breakdown: $ref: '#/components/schemas/FeeBreakdown' timeline: type: array items: $ref: '#/components/schemas/TimelineEntry' created_at: type: string format: date-time example: "2026-02-01T12:00:05Z" recipient_context: allOf: - $ref: '#/components/schemas/PartnerRecipientContext' nullable: true compliance: allOf: - $ref: '#/components/schemas/PartnerComplianceCase' nullable: true description: Durable case in Unigox compliance review for a third-party payout. payout_via_own_account: type: boolean description: | `true` when this off-ramp will be paid through the customer's own fiat account and then on to the bank you named. Omitted otherwise, never `false`. Read `own_account_payout_status` on the order to follow it. example: true PartnerStatsResponse: type: object properties: total_orders: type: integer description: Every order you have, including ones no liquidity provider accepted yet. example: 161 completed_orders: type: integer description: >- Orders whose crypto was released or is being released. A delayed settlement (T+1) order counts only once its payment is recorded paid. example: 54 volume_usd: type: number description: Fiat volume of completed orders, in USD at each order's snapshotted rate. example: 26386.79 earned_usd: type: number description: Your markup captured on completed orders, in USD. example: 131.93 PartnerOrderResponse: type: object properties: order_id: type: string format: uuid description: Unique order identifier example: "b2c3d4e5-f6a7-8901-bcde-f12345678901" status: $ref: '#/components/schemas/PartnerOrderStatus' next_action: type: string description: | The action the partner **must** perform to advance the order. The key is **absent** when no action is required at this stage — the order is waiting for the counterparty or for an automated system step — and is never sent as `null`. Possible values: - `authorize_crypto_transfer` — partner must authorize escrow funding - `confirm_fiat_received` — partner must confirm they received the fiat payment - `request_new_quote` — price changed, partner must request a new quote - `update_kyc_address` — address fields are required for EUR/AUD/GBP payouts; see `action_required` for the endpoint and fields to submit - `authorize_refund` — the order ended without a payout and its crypto is still in escrow; only your signature can send it back. Note that this appears on an order whose `status` is `cancelled`, which is the one case where a terminal status still needs something from you - `deposit_to_user_account` — an on-ramp order with `fiat_funding_source: own_account` is waiting for the customer to transfer the order's fiat amount into the fiat account issued to them. The transfer itself confirms the payment; there is nothing to call. If the money is already on the account, `pay-from-balance` is in `allowed_actions` and pays the order from it - `sign_settlement_consent` — a **delayed settlement (T+1)** order remains at `crypto_received` and nobody has signed the release yet - `submit_source_of_funds` — consent is stored and a required source-of-funds case is incomplete, including an existing case below the current threshold - `await_review` — consent is stored and the order is waiting for Unigox document review, the licensed partner's payment check, or release processing. Do not submit another signature - absent — no required action (waiting for buyer or system). On a funded delayed order awaiting release the key is absent when the order is held for review, or a payout of yours failed and a refund is under way Once consent_deadline_at has passed, these reads no longer request a consent signature, even if the order status has not changed yet. The list (`GET /api/v1/partner/orders`) reads the consent from the order record and can show `await_review`, for up to two minutes, for a consent call that was cut off before your signature was stored. After a timeout, read the single order (`GET /api/v1/partner/orders/{order_id}`) before you decide whether to send the signature again. If a lookup behind the T+1 hint fails, both reads fall back to `sign_settlement_consent`. enum: [authorize_crypto_transfer, confirm_fiat_received, request_new_quote, update_kyc_address, authorize_refund, deposit_to_user_account, sign_settlement_consent, submit_source_of_funds, await_review] example: authorize_crypto_transfer action_required: type: object nullable: true description: | Present when the order needs partner intervention before it can proceed. Contains machine-readable type, human-readable message, the API endpoint to call, and the fields to provide. Null/omitted when no action is needed. required: [type, message] properties: type: type: string description: Machine-readable action identifier example: update_kyc_address message: type: string description: Human-readable explanation of what is needed and why example: "EUR/AUD/GBP bank transfers require the recipient's physical address. Update the user's KYC before the order can proceed." endpoint: type: string description: API endpoint to call to resolve this action example: "PATCH /api/v1/partner/users/{user_uuid}/kyc" fields: type: array description: Fields the partner needs to provide items: type: object required: [field, label] properties: field: type: string description: API field name example: city label: type: string description: Human-readable description of the field example: "City of the recipient" allowed_actions: type: array items: type: string description: | List of API actions the partner **can** perform at the current status. An action may be present here even when `next_action` is absent — meaning it is optional. Notable case: `confirm-fiat-received` appears at both `crypto_received` and `awaiting_fiat_received_confirmation`. At `crypto_received` it is a **fast-track**: if you already know the fiat has arrived via your own systems, you can confirm immediately. Otherwise, wait for the buyer's proof flow to complete — the order will reach `awaiting_fiat_received_confirmation` automatically. Status-to-actions mapping: - `created` → `["cancel"]` - `awaiting_liquidity_provider` → `["cancel"]` - `awaiting_crypto_transfer_authorization` → `["authorize-crypto-transfer", "cancel"]` - `crypto_transfer_authorization_pending` → `[]` (the transfer is in flight; cancel is refused) - `crypto_received` → `["confirm-fiat-received"]` (optional fast-track) - `fiat_payment_started` → `["confirm-fiat-received"]` (optional fast-track after buyer proof submission) - `awaiting_fiat_received_confirmation` → `["confirm-fiat-received"]` (required) - `fiat_received_confirmed`, `crypto_release_pending`, `completed`, `failed` → `[]` - `cancelled` → `[]`, **except** when the order's crypto is still sitting in escrow: then `["authorize-refund"]`. An off-ramp order that stops after funding — expired payment window, declined payment proof, returned bank payment, dispute resolved for the seller — reads as `cancelled` like every other stopped order, and the escrow is a 2-of-3 Safe your key is an owner of. This is the only thing that tells the two apart, so poll it on `cancelled` orders rather than assuming a cancelled order is finished with. `next_action` is `authorize_refund` and `action_required` names the endpoint at the same time. On-ramp orders with `fiat_funding_source: own_account` never offer `confirm-payment-sent`: the transfer into the customer's own account is the confirmation. At `awaiting_fiat_transfer` they offer `["pay-from-balance"]` instead, until the order's fiat has been collected. A `completed` order paid from the balance whose crypto hand-over has not finished also offers `["pay-from-balance"]`: calling it again retries the hand-over and never takes the money twice. On a funded **delayed settlement (T+1)** order awaiting release whose crypto you hold, `confirm-fiat-received` is removed — the endpoint behind it refuses a delayed order — and `["settlement-consent", "cancel"]` take its place. `cancel` is available only while the order awaits release; the endpoint is the ordinary `POST /api/v1/partner/orders/{order_id}/cancel`. Both are withdrawn once the consent is signed, and then answer `409 OPERATION_NOT_ALLOWED`. The list reads the consent from the order record, so a list row can already show them withdrawn, for up to two minutes, for a consent call that was cut off before your signature was stored. After a timeout, read the single order (`GET /api/v1/partner/orders/{order_id}`) before you decide whether to send the signature again. On a funded delayed order awaiting release that is **held** — Unigox holds it for a check, or a payout failed and a refund is under way — `next_action` is omitted and no consent is accepted. `confirm-fiat-received` is absent there too, because that endpoint refuses every delayed order. An `authorize-refund` that is genuinely owed still appears. Custody outranks the mapping above: on a **widget order** — one your customer created through the embedded widget under your `widgetKey` — this is `[]` at every status, because the crypto is the end user's and every action endpoint answers `404 ORDER_NOT_FOUND` for it. example: ["authorize-crypto-transfer", "cancel"] fiat_funding_source: type: string enum: [vendor_details, own_account] description: | On-ramp orders only. Where the fiat for this order is paid: - `vendor_details` — to the vendor's bank account in `vendor_payment_details`; then call `confirm-payment-sent`. - `own_account` — into the fiat account you issued to the customer, named by `fiat_account_id`. There are no `vendor_payment_details` and no `confirm-payment-sent`: the transfer landing on the customer's account is matched to the order by amount and the order proceeds on its own. Read it on every order rather than assuming one or the other. example: own_account fiat_account_id: type: string format: uuid description: | On an `own_account` order: the fiat account the customer transfers into. The same id the Fiat Accounts endpoints take, so the deposit that funds this order can be found on that account's transactions carrying this order's id. On an off-ramp with `payout_via_own_account: true`: the customer's fiat account the money goes through, when it is one you can address by id; omitted otherwise. example: "7c9e6679-7425-40de-944b-e07fc1f90ae7" payout_via_own_account: type: boolean description: | `true` on an off-ramp paid through the customer's own fiat account: the liquidity provider pays the customer's account and Unigox then pays the money on to the bank you named, both in the customer's name. EUR and GBP off-ramps to the customer's own `payment_details` are paid this way wherever customer fiat accounts are active for your partner in that currency; when they cannot be, the quote is refused (`FIAT_ACCOUNT_OPENING`, `FIAT_ACCOUNT_REQUIRED`, `FIAT_ACCOUNTS_NOT_ENABLED`) unless a liquidity provider that pays banks directly takes the order. Omitted on every other order, never `false`. If you do not call `confirm-fiat-received`, the order is confirmed once Unigox has matched the money on the customer's account. That payment into the account does not send `fiat_account.deposit.received`. example: true own_account_payout_status: type: string enum: [awaiting_credit, in_progress, sent_to_bank, under_review, held, left_on_account] description: | Off-ramp paid through the customer's own fiat account only (`payout_via_own_account: true`): where the onward payment, from that account to the bank you named, stands. `status` describes the provider's payment into the customer's account, so an order can be `completed` while this still says the money has not reached the bank. - `awaiting_credit` — nothing has landed on the customer's account for this order yet. - `in_progress` — the money landed; the onward payment is queued, being sent, or being retried. - `sent_to_bank` — the money was sent on to the bank you named. - `under_review` — the onward payment ended without a clear result; Unigox checks it. - `held` — the money is on the customer's account and is not moving on by itself; contact Unigox. - `left_on_account` — Unigox decided the money stays on the customer's account. Omitted on other orders, and when the state cannot be read at that moment. example: sent_to_bank crypto_transfer_authorization_seconds_left: type: integer format: int64 nullable: true description: | Remaining seconds to authorize crypto transfer while order is in `awaiting_crypto_transfer_authorization` / `crypto_transfer_authorization_pending`. `null` for all other statuses. example: 1720 amounts: $ref: '#/components/schemas/PartnerOrderAmounts' fee_breakdown: $ref: '#/components/schemas/FeeBreakdown' timeline: type: array items: $ref: '#/components/schemas/TimelineEntry' description: Chronological list of status changes has_fiat_settlement_notification: type: boolean description: | Whether the matched liquidity provider sends fiat settlement notifications. When `true`, the order will complete automatically when fiat is delivered. When `false`, you must call `confirm-fiat-received`. You can call `confirm-fiat-received` at any time regardless of this value, except on a delayed settlement (T+1) order, which refuses it. `false` on every order no liquidity provider has accepted yet, T+1 included; a T+1 order reads `true` from its acceptance on. example: true created_at: type: string format: date-time example: "2026-02-01T12:00:05Z" updated_at: type: string format: date-time example: "2026-02-01T12:00:06Z" order_type: type: string enum: [offramp, onramp] description: | Order type. Present on every order, including one no liquidity provider has accepted yet. - `offramp` — sell crypto for fiat - `onramp` — buy crypto with fiat example: onramp vendor_payment_details: type: object nullable: true description: | Vendor's payment details for the end-user to send fiat to. Present only for on-ramp orders at `awaiting_fiat_transfer` status and beyond. properties: payment_method_name: type: string example: "Agribank" payment_network_name: type: string example: "Napas Vietnam" details: type: object description: Payment method-specific fields (e.g. account_number, phone) payment_request: type: boolean nullable: true description: | `true` if the vendor uses payment request flow — the partner must call `submit-payer-details` before `confirm-payment-sent`. example: false send_out_tx_hash: type: string nullable: true description: | Destination-chain transaction hash after a send-out completes. Present only for on-ramp orders with `send_out_completed` status. example: "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" payment_deadline_at: type: string format: date-time nullable: true description: | On-ramp only: the moment the order can be cancelled for want of the customer's fiat. Tell the customer to pay before it. The order is cancelled shortly after it (`cancelled`, "Payment window expired"): on your next read of the order, and an `own_account` order within about 20 minutes even if nobody reads it. A transfer that arrives after this moment but before the cancellation may still complete the order; that is possible, not guaranteed. One that arrives after the cancellation stays on the customer's account and can be used with `pay-from-balance` on a new order. Extended along with the window. Set while the order is `awaiting_fiat_transfer`, `null` otherwise — and always `null` on an off-ramp, and on an order held for manual handling (it does not expire). UTC. example: "2026-10-24T09:12:30Z" recipient_context: allOf: - $ref: '#/components/schemas/PartnerRecipientContext' nullable: true description: Immutable third-party recipient context; absent for self-payout and on-ramp. compliance: allOf: - $ref: '#/components/schemas/PartnerComplianceCase' nullable: true description: Current durable compliance-case state for a third-party payout. delayed_settlement: type: boolean description: | Whether this order settles **T+1**: the crypto leaves escrow before the fiat is paid. Your release signature authorises it to leave and Unigox performs the release; the fiat is expected within `settlement_hours` of it (a target, not a deadline). Present on every order, on-ramp included, along with the other T+1 fields below. T+1 timestamps and the window are null on instant orders. The current numeric source-of-funds threshold is still returned. Provisional until a licensed partner accepts the order. While an order quoted T+1 waits for one, it follows the offer the order is currently offered to, so it can change: it reads `false` between offers and on an instant offer. Once such an order stops waiting without being accepted (you cancelled it, or no licensed partner accepted it), it keeps `true`, with `settlement_hours` `null`. Fixed from acceptance. example: false settlement_hours: type: integer nullable: true description: >- The expected payout window, counted from the release — not from the order. It is the licensed partner's target for the bank payment, not a guaranteed deadline: nothing happens automatically when it passes. Rounded to the nearest whole hour and never below `1`. `null` on an instant order. example: 24 consent_deadline_at: type: string format: date-time nullable: true description: | Funding time plus the consent window. After expiry, release is blocked and the expiry process starts the refund flow. Set while awaiting release, `null` otherwise. example: "2026-09-21T11:58:30Z" payout_deadline_at: type: string format: date-time nullable: true description: | Release time plus the expected window; `settlement_hours` is that window rounded to whole hours. When the payment is expected by, not a deadline: the order does not change and no event is sent when it passes. `null` until the crypto has left escrow. example: "2026-09-19T12:07:55Z" delayed_settlement_crypto_sent_to_provider_at: type: string format: date-time nullable: true description: >- The crypto left the licensed partner's wallet for the payout provider. Set at the latest when Unigox authorizes the bank payment. No refund of the crypto is possible while it is set. Cleared when Unigox withdraws a record made by mistake, which it can do only while no payment has been authorized, sent, paid or returned, and when it refunds the crypto after a returned payment. delayed_settlement_fiat_payout_authorized_by_admin_at: type: string format: date-time nullable: true description: >- Unigox authorized the licensed partner to send the bank payment. Never set before `delayed_settlement_crypto_sent_to_provider_at`: the authorization sets that one too when it is still `null`. Cleared by a bank return, and when the payout provider cancels the payment before sending it; Unigox then authorizes a new attempt. delayed_settlement_fiat_payout_submitted_by_provider_at: type: string format: date-time nullable: true description: Submission of the bank payment was recorded; recipient payment is not yet confirmed. delayed_settlement_fiat_paid_to_customer_at: type: string format: date-time nullable: true description: The fiat reached the recipient. This is the real completion of a delayed order. delayed_settlement_fiat_returned_by_bank_at: type: string format: date-time nullable: true description: >- The payout went out and the bank sent it back. Set together with clearing the paid, submitted and authorized marks. Mutually exclusive with `delayed_settlement_fiat_paid_to_customer_at`. A payment the payout provider cancelled before sending it is not a return and does not set it. delayed_settlement_crypto_refunded_to_customer_at: type: string format: date-time nullable: true description: >- The crypto went back to the wallet that funded the escrow (yours, on an order whose crypto you hold) instead of being paid out. Reachable while `delayed_settlement_crypto_sent_to_provider_at` is `null`, or after a returned payment when Unigox gives the payout up; that refund clears `delayed_settlement_crypto_sent_to_provider_at`. source_of_funds_required: type: boolean description: >- Whether review applies by amount or an existing source-of-funds case. Can stay true after approval or completion; use case status and next_action for required action. False for instant orders. Always present. example: true source_of_funds_threshold_usd: type: number description: >- Current configured source-of-funds threshold in USD, not a historical snapshot. Always present, including on instant orders. Current policy is USD 50,000 inclusive. example: 50000 settlement_refund_reason: type: string description: | Why a delayed order ended without a payout. Omitted — not empty — when the order has not ended that way, or when none of the six applies; an absence means no reason was recorded and never stands in for one of them. - `refunded_after_release` — the crypto had been released to the licensed partner and was sent back: before it reached the payout provider, or after a payment came back and Unigox gave the payout up. No payment reached the customer; the order reads `cancelled` - `dossier_rejected` — a reviewer refused the source-of-funds case - `consent_window_expired` — the consent was never signed and the window ran out - `not_released_in_time` — the consent **was** signed and the window still ran out, because Unigox did not release the crypto in time. This one is ours, not the customer's - `cancelled_by_customer` — the order was cancelled on your side before release - `cancelled_by_licensed_partner` — the licensed partner declined the order before the release was signed Read in that order: a refund after the release outranks a refusal, which outranks an expired window, which outranks a cancellation. enum: - refunded_after_release - dossier_rejected - consent_window_expired - not_released_in_time - cancelled_by_customer - cancelled_by_licensed_partner example: not_released_in_time PartnerOrderAmounts: type: object properties: crypto_amount: type: string description: | Total crypto amount (standard units) — the fee-exclusive gross: the buy/sell amount plus the platform fee. Partner-fee-exclusive, except for a crypto-anchored onramp order (originally quoted with `crypto_amount`): there the amount was sized up so the delivered amount stays exact after the partner fee is withheld, so this field includes the markup. A crypto-anchored offramp order carves both fees out of the pinned deposit instead, so this field and `fee_breakdown.platform_fee` both shrink relative to a no-markup request, even though the markup itself stays out of this field. Every other case is unaffected — the markup is reported separately in `fee_breakdown.partner_fee`. On-ramp — what the end user receives: `crypto_amount − fee_breakdown.platform_fee − fee_breakdown.partner_fee` for a fiat-anchored order, or exactly this `crypto_amount` for a crypto-anchored order (both fees are withheld at bridge send-out without changing this field). Off-ramp — what the partner funds at transfer authorization: `crypto_amount + fee_breakdown.partner_fee`. example: "101.50" fiat_amount: type: string description: Fiat amount the user receives example: "152880.00" crypto_currency: type: string description: Cryptocurrency code example: USDT fiat_currency: type: string description: Fiat currency code example: NGN rate: type: string description: Crypto-to-fiat exchange rate example: "1530.12" FeeBreakdown: type: object description: Transparent breakdown of all fee components (amounts in crypto) properties: platform_fee: type: string description: Platform fee in crypto example: "5.43" platform_fee_pct: type: number format: double description: Platform fee as a percentage example: 0.5 partner_fee: type: string description: | Your markup in crypto, computed from the `partner_fee_pct` you declared on the quote/estimate request, on the same base as the platform fee. `0` when no markup was declared. example: "10.87" partner_fee_pct: type: number format: double description: Your markup percentage as declared on the request (`1` means 1%); `0` when none. example: 1 total_fee: type: string description: Total fee in crypto (platform_fee + partner_fee) example: "16.30" fiat_rail_fee: type: string description: | What the payout rail itself charges, in the order's **fiat** currency — every field above is in crypto. It is the gap between `rate × crypto_amount` and the money that actually moves on the bank or wallet rail, and it is already reflected in `fiat_amount`. Deliberately **not** summed into `total_fee`: that is a crypto figure, and adding a fiat amount to it would produce a number that means nothing. Reconciling a payout, add this to `fiat_amount` to get the gross the rate implies. Always present; `"0.00"` on a rail that charges nothing. example: "0.00" fiat_rail_fee_currency: type: string description: >- The currency `fiat_rail_fee` is denominated in, so a breakdown read on its own is never ambiguous about which of the order's two currencies a fee is in. Omitted when there is no rail fee to denominate. example: CNY payout_base_rate: type: string description: >- Optional on payout estimates and quotes. The conversion rate before the licensed partner's costs and margin, in fiat per crypto, when that licensed partner publishes it, for instant and T+1 offers. It lets you show the recipient amount and one combined fee without charging the fee twice: divide `fiat_amount` by this rate and round half up to the crypto's precision; the rest of `crypto_amount` is the combined fee. A separate partner markup stays separate. Omitted when the rate is not known or is out of date; its absence does not mean there is no margin. This is not the all-in rate; that is `rate`. example: "7.25" PartnerOrderStatus: type: string description: | Order status. **Off-ramp statuses (crypto → fiat):** - `created` — order created, quote locked - `awaiting_liquidity_provider` — order initiated, waiting for vendor acceptance - `awaiting_crypto_transfer_authorization` — partner must authorize crypto transfer via EIP-712 signature - `crypto_transfer_authorization_pending` — authorization submitted, awaiting on-chain confirmation - `crypto_received` — crypto locked in escrow - `fiat_payment_started` — buyer submitted fiat payment proof - `fiat_payment_review_started` — the proof is under review - `dispute_started` — a dispute was raised on the order - `awaiting_fiat_received_confirmation` — waiting for partner to confirm fiat receipt - `fiat_received_confirmed`, `crypto_release_pending` — timeline vocabulary. They appear in `timeline[].status`; no order reports either as its own `status`, and filtering on them returns nothing - `completed` — order fully completed - `cancelled` — order cancelled - `failed` — terminal error - `price_changed_requote_needed` — slippage exceeded at initiation. Like `awaiting_liquidity_provider`, it is reported before a liquidity provider has accepted the order, and `GET /partner/orders?status=` returns the orders that report it **Delayed settlement (T+1) statuses:** > Both are unreachable for an ordinary order. - `settlement_in_progress` — crypto release has started or is confirmed; the order is not yet resolved. This alone does not mean a bank payment has been sent - `returned` — the payout went out and the bank sent it back, with no new payout authorization. The crypto is not refunded yet: Unigox arranges another payout attempt, or refunds the crypto and the order reads `cancelled`. A payout the provider cancelled before sending it is not a return Precedence on a delayed order, in this order — more than one mark can be set at once: 1. `delayed_settlement_fiat_paid_to_customer_at` set → `completed` 2. else `delayed_settlement_crypto_refunded_to_customer_at` set → `cancelled` 3. else `delayed_settlement_fiat_returned_by_bank_at` set **and** `delayed_settlement_fiat_payout_authorized_by_admin_at` `null` → `returned` 4. else, on a release status → `settlement_in_progress` 5. before the release, the ordinary mapping applies — a funded delayed order awaiting release is `crypto_received` like any other, and `next_action` is what tells them apart A return with a fresh authorization on top reads as `settlement_in_progress` (step 4). **On-ramp statuses (fiat → crypto):** - `awaiting_liquidity_provider` — order initiated, waiting for vendor acceptance - `awaiting_vendor_escrow_funding` — vendor accepted, funding escrow with crypto - `awaiting_fiat_transfer` — crypto locked in escrow; the partner pays the vendor and confirms payment sent (`fiat_funding_source: vendor_details`), or the customer transfers into their own fiat account (`own_account`) - `fiat_transfer_pending` — fiat payment confirmed, awaiting vendor confirmation of receipt - `completed` — vendor confirmed fiat received, crypto released to end-user wallet - `cancelled` — order cancelled - `failed` — escrow error **On-ramp send-out statuses (optional post-trade cross-chain transfer):** > After an on-ramp order reaches `completed`, the partner may optionally initiate a > **send-out** — a cross-chain transfer of the received crypto to a destination network > (e.g. XAI → Arbitrum). This is an additional flow and does not affect the core trade lifecycle. > The `completed` status reflects that the trade itself is done; send-out statuses track > the subsequent cross-chain transfer only. - `send_out_pending` — send-out initiated, cross-chain transfer in progress - `send_out_completed` — cross-chain transfer successfully delivered to destination - `send_out_failed` — cross-chain transfer failed; the on-ramp trade itself remains completed enum: - created - awaiting_liquidity_provider - awaiting_crypto_transfer_authorization - crypto_transfer_authorization_pending - crypto_received - fiat_payment_started - fiat_payment_review_started - dispute_started - awaiting_fiat_received_confirmation - fiat_received_confirmed - crypto_release_pending - awaiting_vendor_escrow_funding - awaiting_fiat_transfer - fiat_transfer_pending - completed - cancelled - failed - price_changed_requote_needed - settlement_in_progress - returned - send_out_pending - send_out_completed - send_out_failed example: awaiting_crypto_transfer_authorization TimelineEntry: type: object properties: status: $ref: '#/components/schemas/PartnerOrderStatus' timestamp: type: string format: date-time description: When this status was reached example: "2026-02-01T12:00:05Z" description: type: string description: | Human-readable description of the status change. On a **delayed settlement (T+1)** order the release entry reads `Crypto released to the liquidity provider, ahead of the payout` under `settlement_in_progress`, not `Order completed`: the crypto leaving escrow is the middle of that order's story, not its end. Seven more entries follow it — `Crypto transferred to the payout provider`, `Fiat payout authorized`, `Fiat payout submitted by the provider` and `Fiat payout cancelled by the provider before it was sent` (all `settlement_in_progress`), `Fiat paid to the customer` (`completed`), `Fiat returned by the bank` (`returned`) and `Crypto refunded to the customer` (`cancelled`). An ordinary order's timeline is unchanged, entry for entry. Consecutive entries are collapsed by status; on a delayed order they are collapsed by status **and** description, so the intermediate facts that all carry `settlement_in_progress` each keep their own line. Once a payment has come back, or the payout provider cancelled it before sending it, and a new attempt followed, every attempt stays on the timeline and the approval, sending, paid, return and cancellation entries end in `(attempt N)`, for example `Fiat payout authorized (attempt 2)` or `Fiat paid to the customer (attempt 2)`. With a single attempt there is no suffix. `Crypto transferred to the payout provider` is read from the order's timestamp and leaves the timeline when that timestamp is cleared. example: "Order created" RegisterWebhookRequest: type: object required: [url] properties: url: type: string format: uri description: HTTPS URL that will receive webhook events example: "https://partner.example.com/webhooks/unigox" WebhookConfigResponse: type: object properties: url: type: string nullable: true description: Currently configured webhook URL (null if not set) example: "https://partner.example.com/webhooks/unigox" enabled: type: boolean description: Whether webhook delivery is active example: true WebhookTestPingResponse: type: object properties: delivered: type: boolean description: Whether the test event was delivered successfully example: true http_status: type: integer nullable: true description: HTTP status code returned by the webhook endpoint; `null` when it did not answer example: 200 error: type: string description: Present when `delivered` is `false` enum: - webhook endpoint answered non-2xx - webhook endpoint unreachable WebhookEventPayload: type: object description: Signed partner webhook envelope. The data shape depends on event_type. properties: event_id: type: string description: Unique event identifier for de-duplication example: "evt_a1b2c3d4-e5f6-7890-abcd-ef1234567890" event_type: type: string description: | Event type. `order.status.changed` for a status transition, `order.refund.required` for an order whose crypto is stuck in escrow awaiting your signature, `order.own_account_payout.updated` for the onward payment of an off-ramp paid through the customer's own fiat account (see the Webhooks section). enum: [order.status.changed, order.refund.required, order.own_account_payout.updated, user.kyc.updated, fiat_account.updated, fiat_account.deposit.received, fiat_account.payment.sent, fiat_account.payment.updated, business_customer.kyb.updated, wallet.linked, wallet.deposit.received, wallet.withdrawal.status.changed] example: "order.status.changed" created_at: type: string format: date-time description: Timestamp when the event was created example: "2026-02-01T12:00:05Z" data: anyOf: - $ref: '#/components/schemas/PartnerWalletLinkedData' - $ref: '#/components/schemas/PartnerWalletDepositData' - type: object properties: order_id: type: string format: uuid description: Partner order UUID example: "b2c3d4e5-f6a7-8901-bcde-f12345678901" status: $ref: '#/components/schemas/PartnerOrderStatus' user_id: type: string format: uuid description: "`user_id` is the customer's `user_uuid` (from user creation)." example: "550e8400-e29b-41d4-a716-446655440000" crypto_amount: type: string description: | Total crypto amount including the platform fee. Partner-fee-exclusive, except for a crypto-anchored onramp order: there the amount was sized up so the delivered amount stays exact after the partner fee is withheld, so this field includes the markup. Every other case keeps the markup out — it's reported separately in `partner_fee`. Formatted with the shortest round-tripping representation (e.g. `"101.5"`, not `"101.500000"`) — parse it as a decimal, don't compare strings. example: "101.5" crypto_currency: type: string description: Cryptocurrency code example: "USDT" partner_fee: type: string description: | Partner markup in crypto for this order (`"0"` when none was declared). Unlike `fee_breakdown.partner_fee` in the REST responses (which is padded to the token's decimals), this field is formatted with the shortest round-tripping representation — `1.0` reports as `"1"`, not `"1.00"`. Parse it as a decimal, don't compare strings. example: "1" partner_fee_pct: type: number format: double description: Partner markup percentage declared for this order (`1` means 1%; 0 when none) example: 1 fiat_amount: type: string description: Fiat amount example: "152880.00" fiat_currency: type: string description: Fiat currency code example: "NGN" provider: type: string description: Liquidity provider type enum: [p2p, licensed] example: "p2p" payment_details_id: type: string description: >- Payment details ID used for the order, as a string. An empty string (`""`) when the order has none: on a third-party payout, which is routed by `recipient_destination_id`, it is always `""`. On an order with `payout_via_own_account: true` it is the payment details you named, the bank the money is sent on to. example: "987" payment_deadline_at: type: string format: date-time description: >- `order.status.changed` for an on-ramp at `awaiting_fiat_transfer`: the same `payment_deadline_at` as the order. Omitted on every other event. example: "2026-10-24T09:12:30Z" payout_via_own_account: type: boolean description: >- `true` on a partner API off-ramp paid through the customer's own fiat account: the provider pays the customer's account and Unigox sends the money on to the bank you named. Omitted on every other order, never `false`. example: true own_account_payout_status: type: string enum: [awaiting_credit, in_progress, sent_to_bank, under_review, held, left_on_account] description: >- `order.own_account_payout.updated` only: the state the onward payment reached (`sent_to_bank`, `held`, `under_review` or `left_on_account`). example: sent_to_bank user_uuid: type: string format: uuid description: >- The customer's public UUID, on `order.own_account_payout.updated` and the fiat account events. example: "c0ffee00-0000-4000-8000-000000000001" fiat_account_id: type: string format: uuid description: >- `order.own_account_payout.updated` and the fiat account events: the customer's fiat account. On `order.own_account_payout.updated` omitted when the account is not one you can address by id. example: "6b1d2c3e-0000-4000-8000-000000000007" amount: type: string description: >- `order.own_account_payout.updated` and `fiat_account.deposit.received`: the fiat amount, as a decimal string with at least two decimals. example: "250.00" currency: type: string description: >- `order.own_account_payout.updated` and the fiat account events: the fiat currency code. example: "EUR" delayed_settlement: type: boolean description: | **Delayed settlement (T+1) only.** Omitted entirely on any other order — `delayed_settlement` is `true` or absent, never `false`. Every T+1 field here is omitted until it has a value. `delayed_settlement` and `settlement_hours` are on every `order.status.changed` event of a delayed order, including the ones before the release; `payout_deadline_at` from the release onwards (the release sends two `settlement_in_progress` events: one when it starts, without `payout_deadline_at`, and one when it is confirmed, with it); and each `delayed_settlement_*_at` timestamp while currently set. A bank return clears authorization, submission and paid timestamps, the payout provider's cancellation of a payment it had not sent clears the authorization, and a withdrawn record of the crypto at the payout provider, or a crypto refund after a return, clears that one, so later events can omit earlier fields. An absent key means not currently set (never recorded or cleared); nulls are omitted. Re-read the order to reconcile state. Deduplicate deliveries by event_id, not order_id. example: true settlement_hours: type: integer description: >- The expected payout window, counted from the release: the licensed partner's target, not a guaranteed deadline. Rounded to the nearest whole hour and never below `1`. example: 24 payout_deadline_at: type: string format: date-time description: >- Release plus the expected window: when the payment is expected by, not a deadline. Absent until the crypto has left escrow. example: "2026-09-19T12:07:55Z" delayed_settlement_crypto_sent_to_provider_at: type: string format: date-time description: >- The crypto left the licensed partner's wallet for the payout provider. No refund of the crypto is possible while it is set. Absent until it happens, and absent again if Unigox withdraws a record made by mistake or refunds the crypto after a returned payment. delayed_settlement_fiat_payout_authorized_by_admin_at: type: string format: date-time description: >- Unigox authorized the licensed partner to send the bank payment. Absent until it happens. When the authorization also records the crypto reaching the payout provider, one event carries both. Absent again after a bank return, or after the payout provider cancelled the payment before sending it (that event keeps the order's status). delayed_settlement_fiat_payout_submitted_by_provider_at: type: string format: date-time description: >- Submission of the bank payment was recorded; recipient payment is not yet confirmed. Absent until it happens. delayed_settlement_fiat_paid_to_customer_at: type: string format: date-time description: >- The fiat reached the recipient — the real completion of a delayed order. Absent until it happens. delayed_settlement_fiat_returned_by_bank_at: type: string format: date-time description: >- The payout went out and the bank sent it back; the paid, submitted and authorized marks are cleared in the same statement, and Unigox then pays again or refunds the crypto. Absent until it happens. delayed_settlement_crypto_refunded_to_customer_at: type: string format: date-time description: >- The crypto went back to the wallet that funded the escrow (yours, on an order whose crypto you hold) instead of being paid out, before it reached the payout provider or after a returned payment. Absent until it happens. PartnerOnRampQuoteRequest: type: object required: [user_uuid, fiat_currency, crypto_currency] oneOf: - required: [fiat_amount] - required: [crypto_amount] properties: user_uuid: type: string format: uuid description: Public UUID of the end-user (returned by `POST /partner/users` as `id`) example: "550e8400-e29b-41d4-a716-446655440000" fiat_amount: type: string description: Fiat amount the end-user will send. Provide exactly one of fiat_amount or crypto_amount. example: "26345" crypto_amount: type: string description: Crypto amount to receive. Provide exactly one of fiat_amount or crypto_amount. example: "1.00" fiat_currency: type: string description: Source fiat currency code (ISO 4217) example: VND crypto_currency: type: string description: Target cryptocurrency code (e.g., USDT, USDC) example: USDT payment_method_slug: type: string description: Optional payment method slug to narrow routing example: zalopay payment_network_slug: type: string description: Optional payment network slug to narrow routing example: napas-vietnam provider_scope: type: string description: Optional provider scope filter; defaults to all enum: [all, licensed_only, p2p_only] example: all country_code: type: string description: Optional ISO 2-letter country code for fee/routing context example: VN partner_fee_pct: type: string pattern: '^[0-9]+(\.[0-9]+)?$' description: | Optional per-order markup you charge your end user, applied on the same crypto base as the platform fee (non-compounding). Percent units: `1` means 1%. Omitting the field from this request payload — or sending `0` — means no markup; the markup cannot be negative. Fiat-anchored offramp orders have no cap — the deposit grows to cover the markup. Every other case hits a formula domain bound, not a business cap: onramp rejects `partner_fee_pct >= 100` (the withheld or grossed-up fee would consume the entire buyer amount, leaving nothing delivered); crypto-anchored offramp rejects it when the fee would consume the entire pinned deposit. Note: you send this value as a JSON **string**, but it round-trips as a JSON **number** in `fee_breakdown.partner_fee_pct` and in the webhook `data.partner_fee_pct` field — don't parse those as strings. **Rejection reference:** | Rejection | `error.code` | HTTP status | |---|---|---| | `partner_fee_pct` is non-numeric, negative, `NaN`, or `Inf` | `INVALID_REQUEST` | 400 | | Onramp: fee would consume the entire buyer amount (`partner_fee_pct >= 100`) | `INVALID_REQUEST` | 400 | | Crypto-anchored offramp: fee would consume the entire pinned deposit | `INVALID_REQUEST` | 400 | | Fiat-anchored offramp: the computed fee is not a finite amount | `INVALID_REQUEST` | 400 | | Crypto-anchored offramp: the carved fee-exclusive gross falls outside the matched offer's min/max | `NO_OFFERS_AVAILABLE` | 409 | default: "0" example: "1" PartnerOnRampQuoteResponse: type: object properties: quote_id: type: string format: uuid description: Unique quote identifier — use this to initiate the order example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" rate: type: string description: Fiat-to-crypto exchange rate (fiat units per 1 crypto unit) example: "26345.00" crypto_amount: type: string description: | Total crypto amount for the order — the end-user's amount plus the platform fee. Partner-fee-exclusive on a fiat-anchored quote (request declared `fiat_amount`): the markup is reported separately in `fee_breakdown.partner_fee` and is not added here — the end user receives `crypto_amount − fee_breakdown.platform_fee − fee_breakdown.partner_fee`, withheld from this amount at bridge send-out. On a crypto-anchored quote (request declared `crypto_amount`), the trade is sized up so this field includes the markup, and the end user receives exactly the requested `crypto_amount`, unchanged by the markup. example: "1.005000" fiat_amount: type: string description: Fiat amount the end-user sends example: "26345.00" fee_breakdown: $ref: '#/components/schemas/FeeBreakdown' payment_method_slug: type: string description: Matched payment method slug used for this quote example: zalopay payment_network_slug: type: string description: Matched payment network slug used for this quote example: napas-vietnam expires_at: type: string format: date-time description: Quote expiration timestamp (60 seconds from creation) example: "2026-03-30T19:15:50Z" SubmitPayerDetailsRequest: type: object description: | Submit the payer's payment details for a `payment_request` on-ramp order. Provide exactly one of `payment_details_id` (saved profile) or `payment_details` (inline object). oneOf: - required: [payment_details_id] properties: payment_details_id: type: integer format: int64 description: ID of a previously saved payment profile for the end-user example: 1444 - required: [payment_details] properties: payment_details: type: object required: [payment_method_id, payment_network_id, details] properties: payment_method_id: type: integer format: int64 description: Payment method ID example: 5 payment_network_id: type: integer format: int64 description: Payment network ID example: 12 details: type: object description: Payer's account details (fields depend on payment method) additionalProperties: true example: phone: "+254712345678" name: "John Doe" country_code: type: string description: Optional ISO 2-letter country code example: KE BusinessCustomer: type: object description: A company you onboarded through KYB, and where its KYB stands. properties: id: type: string description: The business customer id. Every route below takes it. example: "3f6b2a10-9c1e-4d7a-8b2f-1c2d3e4f5a6b" reference: type: string example: "KYB-2026-0142" status: type: string description: The KYB status. Accounts can be issued once it is `approved`. enum: [not_started, in_progress, submitted, automated_review, manual_review, additional_information_required, resubmitted, approved, rejected] example: approved can_open_accounts: type: boolean description: "`true` when the KYB is approved." kyb_type: type: string enum: [standard, extended] action_owner: type: string description: Who the case is waiting on. action_type: type: string action_reason: type: string external_ref: type: string description: Your own reference, as sent on create. company: type: object properties: legal_name: type: string trade_name: type: string country_of_incorporation: type: string registration_number: type: string email: type: string invitation_status: type: string invitation_expires_at: type: string format: date-time nullable: true submitted_at: type: string format: date-time nullable: true decided_at: type: string format: date-time nullable: true created_at: type: string format: date-time updated_at: type: string format: date-time completeness_percent: type: number description: How much of the questionnaire is filled in. Present on the single read. information_requests: type: array description: What the company still has to provide. Present on the single read. items: type: object properties: id: type: string category: type: string note: type: string deadline: type: string format: date-time nullable: true status: type: string identity_verifications: type: array description: Each person's identity check. Present on the single read. items: type: object properties: person_id: type: string full_name: type: string roles: type: array items: type: string ownership_percent: type: number nullable: true status: type: string verification_url: type: string description: The person's own identity-check link, to resend if they lost it. initiated_at: type: string format: date-time nullable: true completed_at: type: string format: date-time nullable: true BusinessCustomerCreateRequest: type: object required: - representative_email properties: legal_name: type: string example: "NORTHWIND TRADING LTD" trade_name: type: string country_of_incorporation: type: string description: ISO 3166-1 alpha-2. example: GB registration_number: type: string incorporation_date: type: string format: date representative_email: type: string format: email description: The link is emailed here, and only this person can open it. external_ref: type: string maxLength: 128 description: Your own reference for this company. kyb_type: type: string enum: [standard, extended] invitation_expiry_days: type: integer minimum: 1 maximum: 90 description: How long the onboarding link stays valid. Left out, the link does not expire. BusinessOnboardingLink: type: object properties: url: type: string format: uri expires_at: type: string format: date-time nullable: true description: Null when the link does not expire. BusinessCustomerListResponse: type: object properties: success: type: boolean example: true data: type: object properties: business_customers: type: array items: $ref: '#/components/schemas/BusinessCustomer' total: type: integer limit: type: integer offset: type: integer has_more: type: boolean BusinessCustomerResponse: type: object properties: success: type: boolean example: true data: type: object properties: business_customer: $ref: '#/components/schemas/BusinessCustomer' BusinessCustomerCreateResponse: type: object properties: success: type: boolean example: true data: type: object properties: business_customer: $ref: '#/components/schemas/BusinessCustomer' onboarding_link: $ref: '#/components/schemas/BusinessOnboardingLink' BusinessOnboardingLinkResponse: type: object properties: success: type: boolean example: true data: type: object properties: onboarding_link: $ref: '#/components/schemas/BusinessOnboardingLink' BusinessFiatAccount: type: object properties: id: type: string description: The account id, `business_`. example: business_412 holder_type: type: string enum: [business] business_customer_id: type: string currency: type: string example: GBP status: type: string enum: [active, closed] holder_name: type: string description: The company the account was issued for. bank_holder_name: type: string description: The holder name the bank has on file, which payers see. Can differ from `holder_name`. bank_name: type: string iban: type: string account_number: type: string sort_code: type: string bic: type: string balances: type: array items: type: object properties: currency: type: string available: type: string pending: type: string total: type: string balance_known: type: boolean description: "`false` when the bank could not be read just now; `balances` is then empty, not zero." details_live: type: boolean description: "`false` when the bank details could not be read just now and only stored fields are shown." created_at: type: string format: date-time BusinessFiatAccountCreateRequest: type: object required: [currency] properties: currency: type: string example: GBP issuer_country: type: string description: ISO 3166-1 alpha-2 jurisdiction to issue in. Defaults per currency. example: GB allow_duplicate: type: boolean description: Open a second account in a currency the company already holds. BusinessFiatAccountListResponse: type: object properties: success: type: boolean example: true data: type: object properties: fiat_accounts: type: array items: $ref: '#/components/schemas/BusinessFiatAccount' BusinessFiatAccountResponse: type: object properties: success: type: boolean example: true data: type: object properties: fiat_account: $ref: '#/components/schemas/BusinessFiatAccount' currency_mismatch: type: boolean description: On issue only. The bank opened the account in a different currency than asked. OperatingBalanceLine: type: object properties: currency: type: string example: USDC available: type: string description: Decimal string. What can be spent now. example: "1500.00" OperatingAccountResponse: type: object properties: success: type: boolean example: true data: type: object properties: operating_account: type: object properties: fiat_balances: type: array items: $ref: '#/components/schemas/OperatingBalanceLine' crypto_balances: type: array items: $ref: '#/components/schemas/OperatingBalanceLine' BusinessLedgerResponse: type: object properties: success: type: boolean example: true data: type: object properties: entries: type: array items: type: object properties: id: type: string type: type: string enum: [bank_transfer, conversion, internal_transfer, crypto_transfer, fee, other] amount: type: string currency: type: string status: type: string description: type: string balance_after: type: string counterparty_name: type: string counterparty_iban: type: string created_at: type: string format: date-time page: type: integer has_more: type: boolean BusinessPaymentsResponse: type: object properties: success: type: boolean example: true data: type: object properties: payments: type: array items: type: object properties: id: type: string direction: type: string enum: [incoming, outgoing, other] amount: type: string currency: type: string status: type: string description: type: string rail: type: string counterparty_name: type: string counterparty_iban: type: string counterparty_bic: type: string created_at: type: string format: date-time updated_at: type: string format: date-time page: type: integer has_more: type: boolean BusinessTransferRequest: type: object properties: amount: type: string description: Decimal string. Leave out to move the whole available balance in `currency`. example: "1500.00" currency: type: string example: GBP BusinessFundRequest: type: object required: - amount properties: amount: type: string description: Decimal string. example: "1500.00" currency: type: string example: GBP description: type: string description: The reference the bank records. BusinessTransferResponse: type: object properties: success: type: boolean example: true data: type: object properties: transfer: type: object properties: fiat_account_id: type: string direction: type: string enum: [to_partner, from_partner] amount: type: string currency: type: string status: type: string enum: [completed] replayed: type: boolean description: "`true` when this answer came from an earlier request with the same key." idempotency_key: type: string WebhookTestRequest: type: object description: Optional body of `POST /api/v1/partner/webhooks/test`. Omit it to send `ping`. properties: event_type: type: string enum: [ping, order.status.changed, fiat_account.deposit.received, fiat_account.payment.sent, fiat_account.payment.updated, business_customer.kyb.updated] description: The event to send a sample of. Empty or omitted is `ping`. holder_type: type: string enum: [retail, business] description: | For `fiat_account.deposit.received` only: the retail (default) or business account sample. `business` is also accepted for the `fiat_account.payment.*` events, which exist only on business accounts. WebhookEvent: type: object description: | One event as it was signed and sent (`event_id`, `event_type`, `created_at`, `data`), with `delivery` added. `data` is the event's own payload; see each event type. properties: event_id: type: string event_type: type: string created_at: type: string format: date-time data: type: object additionalProperties: true delivery: $ref: '#/components/schemas/WebhookEventDelivery' WebhookEventDelivery: type: object description: How the delivery of one event stands. properties: status: type: string enum: [pending, in_progress, delivered, failed] description: | `pending`: waiting for its (next) attempt. `in_progress`: being sent now. `delivered`: your endpoint answered 2xx. `failed`: no more attempts, or never sent (see `failure_reason`). attempts: type: integer description: Delivery attempts made so far (reset to 0 by redeliver). delivered_at: type: string format: date-time nullable: true description: When your endpoint last accepted it. last_http_status: type: integer nullable: true description: Your endpoint's HTTP status on the last attempt; null when there was no answer. failure_reason: type: string nullable: true enum: [webhook_disabled, webhook_url_not_set, http_error, network_error, delivery_failed, null] description: | Why the last attempt did not succeed. `webhook_disabled` / `webhook_url_not_set`: the event was never sent because of your webhook settings. `http_error`: your endpoint answered non-2xx (see `last_http_status`). `network_error`: no answer (connect, TLS, timeout). Null when delivered, or when requeued and not yet attempted. WebhookEventPage: type: object properties: events: type: array items: $ref: '#/components/schemas/WebhookEvent' since: type: string format: date-time description: The lower bound this page was read from (the default is shown when you sent none). has_more: type: boolean description: More events match beyond this page. next_cursor: type: string nullable: true description: Pass as `cursor` for the next page. Set on every non-empty page. WebhookErrorResponse: type: object description: The error shape the partner webhook endpoints answer with. required: - success - error properties: success: type: boolean example: false error: type: string example: "since must be an RFC 3339 timestamp, e.g. 2026-10-26T00:00:00Z" PartnerErrorResponse: type: object required: [success, error] properties: success: type: boolean example: false error: type: object required: [code, message] properties: code: type: string description: | Machine-readable error code. Possible values: - `QUOTE_EXPIRED` — quote TTL has passed; for a customer withdrawal, also the customer's forwarder nonce moved or another withdrawal has not executed yet (request a new quote) - `QUOTE_NOT_FOUND` — quote ID does not exist - `QUOTE_ALREADY_USED` — quote was already consumed by initiate. `details.order_id` names the order it created, so a retried initiate whose first response was lost can continue with that order - `PRICE_CHANGED_REQUOTE` — price changed beyond slippage tolerance, partner should request a new quote - `ORDER_NOT_FOUND` — order ID does not exist or belongs to another partner - `NO_OFFERS_AVAILABLE` — no vendor offers for the requested pair - `INVALID_REQUEST` — malformed request or missing fields - `INVALID_PAYMENT_DETAILS` — payment details not found or invalid - `RAIL_ROUTE_MISMATCH` — rail or route does not match payment details (self-payout only; on a third-party payout a mismatched `rail` is `THIRD_PARTY_CONTEXT_INVALID`) - `UNAUTHORIZED` — authentication failed - `INTERNAL_ERROR` — unexpected server error - `INVALID_STATUS` — order is not in the correct status for the requested action - `TRANSACTOR_ERROR` — (502) the transaction could not be submitted, although the signed request passed every check, or a refund could not be executed; retry - `INSUFFICIENT_BALANCE` — the funding wallet (your partner wallet, or the `external_wallet` customer's address) lacks tokens for the escrow or withdrawal - `OPERATION_NOT_ALLOWED` — action is not permitted for the current order state - `KYC_NOT_CLEARED` — the customer is not KYC-cleared for this transaction; `error.details.kyc_status` carries their current partner-facing status - `FEATURE_NOT_ENABLED` — non-custodial mode is not switched on for your partner account - `WALLET_NOT_LINKED` — the `external_wallet` customer has no linked address yet - `WALLET_ALREADY_LINKED` — the customer is already linked, the address is linked to another of your customers, or Unigox holds it for an account (a Unigox app wallet, your partner wallet, an escrow) or uses it itself - `WALLET_TYPE_MISMATCH` — the call does not apply to this customer's `wallet_type` - `INVALID_SIGNATURE` — a wallet challenge signature does not recover to the address, or the message was altered - `CHALLENGE_EXPIRED` — no wallet challenge was issued, it is older than 10 minutes, already used, or replaced by a newer one - `CUSTOMER_NOT_FOUND` / `WITHDRAWAL_NOT_FOUND` — unknown customer or withdrawal on the customer wallet routes - `ADDRESS_CAP_REACHED` — allocating would take the customer past the deposit-address limit for that chain type - `BALANCE_UNAVAILABLE` / `DEPOSIT_ADDRESSES_UNAVAILABLE` — a dependency did not answer; safe to retry - `AMOUNT_TOO_LOW` — (422) too small to bridge to the destination chain: the bridge refused it (`error.details.reason`), or its fee would exceed 2% (`error.details.bridge_fee`, `estimated_minimum_amount`, `max_fee_pct`) - `SENDER_IDENTITY_REQUIRED` — the payout corridor settles consumer-to-consumer and the customer's record cannot name them as the remitter; `error.details.kyc_fields` lists what to send to `PATCH /partner/users/{user_uuid}/kyc`, and `error.details.field_limits` carries the rail's length ceiling on any listed field that has one - `RECIPIENT_NOT_FOUND` — (404) the recipient endpoints, and an estimate naming such a recipient or destination: no recipient (or destination) with that id belongs to your partner account, or it was archived. A quote answers the same case `422 THIRD_PARTY_CONTEXT_INVALID` - `RECIPIENT_SERVICE_UNAVAILABLE` — (503) the recipient endpoints: the recipient directory could not be reached; retry with backoff - `THIRD_PARTY_CONTEXT_INVALID` — (422) the sender, recipient or destination of a third-party payout cannot be used, including a `rail` that is not the destination's and a destination currency that is not `fiat_currency`; the message says which - `THIRD_PARTY_RAIL_NOT_SUPPORTED` — (409) the currency is open to recipient payouts, but not over the rail the destination settles on - `THIRD_PARTY_PAYOUT_AGENT_NOT_READY` — (409) recipient payouts are switched off on our side; no order is created and the quote stays valid - `THIRD_PARTY_RELATIONSHIP_NOT_SUPPORTED` — (422) the rail refuses that beneficiary (a Chinese wallet pays `self` or `family` only) - `THIRD_PARTY_SENDER_COUNTRY_NOT_SUPPORTED` — (422) the rail refuses money sent from the country on the customer's verified identity - `THIRD_PARTY_PAYOUT_UNDER_REVIEW` — (422, initiate) compliance put the payout in review - `THIRD_PARTY_PAYOUT_DECLINED` — (422, initiate) compliance refused the payout Fiat account endpoints (`/partner/fiat-accounts/config` and the `/partner/users/{user_uuid}` `identity`, `identification` and `fiat-accounts` routes) answer with their own codes, each described on the response that returns it: `FIAT_ACCOUNT_NOT_FOUND`, `ACCOUNT_HOLDER_NOT_FOUND`, `ACCOUNT_NOT_PROVISIONED`, `CUSTOMER_NOT_FOUND`, `CUSTOMER_NOT_VERIFIED`, `CLIENT_NOT_APPROVED`, `HOLDER_REGISTRATION_IN_PROGRESS`, `IDENTIFICATION_MISSING`, `IDENTIFICATION_ALREADY_LINKED`, `INVALID_DOCUMENT_TYPE`, `POSTAL_CODE_REQUIRED`, `INVALID_POSTAL_CODE`, `MISSING_FIELDS`, `PRODUCT_NOT_ACTIVATED`, `ISSUANCE_NOT_GRANTED`, `ISSUANCE_DISABLED`, `PROVISIONING_IN_PROGRESS`, `UNSUPPORTED_CURRENCY`, `UNSUPPORTED_ISSUER_COUNTRY`, `CURRENCY_NOT_PERMITTED`, `CURRENCY_NOT_PRICED`, `RECORD_FAILED`, `BANKING_ERROR`, `BANKING_UNAVAILABLE`. Business customer endpoints (`/partner/business-customers`) can also answer `KYB_UNAVAILABLE` or `SERVICE_UNAVAILABLE` (5xx): try again shortly. This list is not closed: codes are added as endpoints grow. Treat a code you do not recognise as an error of the kind its HTTP status says, rather than rejecting the response. example: QUOTE_EXPIRED message: type: string description: Human-readable error message example: "Quote has expired, please request a new quote" details: type: object nullable: true additionalProperties: true description: Additional context (e.g., quoted_rate, current_rate for slippage errors) example: quoted_rate: 1530.12 current_rate: 1545.00 # ---- Fiat Accounts ---- FiatAccountConfigResponse: type: object required: [success, data] properties: success: { type: boolean, example: true } data: type: object properties: enabled: type: boolean description: Whether you may use fiat accounts at all. example: true issues_accounts: type: boolean description: | Whether you may OPEN accounts, as opposed to only reading the ones you have. example: true disabled_reason: type: string description: Why the product is unavailable. Present only when `enabled` is false. example: PRODUCT_NOT_ACTIVATED currencies: type: array items: { type: string } description: ISO 4217 currencies an account may be denominated in. example: ["EUR", "GBP"] issuers: type: object additionalProperties: type: array items: { type: string } description: Currency to issuing jurisdictions (ISO 3166-1 alpha-2), default first. example: { "EUR": ["NL", "MT"], "GBP": ["GB"] } FiatAccountCreateRequest: type: object required: [user_uuid, currency] properties: user_uuid: type: string format: uuid description: One of your customers, KYC-verified by Unigox. example: "550e8400-e29b-41d4-a716-446655440000" currency: type: string description: One of `config.currencies`. example: EUR issuer_country: type: string description: | ISO 3166-1 alpha-2, one of `config.issuers[currency]`. Omitted, the currency's default jurisdiction is used. example: NL postal_code: type: string description: | Only needed when the chosen jurisdiction requires one and the customer's KYC record has none. Sent here, it is written onto that KYC record. example: "1011 AB" FiatAccount: type: object description: | One issued account. The pay-in fields appear once `status` is `active`, and only the ones the account's rail uses. Nothing here names the bank or banking platform Unigox routes through. `bank_name` and `bic` describe the account a payer sends money to, which is different — those are for the customer to see. properties: fiat_account_id: type: string format: uuid description: | The account's id, and the only one. It is what every `/fiat-accounts/{fiat_account_id}` route takes, what a webhook names the account by, and what an order funded from this account carries. example: "7c9e6679-7425-40de-944b-e07fc1f90ae7" user_uuid: type: string format: uuid description: The customer who holds the account. example: "550e8400-e29b-41d4-a716-446655440000" currency: type: string example: EUR issuer_country: type: string description: The jurisdiction the account was issued in. example: NL status: type: string enum: [pending, active, failed, closed] description: | `pending` — being opened, no pay-in details yet, do not send the customer to it. `active` — ready, and the pay-in details below are on this response. `failed` — the bank refused; this account will not become usable. `closed` — retired; its history stays readable and new deposits will not credit it. example: active created: type: boolean description: | On the issue response only: whether THIS request opened the account. `false` means it already existed and is being handed back. example: true iban: type: string description: Euro (SEPA) accounts. Pay-in detail. example: "NL02EXMP0123456789" bic: type: string description: Euro (SEPA) accounts. Pay-in detail. example: EXMPNL2A account_number: type: string description: Sterling (Faster Payments) accounts. Pay-in detail. example: "12345678" sort_code: type: string description: Sterling (Faster Payments) accounts. Pay-in detail. example: "00-00-00" iban_last4: type: string description: List views, where the full identifier does not travel. example: "8827" account_number_last4: type: string description: List views of a sterling account. example: "4471" bank_name: type: string description: The bank to show the customer. example: Example Bank holder_name: type: string description: The name the account is held in. example: Jane DOE balances: type: array description: Single-account view only. items: $ref: '#/components/schemas/FiatBalance' balances_unavailable: type: boolean description: | Single-account view only. True when the balance read failed — the balances are reported as unavailable rather than as zero. example: false created_at: type: string format: date-time example: "2026-09-18T10:00:00Z" FiatBalance: type: object properties: currency: { type: string, example: EUR } available: { type: string, example: "1250.00" } pending: { type: string, example: "0.00" } total: { type: string, example: "1250.00" } FiatAccountResponse: type: object required: [success, data] properties: success: { type: boolean, example: true } data: $ref: '#/components/schemas/FiatAccount' FiatAccountListResponse: type: object required: [success, data] properties: success: { type: boolean, example: true } data: type: object properties: fiat_accounts: type: array items: $ref: '#/components/schemas/FiatAccount' FiatTransaction: type: object description: One movement of money on a fiat account. properties: transaction_id: type: string description: The transaction's id, and the id a deposit webhook names it by. example: "5f1b2c9a-1d44-4f0e-9c1a-2b5f0d7e9a31" type: type: string enum: [credit] description: | `credit` — money arrived on the account. v1 is receive-only, so this is the only value. example: credit amount: type: string example: "500.00" currency: type: string example: EUR order_id: type: string nullable: true description: | The on-ramp order this credit funded, or `null` when it matched no order and simply stays on the account. example: "b2c3d4e5-f6a7-8901-bcde-f12345678901" description: type: string description: What the payer sent the transfer with, when it carried anything. example: "Invoice 2026-114" created_at: type: string format: date-time example: "2026-09-18T10:04:22Z" FiatTransactionsResponse: type: object required: [success, data] properties: success: { type: boolean, example: true } data: type: object properties: transactions: type: array items: $ref: '#/components/schemas/FiatTransaction' has_more: type: boolean description: Whether another page exists after this one. example: false parameters: UserUUIDPath: name: user_uuid in: path required: true description: The `user_uuid` returned by `POST /api/v1/partner/users`. Partners can only access their own customers. schema: type: string format: uuid example: "550e8400-e29b-41d4-a716-446655440000" BusinessCustomerId: name: business_customer_id in: path required: true description: The business customer's `id`. One that is not yours answers `404`. schema: type: string BusinessFiatAccountId: name: fiat_account_id in: path required: true description: A business account id, `business_`, as returned in `id`. It is only found under the customer that holds it. schema: type: string example: business_412 IdempotencyKeyHeader: name: Idempotency-Key in: header required: true description: Your key for this money movement. Send the same key when retrying. schema: type: string maxLength: 255 FiatAccountId: name: fiat_account_id in: path required: true description: | The account's id, as returned in `fiat_account_id`. An id that names no account and one that is not yours both answer `404`; they are indistinguishable on purpose. schema: type: string format: uuid example: "7c9e6679-7425-40de-944b-e07fc1f90ae7" securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-API-Key description: Partner API key for authentication. Required for all partner account endpoints.