Merchant Login

POST /api/merchant/auth/login

Authenticate merchant and receive bearer token for API access.

Request Parameters

Parameter Type Required Description
email string Required Merchant email address
password string Required Merchant password
device_name string Optional Device identifier for token (default: "API Access")

Request Example

cURL
JavaScript
Python
curl -X POST https://api.fyup.io/api/merchant/auth/login \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "email": "raguvasan@laabamone.com",
    "password": "Test@123",
    "device_name": "web_browser"
  }'
📮
Postman Collection Import ready-to-use collection
Response
200 Success
{
  "success": true,
  "message": "Login successful",
  "data": {
    "access_token": "76|fyup_oO0lO2rONY8mRsxfTBPynTSZl0mVwwwwWrEE2JDY59db70f6",
    "token_type": "Bearer",
    "expires_in": null,
    "merchant": {
      "id": 12,
      "merchant_code": "MVROXRCYT",
      "business_name": "Sample Merchant",
      "email": "raguvasan@laabamone.com",
      "name": "Sample Merchant",
      "role": "merchant"
    }
  }
}
LIVE RESPONSE
Click "Test API Call" to see live response

Trader Login

POST /api/trader/auth/login

Authenticate trader and receive API token for subsequent requests.

Request Parameters

Parameter Type Required Description
email string Required Trader email address
password string Required Trader password
device_name string Required Device identifier (e.g. "web_browser")
device_id string Required Unique device ID
latitude number Required GPS latitude coordinate
longitude number Required GPS longitude coordinate
ip_address string Required IP address of the device

Request Example

curl -X POST https://api.fyup.io/api/trader/auth/login \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "email": "john.trader@example.com",
  "password": "SecurePass@123",
  "device_name": "web_browser",
  "device_id": "device_12345",
  "latitude": "12.9716",
  "longitude": "77.5946",
  "ip_address": "103.127.29.123"
}'
Response
200 Success
{
  "success": true,
  "message": "Login successful",
  "data": {
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
    "trader": {
      "id": 123,
      "name": "John Trader",
      "email": "john.trader@example.com",
      "status": "active"
    }
  }
}

Get Trader Profile

GET /api/trader/auth/me

Get authenticated trader's profile information.

Headers

Header Value Required Description
Authorization Bearer {token} Required Token from login response
Accept application/json Required Response format
Response
200 Success
{
  "success": true,
  "data": {
    "id": 123,
    "trader_code": "TRD-123456",
    "name": "John Trader",
    "email": "john.trader@example.com",
    "phone": "+919876543210",
    "whatsapp": "+919876543210",
    "type": "trader",
    "trader_type": "individual",
    "status": "active",
    "kyc_status": "verified",
    "available_balance": 15000.00,
    "locked_balance": 0.00,
    "float_balance": 0.00,
    "connectivity_status": "online",
    "is_available": true,
    "available": "Yes",
    "created_at": "2024-01-15T10:30:00Z"
  }
}

List Transactions

GET /api/trader/transactions

Get paginated list of trader's transactions.

Response
200 Success
{
  "success": true,
  "data": {
    "current_page": 1,
    "data": [
      {
        "id": 1,
        "amount": 5000,
        "status": "completed",
        "created_at": "2024-01-15T10:30:00Z"
      }
    ],
    "total": 50
  }
}

List Pools

GET /api/trader/pools

Get list of available trader pools.

Response
200 Success
{
  "success": true,
  "message": "Pools retrieved successfully",
  "data": {
    "pools": [
      {
        "id": 1,
        "name": "Premium Pool",
        "description": "High-value transactions pool",
        "pool_type": "premium",
        "risk_level": "premium",
        "risk_label": "Premium",
        "amounts": {
          "min": 10000,
          "max": 100000,
          "formatted_min": "₹10,000.00",
          "formatted_max": "₹100,000.00",
          "range": "₹10,000.00 - ₹100,000.00"
        },
        "currency": "INR",
        "trader_margin": {
          "type": "fixed",
          "fixed": 2.5,
          "min": null,
          "max": null,
          "formatted": "2.50%"
        },
        "commission": {
          "rate": 2.5,
          "formatted": "2.50%"
        },
        "priority": 1,
        "traders": {
          "total": 15,
          "active": 12,
          "max": 20,
          "current": 15,
          "capacity_status": "available"
        },
        "performance": {
          "success_rate": 95.5,
          "total_transactions": 1250,
          "total_volume": 5000000,
          "formatted_volume": "₹5,000,000.00"
        },
        "status": "active",
        "is_active": true,
        "trader_status": {
          "is_joined": false,
          "status": "not_joined",
          "can_join": true
        },
        "created_at": "Jan 01, 2026",
        "updated_at": "Jan 10, 2026 10:30 AM"
      }
    ],
    "summary": {
      "total_pools": 1,
      "active_pools": 1
    }
  }
}

Join Pool

POST /api/trader/pool-join/{poolId}

Join a specific trader pool by providing the pool ID. Requires authentication.

URL Parameters

Parameter Type Required Description
poolId integer Required The ID of the pool to join

Headers

Header Value Required Description
Authorization Bearer {token} Required Authentication token from trader login
Content-Type application/json Required Request content type
Accept application/json Required Response content type

Request Example

cURL
JavaScript
Python
curl -X POST https://api.fyup.io/api/trader/pool-join/15 \
  -H "Authorization: Bearer {your_auth_token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"
