Skip to main content
POST
/
v1
/
transit
/
payment
curl --request POST \
  --url https://sandbox.api.fin.com/v1/transit/payment \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "integration_type": "BYBIT",
  "order_info": {
    "merchant_name": "PayPal",
    "client_id": "client_001",
    "payment_type": "E_COMMERCE",
    "merchant_trade_no": "841e4ba2-1234-5678-9abc-a2a45de7bd00",
    "order_amount": "100.00",
    "currency": "USDT",
    "currency_type": "crypto",
    "success_url": "https://example.com/success",
    "failed_url": "https://example.com/failed",
    "order_expire_time": 3600,
    "customer": {
      "uid": "user_123",
      "external_user_id": "ext_user_001",
      "user_name": "John Li",
      "register_time": 1739178959,
      "kyc_country": "AUS"
    },
    "goods": [
      {
        "shopping_name": "test good1",
        "mcc_code": "1520",
        "goods_name": "test1",
        "goods_detail": "First product"
      },
      {
        "shopping_name": "test good2",
        "mcc_code": "1521",
        "goods_name": "test2",
        "goods_detail": "Second product"
      }
    ],
    "env": {
      "terminal_type": "APP",
      "device": "iPhone 15",
      "browser_version": "iOS 17.0 Safari",
      "ip": "192.168.0.1"
    },
    "risk_info": {
      "terminal_type": "APP"
    }
  },
  "fin": {
    "settlement_config": {
      "settlement_via": "MARKET_ORDER",
      "destination_details": {
        "wallet_address": "Ox....",
        "currency": "PYUSD",
        "rail": "SOLANA"
      }
    }
  }
}
'
{
  "data": {
    "payment_id": "FIN_PROVIDED_UUID",
    "integration_type": "BYBIT",
    "provider_response": {
      "pay_id": "01JN6AZVEMAC8H9SED6JES3QH8",
      "terminal_type": "APP",
      "expire_time": 1740751953,
      "create_time": 1740748353,
      "checkout_link": "",
      "qr_content": "data:image/png;base64,/9j/2...f/Z"
    }
  }
}
Creates a payment order through the ByBit integration for USDT to PYUSD conversion. The payment flow supports QR code and e-commerce payment types with automatic settlement to a specified wallet address. Conditional Field Rules:
  • Either order_info.order_amount or order_info.quote_id must be provided, but not both.
  • When order_info.quote_id is not provided, order_info.order_amount and the fin object are required. A rebalance fee workflow will be executed in this case.
  • When order_info.quote_id is provided, order_info.order_amount and the fin object must not be included.
  • Providing both order_info.order_amount and order_info.quote_id results in a 422 error.
  • Providing both order_info.quote_id and the fin object results in a 422 error.
Provider Error Codes: The 428 response code is a placeholder. When errors occur from the payment provider (ByBit), the original status code from the provider will be forwarded as part of the error response (either 4xx or 5xx).

Authorizations

Authorization
string
header
required

Bearer token authentication. Obtain token from /v1/oauth/token endpoint

Body

application/json
integration_type
enum<string>
required

Integration provider type. Only BYBIT is allowed for now.

Available options:
BYBIT
Example:

"BYBIT"

order_info
object
required

Payment order information as per ByBit's current request payload.

Conditional requirements:

  • Either order_amount or quote_id must be provided, but not both.
  • When quote_id is not provided, order_amount is required.
  • When order_amount is not provided, quote_id is required.
  • Providing both order_amount and quote_id results in a 422 error.
fin
object

Additional data required for settlement.

Conditionally required when order_info.quote_id is not provided. Must not be provided when order_info.quote_id is present — providing both results in a 422 error. When this object is included, a rebalance fee workflow will be executed.

Response

Payment created successfully

data
object