Skip to main content
The OKX integration allows a developer to enable an OKX user to deposit funds from their OKX Pay balance to a destination wallet address.
Supported Source CurrencySupported Source RailSupported Destination CurrencySupported Destination RailQuote EstimationMinimum Order LimitMaximum Order LimitEstimated Settlement Time (once deposit received)Settlement Configuration (settlement_via)Fee rebalancing capability (rebalance_fee)
ANY ASSETOKXUSDCSOLANATBATBATBAONE_TO_ONEtrue / false
Only USDC on SOLANA is supported in milestone-1.

OKX Quote creation

curl --request POST \
  --url https://sandbox.api.fin.com/v1/transit/quote \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "order_amount": "100.00",
  "integration_type": "OKX",
  "settlement_config": {
    "settlement_via": "ONE_TO_ONE",
    "rebalance_fee": false,
    "destination_details": {
      "wallet_address": "....",
      "currency": "USDC",
      "rail": "SOLANA"
    }
  },
  "developer_fee": {
    "fixed": "0.15",
    "percentage": "2.5"
  }
}
'
When rebalance_fee is false, the settled amount equals order_amount minus total_fee (gas fee + developer fee + payment fee + conversion fee + withdrawal fee).

OKX Order creation

curl --request POST \
  --url https://sandbox.api.fin.com/v1/transit/payment \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "integration_type": "OKX",
  "order_info": {
    "merchant_name": "MESH Shop",
    "merchant_trade_no": "841e4ba2-...-a2a45de7bd00",
    "order_amount": "100.00",
    "currency": "USDC",
    "rail": "SOLANA",
    "currency_type": "crypto",
    "redirection_url": ""
  },
  "fin": {
    "settlement_config": {
      "settlement_via": "ONE_TO_ONE",
      "destination_details": {
        "wallet_address": "....",
        "currency": "USDC",
        "rail": "SOLANA"
      }
    },
    "developer_fee": {
      "fixed": "0.15",
      "percentage": "2.5"
    }
  }
}
'
If quote_id is provided then order_amount and the fin object cannot be provided. If quote_id is not provided then order_amount and the fin object are mandatory. Providing both results in a 422 error.
order_info.currency and order_info.rail must match destination_details.currency and destination_details.rail. This is a Fin API convention — the customer is not required to hold the order_info.currency in their OKX account.

Response Differences for OKX

Integration TypeResponse Field
OKXdata.provider_response
The provider_response object contains:
FieldDescription
pay_idOKX-generated payment ID
expire_timeUnix timestamp when the payment link expires
create_timeUnix timestamp when the order was created
checkout_linkOKX QR-code deeplink for the payer to complete payment