const response = await fetch('/api/trader/pool-join/15', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${authToken}`,
    'Content-Type': 'application/json',
    'Accept': 'application/json'
  }
});

const result = await response.json();
console.log(result);
import requests

headers = {
    'Authorization': f'Bearer {auth_token}',
    'Content-Type': 'application/json',
    'Accept': 'application/json'
}

response = requests.post('https://api.fyup.io/api/trader/pool-join/15', headers=headers)
result = response.json()
print(result)
Response
200 Success
{
  "success": true,
  "message": "Successfully joined the pool!",
  "status": "active",
  "pool_id": 12,
  "requires_deposit": false,
  "deposit_amount": null
}
Error Response
400 Bad Request
{
  "success": false,
  "message": "You are already part of this pool or have a pending request.",
  "status": "pending"
}

Get Pool Join Status

GET /api/trader/pool-join-status

Get the current trader's pool join status across all pools.

Headers

Header Value Required Description
Authorization Bearer {token} Required Authentication token from trader login
Accept application/json Required Response content type

Request Example

curl -X GET https://api.fyup.io/api/trader/pool-join-status \
  -H "Authorization: Bearer {your_auth_token}" \
  -H "Accept: application/json"
Response
200 Success
{
  "success": true,
  "joined_pools": {
    "12": {
      "pool_id": 12,
      "status": "active",
      "joined_at": "2025-12-26T10:30:00Z",
      "required_deposit_amount": null
    },
    "8": {
      "pool_id": 8,
      "status": "pending",
      "joined_at": "2026-01-01T15:20:00Z",
      "required_deposit_amount": 10000
    }
  }
}

Generate Order

POST /api/v1/orders/generate

Create a new order for payment processing with merchant and customer details.

🔑 Authentication Required: You must first login using the Merchant Login API to get a valid Bearer token. Use that token in the Authorization header for this request.
✅ Current Test Data: The request uses valid IDs from the database:
• Merchant ID: 4 (Logistics And Transportation)
• Category ID: 1 (Gaming) or 4 (Logistics)
• Pool ID: 12 (IGAMING MEDIUM RISK)
🔍 Understanding the Response:
• UUID: Will be null for API testing. Add "is_customer_submission": true for real customer orders
• Assigned Trader: Will be null initially. Use the Assign Trader API below to assign trader ID 2
• Status: Starts as "pending", becomes "assigned" after trader assignment

Response Fields

Field Type Description
uuid string Unique UUID generated when order is submitted (created on API call)
order_id integer Unique order identifier in database
order_reference string Human-readable order reference code
status string Current order status (pending, assigned, completed, etc.)

Request Parameters

Parameter Type Required Description
merchant_id integer Required Merchant ID (available: 4)
merchant_category_id integer Required Merchant Category ID (available: 1-Gaming, 4-Logistics)
pool_id integer Required Pool ID for processing (available: 12)
type string Required Order type (PayIN or PayOut)
amount number Required Order amount (1-999999.99)
customer_mobile string Required Customer mobile number (10 digits)
customer_name string Required Customer name (letters and spaces only)
invoice_number string Optional Invoice number (max 100 chars)
notes string Optional Additional notes (max 500 chars)
Request Example
curl -X POST https://api.fyup.io/api/v1/orders/generate \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "merchant_id": 4,
    "merchant_category_id": 1,
    "pool_id": 12,
    "type": "PayIN",
    "amount": 5000.00,
    "customer_mobile": "9876543210",
    "customer_name": "John Doe",
    "invoice_number": "INV-001",
    "notes": "Order for premium service"
  }'
Response
201 Created
{
  "success": true,
  "message": "Order generated successfully.",
  "data": {
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "order_id": 123,
    "order_reference": "ORD20251231ABC123",
    "status": "pending",
    "type": "PayIN",
    "amount": "5000.00",
    "customer_mobile": "9876543210",
    "customer_name": "John Doe",
    "invoice_number": "INV-001",
    "notes": "Order for premium service",
    "merchant": {
      "id": 1,
      "name": "Sample Merchant",
      "code": "MERCHANT001"
    },
    "merchant_category": {
      "id": 2,
      "name": "E-Commerce"
    },
    "pool": {
      "id": 3,
      "name": "Premium Pool",
      "type": "instant"
    },
    "created_at": "2025-12-31T12:00:00.000000Z",
    "estimated_processing_time": "15-30 minutes"
  }
}

Get Latest Order Details

GET /api/v1/orders/details

Get the latest order details for the authenticated merchant.

🚀 Auto-Assignment: When fetching order details, if the order is in "pending" status and has no assigned trader, this API will automatically assign trader ID 14 (Riswan) and change status to "assigned".
📝 Response Changes:
Status: Will change from "pending" to "assigned" if auto-assignment occurs
Assigned Trader: Will contain trader details (ID: 14 - Riswan)
Assigned At: Will show the timestamp when assignment happened

Headers

Header Value Required Description
Authorization Bearer {token} Required Bearer token from merchant login
Accept application/json Required Response format

Response

{
  "success": true,
  "data": {
    "order_id": 20,
    "order_reference": "ORD20251231452AA6",
    "status": "assigned",
    "type": "PayIN",
    "amount": "2500.00",
    "customer_mobile": "9876543211",
    "customer_name": "Jane Smith",
    "invoice_number": "INV-002",
    "notes": "Test order via API",
    "merchant": {
      "id": 3,
      "name": "Sample Merchant",
      "code": "MERCHANT123"
    },
    "merchant_category": {
      "id": 2,
      "name": "E-commerce"
    },
    "pool": {
      "id": 16,
      "name": "Premium Pool",
      "type": "instant"
    },
    "assigned_trader": {
      "id": 14,
      "name": "Riswan",
      "email": "blindarkman@gmail.com",
      "upi_id": "testuser@okbank"
    },
    "assigned_at": "2026-01-01T06:30:00.000000Z",
    "processed_at": null,
    "completed_at": null,
    "created_at": "2025-12-31T09:23:00.000000Z",
    "updated_at": "2025-12-31T09:23:00.000000Z"
  }
}
Request Example
curl -X GET https://api.fyup.io/api/v1/orders/ORD20251231ABC123 \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
200 Success
{
  "success": true,
  "data": {
    "order_id": 123,
    "order_reference": "ORD20251231ABC123",
    "status": "pending",
    "type": "PayIN",
    "amount": "5000.00",
    "customer_mobile": "9876543210",
    "customer_name": "John Doe",
    "invoice_number": "INV-001",
    "notes": "Order for premium service",
    "merchant": {
      "id": 1,
      "name": "Sample Merchant",
      "code": "MERCHANT001"
    },
    "merchant_category": {
      "id": 2,
      "name": "E-Commerce"
    },
    "pool": {
      "id": 3,
      "name": "Premium Pool",
      "type": "instant"
    },
    "assigned_trader": null,
    "assigned_at": null,
    "processed_at": null,
    "completed_at": null,
    "created_at": "2025-12-31T12:00:00.000000Z",
    "updated_at": "2025-12-31T12:00:00.000000Z"
  }
}

Merchant Orders List

GET /api/v1/merchant/orders

Get a list of all orders for the authenticated merchant with optional filtering and pagination.

Query Parameters

Parameter Type Required Description
status string Optional Filter by status: pending, assigned, processing, completed, failed, cancelled
type string Optional Filter by type: PayIn, PayOut
from_date date Optional Filter orders from this date (YYYY-MM-DD)
to_date date Optional Filter orders until this date (YYYY-MM-DD)
per_page integer Optional Number of orders per page (1-100, default: 15)
page integer Optional Page number (default: 1)

Authentication

API Key Required: Use your merchant API key in the Authorization header

Request Example
curl -X GET "https://api.fyup.io/api/v1/merchant/orders?status=pending&per_page=20" \
  -H "Authorization: Bearer pk_live_your_merchant_api_key_here"
Response
200 Success
{
  "success": true,
  "message": "Orders retrieved successfully",
  "data": {
    "orders": [
      {
        "order_id": 123,
        "order_reference": "ORD20251231ABC123",
        "status": "pending",
        "type": "PayIN",
        "amount": 5000.00,
        "customer_mobile": "9876543210",
        "customer_name": "John Doe",
        "invoice_number": "INV-001",
        "assigned_trader": null,
        "created_at": "2025-12-31T12:00:00.000000Z",
        "updated_at": "2025-12-31T12:00:00.000000Z"
      }
    ],
    "pagination": {
      "current_page": 1,
      "per_page": 20,
      "total": 150,
      "last_page": 8,
      "from": 1,
      "to": 20
    }
  }
}

Merchant Order Details

GET /api/v1/merchant/orders/{identifier}

Get detailed information about a specific order by order reference or ID. Merchants can only access their own orders.

Path Parameters

Parameter Type Required Description
identifier string Required Order reference (e.g., ORD20251231ABC123) or order ID

Authentication

API Key Required: Use your merchant API key in the Authorization header

Request Example
curl -X GET https://api.fyup.io/api/v1/merchant/orders/ORD20251231ABC123 \
  -H "Authorization: Bearer pk_live_your_merchant_api_key_here"
Response
200 Success
{
  "success": true,
  "message": "Order details retrieved successfully",
  "data": {
    "order": {
      "order_id": 123,
      "order_reference": "ORD20251231ABC123",
      "status": "pending",
      "type": "PayIN",
      "amount": 5000.00,
      "customer_mobile": "9876543210",
      "customer_name": "John Doe",
      "invoice_number": "INV-001",
      "notes": "Order for premium service",
      "merchant": {
        "id": 1,
        "name": "Sample Merchant",
        "code": "MERCHANT001"
      },
      "merchant_category": {
        "id": 2,
        "name": "E-Commerce"
      },
      "pool": {
        "id": 3,
        "name": "Premium Pool",
        "type": "instant"
      },
      "assigned_trader": null,
      "assigned_at": null,
      "processed_at": null,
      "completed_at": null,
      "created_at": "2025-12-31T12:00:00.000000Z",
      "updated_at": "2025-12-31T12:00:00.000000Z"
    }
  }
}

Get Recent Orders

GET /api/trader/orders/recent

Retrieve recent orders for the authenticated trader. Trader is automatically identified from the Bearer token.

Query Parameters

Parameter Type Required Description
limit integer Optional Number of orders to return (default: 20, max: 100)
page integer Optional Page number for pagination (default: 1)
status string Optional Filter by status: completed, failed, refunded, cancelled
days integer Optional Number of days to look back (default: 30, max: 90)

Headers

Header Value Required
Authorization Bearer {your_token} Yes
Content-Type application/json Yes
Accept application/json Yes

Success Response

200 OK
{
  "success": true,
  "message": "Recent orders retrieved successfully",
  "data": {
    "orders": [
      {
        "order_id": 123,
        "pool_name": "Dream11",
        "amount": "5000.00",
        "commission": null,
        "timing": {
          "created_at": "2025-12-31 09:23:00",
          "updated_at": "2025-12-31 09:23:00",
          "processing_time": null
        },
        "date_time": "2025-12-31 09:23:00"
      }
    ],
    "total_count": 10
  }
}
Request Example
curl -X GET https://api.fyup.io/api/trader/orders/recent \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"
Response
200 Success
{
  "success": true,
  "message": "Recent orders retrieved successfully",
  "data": {
    "orders": [
      {
        "order_id": 123,
        "pool_name": "Dream11",
        "amount": "5000.00",
        "commission": null,
        "timing": {
          "created_at": "2025-12-31 09:23:00",
          "updated_at": "2025-12-31 09:23:00",
          "processing_time": null
        },
        "date_time": "2025-12-31 09:23:00"
      }
    ],
    "total_count": 10
  }
}

Get Pending Orders

GET /api/trader/orders/pending

Retrieve all pending orders assigned to the authenticated trader. Trader is automatically identified from the authentication token.

Query Parameters

Parameter Type Required Description
limit integer Optional Number of orders per page (default: 20, max: 100)
page integer Optional Page number for pagination (default: 1)

Headers

Header Value Required
Authorization Bearer {your_token} Yes
Content-Type application/json Yes
Accept application/json Yes

Success Response

200 OK
{
  "success": true,
  "message": "Pending orders retrieved successfully",
  "data": {
    "orders": [
      {
        "order_id": 456,
        "pool_name": "IGAMING LOW RISK POOL",
        "amount": "7500.00",
        "commission": null,
        "timing": {
          "created_at": "2025-12-31 10:15:00",
          "updated_at": "2025-12-31 10:15:00",
          "processing_time": null
        },
        "date_time": "2025-12-31 10:15:00"
      }
    ],
    "total_count": 16
  }
}
Request Example
curl -X GET https://api.fyup.io/api/trader/orders/pending \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"
Response
200 Success
{
  "success": true,
  "message": "Pending orders retrieved successfully",
  "data": {
    "orders": [
      {
        "order_id": 456,
        "pool_name": "IGAMING LOW RISK POOL",
        "amount": "7500.00",
        "commission": null,
        "timing": {
          "created_at": "2025-12-31 10:15:00",
          "updated_at": "2025-12-31 10:15:00",
          "processing_time": null
        },
        "date_time": "2025-12-31 10:15:00"
      }
    ],
    "total_count": 16
  }
}

Accept Order

POST /api/trader/orders/{orderId}/accept

Accept a pending order assigned to the authenticated trader. Requires transaction number validation before accepting. Order status changes from pending/assigned to assigned.

Path Parameters

Parameter Type Required Description
orderId integer Required Unique order identifier (order ID or order reference)

Request Body

Parameter Type Required Description
transaction_number string Required Transaction number from the order. Must match the order's transaction_number field

Headers

Header Value Required
Authorization Bearer {your_token} Yes
Content-Type application/json Yes
Accept application/json Yes

Success Response

200 OK
{
  "success": true,
  "message": "Order accepted successfully",
  "data": {
    "order_id": 123,
    "order_reference": "ORD-F27EEB0",
    "pool_name": "Dream11",
    "amount": 5000.00,
    "status": "assigned",
    "action_taken": "accept",
    "accepted_at": "2026-01-08T10:30:00Z"
  },
  "timestamp": "2026-01-08T10:30:00Z"
}

Error Responses

422 Unprocessable Entity
{
  "success": false,
  "message": "The given transaction number is wrong",
  "timestamp": "2026-01-08T10:30:00Z"
}
404 Not Found
{
  "success": false,
  "message": "Order not found or not in pending status",
  "timestamp": "2026-01-08T10:30:00Z"
}
Request Example
curl -X POST https://api.fyup.io/api/trader/orders/123/accept \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "transaction_number": "TXN123456789"
  }'
Response
200 Success
{
  "success": true,
  "message": "Order accepted successfully",
  "data": {
    "order_id": 123,
    "order_reference": "ORD-F27EEB0",
    "pool_name": "Dream11",
    "amount": 5000.00,
    "status": "assigned",
    "action_taken": "accept",
    "accepted_at": "2026-01-08T10:30:00Z"
  },
  "timestamp": "2026-01-08T10:30:00Z"
}

Reject Order

POST /api/trader/orders/{orderId}/reject

Reject a pending order assigned to the authenticated trader. Order status changes to cancelled and trader assignment is removed.

Path Parameters

Parameter Type Required Description
orderId integer Required Unique order identifier (order ID or order reference)

Request Body (Optional)

Parameter Type Required Description
reason string Optional Reason for rejection (max 500 characters)

Headers

Header Value Required
Authorization Bearer {your_token} Yes
Content-Type application/json Yes
Accept application/json Yes

Success Response

200 OK
{
  "success": true,
  "message": "Order rejected successfully",
  "data": {
    "order_id": 123,
    "order_reference": "ORD-F27EEB0",
    "status": "cancelled",
    "action_taken": "reject",
    "rejected_at": "2026-01-08T10:30:00Z"
  },
  "timestamp": "2026-01-08T10:30:00Z"
}
Request Example (With Reason)
curl -X POST https://api.fyup.io/api/trader/orders/123/reject \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "reason": "Unable to process at this time"
  }'
Request Example (Without Reason)
curl -X POST https://api.fyup.io/api/trader/orders/123/reject \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"
Response
200 Success
{
  "success": true,
  "message": "Order rejected successfully",
  "data": {
    "order_id": 123,
    "order_reference": "ORD-F27EEB0",
    "status": "cancelled",
    "action_taken": "reject",
    "rejected_at": "2026-01-08T10:30:00Z"
  },
  "timestamp": "2026-01-08T10:30:00Z"
}

Update Payment Details

POST /api/trader/orders/{orderId}/update-payment

Update payment UTR number and upload payment proof screenshot for an assigned order. Order status automatically changes to "processing" after successful update.

Path Parameters

Parameter Type Required Description
orderId integer Required Unique order identifier (order ID or order reference)

Request Body

Parameter Type Required Description
payment_utr string Required Payment UTR/Reference number (max 255 characters)
payment_proof file Required Payment proof screenshot (JPEG, JPG, PNG, WEBP, max 5MB)

Headers

Header Value Required
Authorization Bearer {your_token} Yes
Content-Type multipart/form-data Yes
Accept application/json Yes

Business Rules

  • Only the assigned trader can update payment details
  • Payment updates allowed only for orders with status: pending, assigned, accepted, processing
  • Order status automatically changes to "processing" after successful update
  • Old payment proof is automatically deleted when uploading a new one
  • Payment proof is stored in storage/app/public/payment-proofs/

Success Response

200 OK
{
  "success": true,
  "message": "Payment details updated successfully",
  "data": {
    "order_id": 123,
    "order_reference": "ORD20260108ABC123",
    "payment_utr": "UTR123456789",
    "payment_proof_url": "https://api.fyup.io/storage/payment-proofs/payment_proof_ORD20260108ABC123_1736319600.jpg",
    "status": "processing",
    "updated_at": "2026-01-08T10:30:00.000000Z"
  },
  "timestamp": "2026-01-08T10:30:00.000000Z"
}

Error Responses

400 Bad Request
{
  "success": false,
  "message": "Trader profile not found.",
  "timestamp": "2026-01-08T10:30:00.000000Z"
}
404 Not Found
{
  "success": false,
  "message": "Order not found or access denied",
  "timestamp": "2026-01-08T10:30:00.000000Z"
}
422 Unprocessable Entity
{
  "success": false,
  "message": "Order status does not allow payment updates. Current status: completed",
  "timestamp": "2026-01-08T10:30:00.000000Z"
}
422 Validation Error
{
  "message": "The payment utr field is required. (and 1 more error)",
  "errors": {
    "payment_utr": [
      "The payment utr field is required."
    ],
    "payment_proof": [
      "The payment proof field is required."
    ]
  }
}
Request Example (cURL)
curl -X POST https://api.fyup.io/api/trader/orders/123/update-payment \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -F "payment_utr=UTR123456789" \
  -F "payment_proof=@/path/to/payment_screenshot.jpg"
Request Example (JavaScript/Axios)
const formData = new FormData();
formData.append('payment_utr', 'UTR123456789');
formData.append('payment_proof', imageFile);

const response = await axios.post(
  'https://api.fyup.io/api/trader/orders/123/update-payment',
  formData,
  {
    headers: {
      'Authorization': 'Bearer YOUR_TOKEN',
      'Content-Type': 'multipart/form-data'
    }
  }
);
Request Example (PHP)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.fyup.io/api/trader/orders/123/update-payment');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_TOKEN'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    'payment_utr' => 'UTR123456789',
    'payment_proof' => new CURLFile('/path/to/payment_screenshot.jpg')
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
Success Response
200 Success
{
  "success": true,
  "message": "Payment details updated successfully",
  "data": {
    "order_id": 123,
    "order_reference": "ORD20260108ABC123",
    "payment_utr": "UTR123456789",
    "payment_proof_url": "https://api.fyup.io/storage/payment-proofs/payment_proof_ORD20260108ABC123_1736319600.jpg",
    "status": "processing",
    "updated_at": "2026-01-08T10:30:00.000000Z"
  },
  "timestamp": "2026-01-08T10:30:00.000000Z"
}

⚠️ DEPRECATED: Accept/Decline Order

POST /api/v1/orders/action

This endpoint is deprecated. Please use the new trader-specific endpoints:

  • Use /api/trader/orders/{orderId}/accept to accept orders
  • Use /api/trader/orders/{orderId}/reject to reject orders
  • Use /api/trader/orders/{orderId}/update-payment to update payment details

Request Parameters (Legacy)

Parameter Type Required Description
order_id integer Required Unique order identifier
action string Required Action to perform: "accept" or "decline"

Headers

Header Value Required
Authorization Bearer {your_token} Yes
Content-Type application/json Yes
Accept application/json Yes

Success Response

200 OK
{
  "success": true,
  "message": "Order accepted successfully",
  "data": {
    "order_id": 123,
    "pool_name": "Dream11",
    "amount": "5000.00",
    "commission": null,
    "timing": {
      "created_at": "2025-12-31 09:23:00",
      "updated_at": "2025-12-31 09:25:00",
      "accepted_at": "2025-12-31 09:25:00"
    },
    "date_time": "2025-12-31 09:25:00",
    "status": "accepted",
    "action_taken": "accept"
  }
}
Request Example (Accept)
curl -X POST https://api.fyup.io/api/v1/orders/action \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "order_id": 123,
    "action": "accept"
  }'
Request Example (Decline)
curl -X POST https://api.fyup.io/api/v1/orders/action \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "order_id": 123,
    "action": "decline"
  }'
Response (Accept)
200 Success
{
  "success": true,
  "message": "Order accepted successfully",
  "data": {
    "order_id": 123,
    "pool_name": "Dream11",
    "amount": "5000.00",
    "commission": null,
    "timing": {
      "created_at": "2025-12-31 09:23:00",
      "updated_at": "2025-12-31 09:25:00",
      "accepted_at": "2025-12-31 09:25:00"
    },
    "date_time": "2025-12-31 09:25:00",
    "status": "accepted",
    "action_taken": "accept"
  }
}
Response (Decline)
200 Success
{
  "success": true,
  "message": "Order declined successfully",
  "data": {
    "order_id": 123,
    "pool_name": "Dream11",
    "amount": "5000.00",
    "commission": null,
    "timing": {
      "created_at": "2025-12-31 09:23:00",
      "updated_at": "2025-12-31 09:25:00",
      "declined_at": "2025-12-31 09:25:00"
    },
    "date_time": "2025-12-31 09:25:00",
    "status": "cancelled",
    "action_taken": "decline"
  }
}

Firebase Notification

POST /api/v1/firebase/send-notification

Send Firebase notification to trader's mobile device. This API is designed for mobile team integration to send push notifications to traders.

Request Parameters

Parameter Type Required Description
trader_id integer Required ID of the trader to send notification to
title string Required Notification title displayed on device
message string Required Notification message content
message_status string Required Status of the message (e.g., "sent", "delivered")

Headers

Header Value Required
Authorization Bearer {your_token} Yes
Content-Type application/json Yes
Accept application/json Yes

Success Response

200 OK
{
  "success": true,
  "message": "Firebase notification sent successfully",
  "data": {
    "trader_id": 14,
    "title": "New Order Alert",
    "message": "You have a new order worth ₹5000 available",
    "message_status": "sent",
    "message_status_app": "new",
    "notification_id": "firebase_123456789",
    "sent_at": "2025-12-31 10:30:00"
  }
}
Request Example
curl -X POST https://api.fyup.io/api/v1/firebase/send-notification \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "trader_id": 14,
    "title": "New Order Alert",
    "message": "You have a new order worth ₹5000 available",
    "message_status": "sent"
  }'
Success Response
200 Success
{
  "success": true,
  "message": "Firebase notification sent successfully",
  "data": {
    "trader_id": 14,
    "title": "New Order Alert",
    "message": "You have a new order worth ₹5000 available",
    "message_status": "sent",
    "message_status_app": "new",
    "notification_id": "firebase_123456789",
    "sent_at": "2025-12-31 10:30:00"
  }
}
Error Response (Trader Not Found)
422 Unprocessable Entity
{
  "success": false,
  "message": "Validation failed",
  "errors": {
    "trader_id": [
      "The selected trader is invalid."
    ]
  }
}

Wallet Overview

GET /api/trader/wallet/overview

Get complete wallet overview including balance, profit, exchange rate, deposit address, and formatted data for mobile display.

Headers

HeaderValueRequired
AuthorizationBearer {your_token}Yes
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
Request Example
curl -X GET https://api.fyup.io/api/trader/wallet/overview \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"
Success Response
200 Success
{
  "success": true,
  "message": "Wallet overview retrieved successfully",
  "data": {
    "wallet_id": "#1ru2154F", 
    "balance": {
      "inr": "262700.00",
      "usdt": 2840.0000
    },
    "profit": "0.00",
    "exchange_rate": 92.5,
    "deposit_wallet_address": "TA97smfDpAgW1bAt7z1vbHQa6M3hF3ibKZ",
    "formatted": {
      "balance_inr": "₹262,700.00",
      "balance_usdt": "USDT 2,840.0000",
      "profit": "₹0.00"
    }
  }
}

Wallet Balance

GET /api/trader/wallet/balance

Get only wallet balance information for quick checks (lightweight endpoint).

Headers

HeaderValueRequired
AuthorizationBearer {your_token}Yes
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
Request Example
curl -X GET https://api.fyup.io/api/trader/wallet/balance \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"
Success Response
200 Success
{
  "success": true,
  "message": "Balance retrieved successfully",
  "data": {
    "balance": {
      "inr": 262700.00,
      "usdt": 2840.0000,
      "formatted_inr": "₹262,700.00",
      "formatted_usdt": "USDT 2,840.0000"
    },
    "exchange_rate": 92.5
  }
}

Wallet Transactions

GET /api/trader/wallet/transactions

Get paginated transaction history with optional filtering by transaction type.

Query Parameters

ParameterTypeRequiredDescription
per_pageintegerOptionalNumber of transactions per page (default: 20)
pageintegerOptionalPage number (default: 1)
typestringOptionalFilter by type: deposit, withdraw, transfer, profit

Headers

HeaderValueRequired
AuthorizationBearer {your_token}Yes
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
Request Example
curl -X GET "https://api.fyup.io/api/trader/wallet/transactions?page=1&per_page=10&type=deposit" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"
Success Response
200 Success
{
  "success": true,
  "message": "Transaction history retrieved successfully",
  "data": [
    {
      "id": 54,
      "transaction_number": "TXN-6955DAAA78F1B",
      "type": "Deposit",
      "direction": "credit",
      "amount": {
        "inr": "1000.00",
        "usdt": "10.8108",
        "formatted_inr": "₹1,000.00",
        "formatted_usdt": "USDT 10.8108"
      },
      "exchange_rate": "92.5000",
      "status": "Pending",
      "description": "USDT deposit",
      "created_at": "2026-01-01T02:23:38.000000Z",
      "formatted_date": "Jan 01, 2026 2:23 AM",
      "relative_time": "2 hours ago"
    }
  ],
  "pagination": {
    "current_page": 1,
    "last_page": 3,
    "per_page": 10,
    "total": 25,
    "has_more_pages": true
  }
}

Deposit Information

GET /api/trader/wallet/deposit-info

Get deposit wallet address, exchange rate, and deposit instructions.

Headers

HeaderValueRequired
AuthorizationBearer {your_token}Yes
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
Request Example
curl -X GET https://api.fyup.io/api/trader/wallet/deposit-info \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"
Success Response
200 Success
{
  "success": true,
  "message": "Deposit information retrieved successfully",
  "data": {
    "deposit_wallet_address": "TA97smfDpAgW1bAt7z1vbHQa6M3hF3ibKZ",
    "exchange_rate": 92.5,
    "currency": "INR",
    "crypto_currency": "USDT",
    "network": "TRC20",
    "minimum_deposit": 10,
    "note": "Only send USDT (TRC20) to this address. Minimum deposit is 10 USDT."
  }
}

Wallet Statistics

GET /api/trader/wallet/statistics

Get comprehensive wallet statistics for mobile dashboard display.

Headers

HeaderValueRequired
AuthorizationBearer {your_token}Yes
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
Request Example
curl -X GET https://api.fyup.io/api/trader/wallet/statistics \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"
Success Response
200 Success
{
  "success": true,
  "message": "Wallet statistics retrieved successfully",
  "data": {
    "current_balance": {
      "inr": 262700.00,
      "formatted": "₹262,700.00"
    },
    "total_profit": {
      "inr": 15000.00,
      "formatted": "₹15,000.00"
    },
    "total_deposits": {
      "inr": 500000.00,
      "formatted": "₹500,000.00"
    },
    "total_withdrawals": {
      "inr": 252300.00,
      "formatted": "₹252,300.00"
    },
    "recent_transactions_count": 25,
    "net_gain": {
      "inr": 262700.00,
      "formatted": "₹262,700.00"
    }
  }
}

Initialize Deposit

POST /api/trader/deposit/initialize

Initialize a new deposit transaction for the authenticated trader. This is step 1 of the 3-step deposit process.

Request Body

Field Type Required Description
amount Number Yes Deposit amount in INR
network String No Crypto network (default: TRC-20)
Request Example
curl -X POST https://api.fyup.io/api/trader/deposit/initialize \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 5000,
    "network": "TRC-20"
  }'
Response
201 Created
{
  "success": true,
  "message": "Deposit initialized successfully",
  "data": {
    "deposit_id": "DEP-676589D5A1234",
    "amount": {
      "inr": 5000,
      "usdt": 58.82,
      "formatted_inr": "₹5,000",
      "formatted_usdt": "58.82 USDT"
    },
    "wallet_address": "TQRKdjHWA9xqzpqdddXW7F3vGeDJpQ8oid",
    "qr_code": "data:image/png;base64,iVBORw0KGgoAAAANS...",
    "network": "TRC-20",
    "exchange_rate": {
      "rate": 84.99,
      "formatted": "₹84.99 per USDT"
    },
    "expires_at": "2025-12-31T10:30:00.000000Z"
  }
}

Submit Deposit Details

POST /api/trader/deposit/submit

Submit deposit transaction details and proof of payment. This is step 2 of the 3-step deposit process.

Request Body (multipart/form-data)

Field Type Required Description
deposit_id String Yes Deposit ID from initialize step
transaction_hash String Yes Blockchain transaction hash/reference
payment_proof File/String Yes Payment proof: file upload (jpg, png, pdf, max 5MB) OR base64 image string
notes String No Additional notes or comments
Request Example (File Upload)
curl -X POST https://api.fyup.io/api/trader/deposit/submit \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -F "deposit_id=DEP-676589D5A1234" \
  -F "transaction_hash=0xa1b2c3d4e5f6..." \
  -F "payment_proof=@payment_screenshot.jpg" \
  -F "notes=Payment sent successfully"
Request Example (Base64 Image - Mobile Apps)
curl -X POST https://api.fyup.io/api/trader/deposit/submit \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "deposit_id": "DEP-676589D5A1234",
    "transaction_hash": "0xa1b2c3d4e5f6...",
    "payment_proof": "data:image/png;base64,iVBORw0KGgoAAAANSU...",
    "notes": "Payment sent via mobile app"
  }'
Response
200 Success
{
  "success": true,
  "message": "Deposit details submitted successfully",
  "data": {
    "deposit_id": "DEP-676589D5A1234",
    "transaction_number": "TXN-6556290DC4CAE",
    "status": "pending_verification",
    "submitted_at": "2025-12-31T10:15:00.000000Z",
    "estimated_verification_time": "1-2 hours"
  }
}

Get Deposit Confirmation

GET /api/trader/deposit/confirmation?transaction_number={transactionNumber}

Get confirmation details for a deposit transaction. This is step 3 of the 3-step deposit process.

Query Parameters

Parameter Type Required Description
transaction_number string Required Transaction number from submit deposit response

Request Example

curl -X GET "https://api.fyup.io/api/trader/deposit/confirmation?transaction_number=TXN-WPN8F01BE7IO" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Accept: application/json"
Request Example
curl -X GET https://api.fyup.io/api/trader/deposit/confirmation/DEP-676589D5A1234 \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
200 Success
{
  "success": true,
  "message": "Deposit confirmation retrieved successfully",
  "data": {
    "deposit_id": "DEP-676589D5A1234",
    "transaction_number": "TXN-6556290DC4CAE",
    "status": "pending_verification",
    "amount": {
      "inr": 5000,
      "usdt": 58.82,
      "formatted_inr": "₹5,000",
      "formatted_usdt": "58.82 USDT"
    },
    "transaction_hash": "0xa1b2c3d4e5f6...",
    "payment_proof_url": "https://api.fyup.io/storage/payment-proofs/proof123.jpg",
    "network": "TRC-20",
    "submitted_at": "2025-12-31T10:15:00.000000Z",
    "estimated_verification_time": "1-2 hours",
    "what_next": [
      "Your deposit is being verified by our team",
      "You will receive a notification once verification is complete",
      "Funds will be credited to your wallet within 1-2 hours",
      "Contact support if you have any questions"
    ]
  }
}

Get Deposit History

GET /api/trader/deposit/history

Get paginated list of all deposit transactions for the authenticated trader.

Query Parameters

Parameter Type Required Description
page Integer No Page number (default: 1)
per_page Integer No Items per page (default: 15, max: 50)
status String No Filter by status (pending, approved, rejected)
Request Example
curl -X GET "https://api.fyup.io/api/trader/deposit/history?page=1&per_page=10&status=pending" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
200 Success
{
  "success": true,
  "message": "Deposit history retrieved successfully",
  "data": [
    {
      "deposit_id": "DEP-676589D5A1234",
      "transaction_number": "TXN-6556290DC4CAE",
      "amount": {
        "inr": 5000,
        "usdt": 58.82,
        "formatted_inr": "₹5,000",
        "formatted_usdt": "58.82 USDT"
      },
      "status": "pending_verification",
      "transaction_hash": "0xa1b2c3d4e5f6...",
      "network": "TRC-20",
      "submitted_at": "2025-12-31T10:15:00.000000Z",
      "verified_at": null
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 10,
    "total": 25,
    "last_page": 3,
    "from": 1,
    "to": 10
  }
}

Create Withdrawal Request

POST /api/trader/withdraw/create

Create a new withdrawal request. Simply provide the INR and USDT amounts - admin will process to your registered payment method.

Request Parameters

Parameter Type Required Description
inr_amount Decimal Yes Amount in INR to withdraw (minimum: 100)
usdt_amount Decimal Yes Amount in USDT equivalent (minimum: 1)
notes String No Optional notes (max 500 characters)
Request Example
curl -X POST "https://api.fyup.io/api/trader/withdraw/create" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "inr_amount": 10000,
    "usdt_amount": 108.11,
    "notes": "Monthly withdrawal"
  }'
Request Example (Simple)
curl -X POST "https://api.fyup.io/api/trader/withdraw/create" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "inr_amount": 5000,
    "usdt_amount": 54.05
  }'
Response
201 Created
{
  "success": true,
  "message": "Withdraw request created successfully",
  "data": {
    "transaction_number": "TXN-694A99332353B",
    "withdraw_id": 15,
    "amounts": {
      "usdt": 100.5000,
      "inr": 9296.25,
      "formatted_usdt": "100.5000 USDT",
      "formatted_inr": "₹9,296.25"
    },
    "exchange_rate": 92.50,
    "status": "pending",
    "submitted_at": "2025-12-23T13:29:23.000000Z",
    "processing_info": {
      "message": "Your withdrawal request has been submitted and is pending admin approval.",
      "estimated_time": "Within 24-48 hours",
      "next_step": "Our team will review and process your withdrawal request. You will be notified once it's approved."
    }
  }
}
Error Response (Insufficient Balance)
400 Bad Request
{
  "success": false,
  "message": "Insufficient balance",
  "data": {
    "required_balance": 9296.25,
    "current_balance": 5000.00,
    "shortage": 4296.25
  }
}

Get Withdrawal History

GET /api/trader/withdraw/history

Get paginated list of all withdrawal transactions for the authenticated trader.

Query Parameters

Parameter Type Required Description
page Integer No Page number (default: 1)
limit Integer No Items per page (default: 10)
Request Example
curl -X GET "https://api.fyup.io/api/trader/withdraw/history?page=1&limit=10" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
200 Success
{
  "success": true,
  "message": "Withdraw history retrieved successfully",
  "data": {
    "withdrawals": [
      {
        "transaction_number": "TXN-694A99332353B",
        "amounts": {
          "usdt": 100.5000,
          "inr": 9296.25,
          "formatted_usdt": "100.5000 USDT",
          "formatted_inr": "₹9,296.25"
        },
        "status": {
          "code": "pending",
          "label": "Pending Approval",
          "color": "#f59e0b"
        },
        "withdrawal_method": "bank_transfer",
        "submitted_at": "Dec 23, 2025 1:29 PM",
        "processed_at": null,
        "rejection_reason": null
      }
    ],
    "pagination": {
      "current_page": 1,
      "total_pages": 1,
      "total_items": 1,
      "per_page": 10
    }
  }
}

Get Withdrawal Details

GET /api/trader/withdraw/details

Get detailed information about a specific withdrawal transaction.

Query Parameters

Parameter Type Required Description
transaction_number String Yes The transaction number from withdrawal creation
Request Example
curl -X GET "https://api.fyup.io/api/trader/withdraw/details?transaction_number=TXN-694A99332353B" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
200 Success
{
  "success": true,
  "message": "Withdraw details retrieved successfully",
  "data": {
    "transaction_number": "TXN-694A99332353B",
    "amounts": {
      "usdt": 100.5000,
      "inr": 9296.25,
      "formatted_usdt": "100.5000 USDT",
      "formatted_inr": "₹9,296.25"
    },
    "exchange_rate": 92.50,
    "status": {
      "code": "pending",
      "label": "Pending Approval",
      "color": "#f59e0b"
    },
    "withdrawal_method": "bank_transfer",
    "bank_details": {
      "account_holder_name": "Riswan Kumar",
      "account_number": "1234567890",
      "ifsc_code": "SBIN0001234",
      "bank_name": "State Bank of India",
      "branch": "Mumbai Main"
    },
    "crypto_address": null,
    "crypto_network": null,
    "submitted_at": "Dec 23, 2025 1:29 PM",
    "processed_at": null,
    "verified_at": null,
    "rejected_at": null,
    "rejection_reason": null,
    "notes": "Monthly withdrawal",
    "processing_info": {
      "message": "Your withdrawal is pending approval by our admin team.",
      "estimated_time": "Within 24-48 hours"
    }
  }
}

Create Transfer Request

POST /api/trader/transfer/create

Create a new transfer request to send funds to another wallet address.

Request Parameters

Parameter Type Required Description
inr_amount Decimal Yes Amount in INR to transfer (minimum: 100)
usdt_amount Decimal Yes Amount in USDT equivalent (minimum: 1)
recipient_wallet_id String Yes Recipient's wallet ID (e.g., #1ur2154F)
notes String No Optional notes (max 500 characters)
Request Example
curl -X POST "https://api.fyup.io/api/trader/transfer/create" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "inr_amount": 5000,
    "usdt_amount": 54.05,
    "recipient_wallet_id": "#1ur2154F",
    "notes": "Payment to supplier"
  }'
Response
201 Created
{
  "success": true,
  "message": "Transfer request created successfully",
  "data": {
    "transaction_number": "TXN-694A99332353C",
    "transfer_id": 16,
    "amounts": {
      "usdt": 54.0500,
      "inr": 5000.00,
      "formatted_usdt": "54.0500 USDT",
      "formatted_inr": "₹5,000.00"
    },
    "recipient_wallet_id": "#1ur2154F",
    "exchange_rate": 92.50,
    "status": "pending",
    "submitted_at": "2026-01-12T14:30:00.000000Z",
    "processing_info": {
      "message": "Your transfer request has been submitted and is pending admin approval.",
      "estimated_time": "Within 24-48 hours",
      "next_step": "Our team will review and process your transfer request. You will be notified once it's approved."
    }
  }
}
Error Response (Insufficient Balance)
400 Bad Request
{
  "success": false,
  "message": "Insufficient balance",
  "data": {
    "required_balance": 5000.00,
    "current_balance": 2500.00,
    "shortage": 2500.00
  }
}
Error Response (Validation Failed)
422 Unprocessable Entity
{
  "success": false,
  "message": "Validation failed",
  "errors": {
    "recipient_wallet_id": [
      "The recipient wallet id field is required."
    ]
  }
}

Get Connectivity Test

GET /api/trader/connectivity/test

Get or create a new UPI connectivity test with random amounts. This API creates a new test for the day if none exists, or returns existing test data.

Headers

Header Type Required Description
AuthorizationstringYesBearer {access_token}
Content-TypestringYesapplication/json

Response Examples

cURL Request
curl -X GET "https://api.fyup.io/api/trader/connectivity/test" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json"
Success Response (New Test)
201 Created
{
  "success": true,
  "message": "New connectivity test created",
  "data": {
    "test_id": 123,
    "upi_id": "trader123@paytm",
    "status": {
      "receive": {
        "amount": "₹15",
        "status": "pending",
        "completed_at": null
      },
      "send": {
        "amount": "₹22",
        "status": "pending",
        "completed_at": null
      }
    },
    "is_completed": false,
    "created_at": "2026-01-13T10:00:00.000000Z"
  }
}
Success Response (Existing Test)
200 OK
{
  "success": true,
  "message": "Connectivity test data retrieved",
  "data": {
    "test_id": 123,
    "upi_id": "trader123@paytm",
    "status": {
      "receive": {
        "amount": "₹15",
        "status": "completed",
        "completed_at": "2026-01-13T10:15:00.000000Z"
      },
      "send": {
        "amount": "₹22",
        "status": "processing",
        "completed_at": null
      }
    },
    "is_completed": false,
    "created_at": "2026-01-13T10:00:00.000000Z"
  }
}
Error Response (No UPI ID)
400 Bad Request
{
  "success": false,
  "message": "No UPI ID found for trader. Please add a UPI ID first."
}

Update Receive Status

PUT /api/trader/connectivity/{testId}/receive-status

Update the receive status of a connectivity test. Used when trader receives the test amount.

Headers

Header Type Required Description
AuthorizationstringYesBearer {access_token}
Content-TypestringYesapplication/json

Path Parameters

Parameter Type Required Description
testIdintegerYesConnectivity test ID

Request Body

Field Type Required Description
statusstringYesStatus: start, processing, completed
messagestringNoSMS message received (for completed status)
received_atstringNoISO datetime when amount received

Response Examples

cURL Request
curl -X PUT "https://api.fyup.io/api/trader/connectivity/123/receive-status" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "completed",
    "message": "Received Rs 15 from UPI ID test123@paytm",
    "received_at": "2026-01-13T10:15:00Z"
  }'
Success Response
200 OK
{
  "success": true,
  "message": "Receive status updated successfully",
  "data": {
    "test_id": 123,
    "status": {
      "receive": {
        "amount": "₹15",
        "status": "completed",
        "completed_at": "2026-01-13T10:15:00.000000Z"
      },
      "send": {
        "amount": "₹22",
        "status": "pending",
        "completed_at": null
      }
    },
    "is_completed": false
  }
}
Error Response (Test Not Found)
404 Not Found
{
  "success": false,
  "message": "Connectivity test not found"
}

Update Send Status

PUT /api/trader/connectivity/{testId}/send-status

Update the send status of a connectivity test. Used when trader sends the test amount.

Headers

Header Type Required Description
AuthorizationstringYesBearer {access_token}
Content-TypestringYesapplication/json

Path Parameters

Parameter Type Required Description
testIdintegerYesConnectivity test ID

Request Body

Field Type Required Description
statusstringYesStatus: start, processing, completed
messagestringNoSMS message sent (for completed status)
send_atstringNoISO datetime when amount sent

Response Examples

cURL Request
curl -X PUT "https://api.fyup.io/api/trader/connectivity/123/send-status" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "completed",
    "message": "Sent Rs 22 to UPI ID test456@paytm",
    "send_at": "2026-01-13T10:30:00Z"
  }'
Success Response
200 OK
{
  "success": true,
  "message": "Send status updated successfully",
  "data": {
    "test_id": 123,
    "status": {
      "receive": {
        "amount": "₹15",
        "status": "completed",
        "completed_at": "2026-01-13T10:15:00.000000Z"
      },
      "send": {
        "amount": "₹22",
        "status": "completed",
        "completed_at": "2026-01-13T10:30:00.000000Z"
      }
    },
    "is_completed": true
  }
}
Error Response (Validation Failed)
422 Unprocessable Entity
{
  "success": false,
  "message": "Validation failed",
  "errors": {
    "status": [
      "The status field must be one of: start, processing, completed."
    ]
  }
}

Initiate Payment

POST /api/payments/initiate

Create and initiate a new payment.

Response
201 Created
{
  "success": true,
  "message": "Payment initiated successfully",
  "data": {
    "payment_id": "PAY123456",
    "amount": 1000,
    "status": "pending"
  }
}

Store SMS Data

POST /api/sms-connectivity/store

Store SMS data from trader's device for payment confirmation and connectivity tracking.

Headers

Header Type Required Description
Authorization string Yes Bearer {your_token}
Content-Type string Yes application/json

Request Body Parameters

Parameter Type Required Description
trader_id string Yes Trader code (e.g., "TEVUV9BN8")
date string Yes SMS received date (format: "YYYY-MM-DD HH:mm:ss")
sms_provider string Yes Bank/provider name (e.g., "HDFC Bank", "Paytm")
sms_content string Yes Complete SMS text content (max 1000 chars)
device_id string No Unique device identifier
phone_number string No Trader's phone number
sender_id string No SMS sender ID (e.g., "HDFCBK", "PYTM")
amount number No Transaction amount
utr string No UPI Transaction Reference Number
otp string No OTP if SMS contains one
current_balance number No Account balance after transaction
latitude number No GPS latitude
longitude number No GPS longitude

Request Example

{
  "trader_id": "TEVUV9BN8",
  "date": "2026-01-07 15:30:00",
  "sms_provider": "HDFC Bank",
  "sms_content": "Rs 5000.00 credited to A/c XX1234 on 07-01-26 via UPI/123456789012. Info: payment received. Avl Bal: Rs 25000.00",
  "device_id": "abc123device",
  "phone_number": "9876543210",
  "sender_id": "HDFCBK",
  "amount": 5000.00,
  "utr": "123456789012",
  "current_balance": 25000.00,
  "latitude": 12.9716,
  "longitude": 77.5946
}
Response
201 Created
{
  "success": true,
  "message": "SMS connectivity data stored successfully",
  "data": {
    "sms_history_id": 12345,
    "trader_id": "TEVUV9BN8",
    "trader_name": "Test Trader",
    "stored_at": "2026-01-07T15:30:00.000000Z",
    "sms_type": "bank_credit"
  }
}

Get SMS Data

GET /api/sms-connectivity/data

Retrieve stored SMS data for a trader.

Response
200 Success
{
  "success": true,
  "data": {
    "current_page": 1,
    "data": [
      {
        "id": 12345,
        "trader_id": "TEVUV9BN8",
        "amount": 5000.00,
        "date": "2024-12-30T14:30:00Z"
      }
    ]
  }
}

SMS Statistics

GET /api/sms-connectivity/stats

Get SMS statistics and analytics.

Response
200 Success
{
  "success": true,
  "data": {
    "total_sms": 250,
    "processed": 240,
    "pending": 10,
    "last_updated": "2024-12-30T14:30:00Z"
  }
}

Get Complaints List

GET /api/trader/complaints

Get a paginated list of complaints for the authenticated trader with optional filters.

Headers

Header Type Required Description
Authorization string Yes Bearer {your_token}

Query Parameters

Parameter Type Required Description
status string No Filter by status: all, pending, in_progress, resolved, closed, rejected (default: all)
category string No Filter by category: payment_issue, transaction_dispute, technical_issue, etc.
priority string No Filter by priority: low, medium, high, urgent
limit integer No Items per page (1-100, default: 20)
page integer No Page number (default: 1)

Request Example

curl -X GET "https://api.fyup.io/api/trader/complaints?status=pending&limit=10" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
Response
200 Success
{
  "success": true,
  "message": "Complaints retrieved successfully",
  "data": {
    "complaints": [
      {
        "id": 1,
        "complaint_number": "TC-659CB3A077691",
        "subject": "Payment not received",
        "description": "I completed order ORD-123 but haven't received payment yet.",
        "category": "payment_issue",
        "priority": "high",
        "status": "pending",
        "order_id": 447,
        "order_type": "payin",
        "order_reference": "ORD-065B89E3",
        "order_amount": "2312.00",
        "created_at": "2026-01-09T10:30:00.000+05:30",
        "created_at_formatted": "Jan 09, 2026 10:30 AM",
        "created_at_relative": "2 hours ago"
      }
    ],
    "pagination": {
      "current_page": 1,
      "last_page": 1,
      "per_page": 20,
      "total": 1,
      "from": 1,
      "to": 1
    }
  }
}

Get Complaint Details

GET /api/trader/complaints/{complaintId}

Get detailed information about a specific complaint.

Headers

Header Type Required Description
Authorization string Yes Bearer {your_token}

Path Parameters

Parameter Type Required Description
complaintId string/integer Yes Complaint ID or complaint_number

Request Example

curl -X GET "https://api.fyup.io/api/trader/complaints/TC-659CB3A077691" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
Response
200 Success
{
  "success": true,
  "message": "Complaint details retrieved successfully",
  "data": {
    "complaint": {
      "id": 1,
      "complaint_number": "TC-659CB3A077691",
      "subject": "Payment not received",
      "description": "I completed order ORD-123 but haven't received payment yet.",
      "category": "payment_issue",
      "priority": "high",
      "status": "in_progress",
      "order_id": 447,
      "order_type": "payin",
      "order_reference": "ORD-065B89E3",
      "order_amount": "2312.00",
      "attachments": [
        {
          "filename": "screenshot.png",
          "path": "complaint-attachments/complaint_1.png",
          "url": "/storage/complaint-attachments/complaint_1.png",
          "size": 245678,
          "mime_type": "image/png"
        }
      ],
      "resolution_notes": null,
      "resolved_at": null,
      "assigned_to": {
        "id": 2,
        "name": "Support Admin",
        "email": "support@fyup.io"
      },
      "created_at": "2026-01-09T10:30:00.000+05:30",
      "updated_at": "2026-01-09T11:00:00.000+05:30"
    }
  }
}

Create New Complaint

POST /api/trader/complaints

Submit a new complaint with optional file attachments.

Headers

Header Type Required Description
Authorization string Yes Bearer {your_token}
Content-Type string Yes multipart/form-data

Request Body Parameters

Field Type Required Description
subject string Yes Complaint subject (max 255 chars)
description string Yes Detailed description (max 5000 chars)
category string Yes payment_issue, transaction_dispute, technical_issue, account_access, commission_dispute, pool_assignment, app_malfunction, other
priority string No low, medium, high, urgent (default: medium)
order_id integer No Related order ID (if complaint is about specific order)
order_type string No payin or payout (required if order_id is provided)
attachments[] file No Up to 5 files (jpg, jpeg, png, pdf, doc, docx, max 5MB each)
📎 File Attachments: To upload files, use attachments[] as the field name with multipart/form-data encoding. You can upload multiple files by using the same field name with array notation.

Request Example

curl -X POST "https://api.fyup.io/api/trader/complaints" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -F "subject=Payment not received for order ORD-123" \
  -F "description=I completed the order on Jan 8 but haven't received payment yet." \
  -F "category=payment_issue" \
  -F "priority=high" \
  -F "order_id=447" \
  -F "order_type=payin" \
  -F "attachments[]=@/path/to/screenshot.png"
Response
201 Created
{
  "success": true,
  "message": "Complaint submitted successfully",
  "data": {
    "complaint": {
      "id": 1,
      "complaint_number": "TC-659CB3A077691",
      "subject": "Payment not received for order ORD-123",
      "category": "payment_issue",
      "priority": "high",
      "status": "pending",
      "order_id": 447,
      "order_type": "payin",
      "order_reference": "ORD-065B89E3",
      "order_amount": "2312.00",
      "created_at": "2026-01-09T10:30:00.000+05:30",
      "created_at_formatted": "Jan 09, 2026 10:30 AM",
      "created_at_relative": "just now"
    }
  }
}

Update Complaint

PUT /api/trader/complaints/{complaintId}

Update a complaint (only pending status can be updated by trader).

Headers

Header Type Required Description
Authorization string Yes Bearer {your_token}
Content-Type string Yes multipart/form-data

Request Body Parameters

Field Type Required Description
description string No Updated description (max 5000 chars)
attachments[] file No Additional files to attach

Request Example

curl -X PUT "https://api.fyup.io/api/trader/complaints/TC-659CB3A077691" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -F "description=Updated: Order ID is ORD-123. Payment still pending." \
  -F "attachments[]=@/path/to/additional_proof.png"
Response
200 Success
{
  "success": true,
  "message": "Complaint updated successfully",
  "data": {
    "complaint": {
      "id": 1,
      "complaint_number": "TC-659CB3A077691",
      "subject": "Payment not received for order ORD-123",
      "category": "payment_issue",
      "priority": "high",
      "status": "pending",
      "order_id": 447,
      "order_type": "payin",
      "order_reference": "ORD-065B89E3",
      "order_amount": "2312.00",
      "created_at": "2026-01-09T10:30:00.000+05:30",
      "created_at_formatted": "Jan 09, 2026 10:30 AM",
      "created_at_relative": "2 hours ago"
    }
  }
}

Delete Complaint

DELETE /api/trader/complaints/{complaintId}

Delete a complaint (only pending status can be deleted).

Headers

Header Type Required Description
Authorization string Yes Bearer {your_token}

Path Parameters

Parameter Type Required Description
complaintId string/integer Yes Complaint ID or complaint_number

Request Example

curl -X DELETE "https://api.fyup.io/api/trader/complaints/TC-659CB3A077691" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
Response
200 Success
{
  "success": true,
  "message": "Complaint deleted successfully",
  "data": {
    "complaint_id": 1,
    "complaint_number": "TC-659CB3A077691",
    "deleted_at": "2026-01-09T12:45:00.000+05:30"
  }
}

Complaint Statistics

GET /api/trader/complaints/statistics

Get complaint statistics for the authenticated trader.

Headers

Header Type Required Description
Authorization string Yes Bearer {your_token}

Request Example

curl -X GET "https://api.fyup.io/api/trader/complaints/statistics" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
Response
200 Success
{
  "success": true,
  "message": "Complaint statistics retrieved successfully",
  "data": {
    "statistics": {
      "total_complaints": 15,
      "pending": 3,
      "in_progress": 5,
      "resolved": 6,
      "closed": 1,
      "rejected": 0,
      "by_category": {
        "payment_issue": 8,
        "transaction_dispute": 4,
        "technical_issue": 2,
        "app_malfunction": 1
      },
      "by_priority": {
        "low": 2,
        "medium": 8,
        "high": 4,
        "urgent": 1
      },
      "avg_resolution_time_hours": 24.5
    }
  }
}

Get Trader Status

GET /api/trader/status

Get current trader availability and online status.

Headers

Header Type Required Description
Authorization string Yes Bearer {your_token}

Request Example

curl -X GET https://api.fyup.io/api/trader/status \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
Response
200 Success
{
  "success": true,
  "message": "Trader status retrieved successfully",
  "data": {
    "trader_id": 123,
    "trader_code": "TEVUV9BN8",
    "name": "John Trader",
    "email": "john@example.com",
    "is_available": true,
    "status": "online",
    "connectivity_status": "online",
    "last_seen_at": "2026-01-07T10:30:00.000000Z",
    "is_online": true
  },
  "timestamp": "2026-01-07T10:30:00.000000Z"
}

Go Online

POST /api/trader/status/online

Set trader status to online/available.

Headers

Header Type Required Description
Authorization string Yes Bearer {your_token}
Content-Type string Yes application/json

Request Body Parameters (Optional)

Parameter Type Required Description
latitude number No GPS latitude (-90 to 90)
longitude number No GPS longitude (-180 to 180)

Request Example

{
  "latitude": 12.9716,
  "longitude": 77.5946
}
Response
200 Success
{
  "success": true,
  "message": "Trader is now online",
  "data": {
    "trader_id": 123,
    "trader_code": "TEVUV9BN8",
    "is_available": true,
    "status": "online",
    "last_seen_at": "2026-01-07T10:30:00.000000Z",
    "updated_at": "2026-01-07T10:30:00.000000Z"
  },
  "timestamp": "2026-01-07T10:30:00.000000Z"
}

Go Offline

POST /api/trader/status/offline

Set trader status to offline/unavailable.

Headers

Header Type Required Description
Authorization string Yes Bearer {your_token}
Content-Type string Yes application/json

Request Body Parameters (Optional)

Parameter Type Required Description
latitude number No GPS latitude (-90 to 90)
longitude number No GPS longitude (-180 to 180)

Request Example

{
  "latitude": 12.9716,
  "longitude": 77.5946
}
Response
200 Success
{
  "success": true,
  "message": "Trader is now offline",
  "data": {
    "trader_id": 123,
    "trader_code": "TEVUV9BN8",
    "is_available": false,
    "status": "offline",
    "last_seen_at": "2026-01-07T10:30:00.000000Z",
    "updated_at": "2026-01-07T10:30:00.000000Z"
  },
  "timestamp": "2026-01-07T10:30:00.000000Z"
}

Update Availability

PUT /api/trader/status/availability

Update trader availability status with custom value (online/offline).

Headers

Header Type Required Description
Authorization string Yes Bearer {your_token}
Content-Type string Yes application/json

Request Body Parameters

Parameter Type Required Description
is_available boolean Yes true = online, false = offline
latitude number No GPS latitude (-90 to 90)
longitude number No GPS longitude (-180 to 180)

Request Example

{
  "is_available": true,
  "latitude": 12.9716,
  "longitude": 77.5946
}
Response
200 Success
{
  "success": true,
  "message": "Trader is now online",
  "data": {
    "trader_id": 123,
    "trader_code": "TEVUV9BN8",
    "is_available": true,
    "status": "online",
    "last_seen_at": "2026-01-07T10:30:00.000000Z",
    "updated_at": "2026-01-07T10:30:00.000000Z"
  },
  "timestamp": "2026-01-07T10:30:00.000000Z"
}