EstateHub

Administrator Payout Management API

Base URL: http://localhost:8000/api/v1
Prefix: /admins
Auth: Bearer token with admin role
Headers: Content-Type: application/json


1. List Payouts

Returns a paginated list of seller payout requests for admin review and management.

GET/admins/payouts/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Success Example

JSON
{
  "success": true,
  "message": "Payouts retrieved successfully.",
  "data": {
    "payouts": {
      "count": 24,
      "next": "http://localhost:8000/api/v1/admins/payouts/?page=2",
      "previous": null,
      "results": [
        {
          "id": "43230f98-bef2-41f2-bf66-b74da805cdab",
          "reference": "PAY-20260920-4821",
          "seller": {
            "id": "bc49bb22-ddd2-43c9-947c-e428a2e2b403",
            "full_name": "Michael Carter",
            "email": "ahmed@example.com",
            "phone": "+15125550103"
          },
          "payout_type": "seller_sale",
          "gross_amount": "350000.00",
          "fee_amount": "0.00",
          "net_amount": "350000.00",
          "currency": "USD",
          "status": "pending",
          "payout_account": {
            "bank_name": "Example Community Bank",
            "account_name": "Michael Carter",
            "masked_account_number": "•••• 6789",
            "branch_name": "South Congress",
            "routing_number": "000000000"
          },
          "requested_at": "2026-09-20T05:20:00Z",
          "approved_at": null,
          "processing_at": null,
          "paid_at": null
        }
      ]
    }
  }
}

Notes

  • Supported filters:

    • status

    • payout_type

    • seller_id

    • search

    • from

    • to

    • page

    • page_size

  • search should match payout reference, seller name, or seller email.

  • Supported statuses:

    • pending

    • on_hold

    • approved

    • processing

    • paid

    • failed

    • canceled

  • Supported payout types:

    • seller_sale

    • seller_rent

    • agent_commission

    • investor_return

    • wallet_withdrawal

    • refund

  • Results are ordered by newest request first.

  • The maximum page size should be 50.

  • Full bank-account numbers must never be returned.

  • Payout records must not be permanently deleted.


2. Get Payout Details

Returns complete payout, seller, account, financial, and processing information.

GET/admins/payouts/{payout_id}/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Success Example

JSON
{
  "success": true,
  "message": "Payout details retrieved successfully.",
  "data": {
    "payout": {
      "id": "43230f98-bef2-41f2-bf66-b74da805cdab",
      "reference": "PAY-20260920-4821",
      "payout_type": "seller_sale",
      "status": "pending",
      "seller": {
        "id": "bc49bb22-ddd2-43c9-947c-e428a2e2b403",
        "full_name": "Michael Carter",
        "email": "ahmed@example.com",
        "phone": "+15125550103",
        "roles": [
          "seller_owner"
        ],
        "verification_status": "approved"
      },
      "amounts": {
        "gross_amount": "350000.00",
        "fee_amount": "0.00",
        "net_amount": "350000.00",
        "currency": "USD"
      },
      "payout_account": {
        "bank_name": "Example Community Bank",
        "account_name": "Michael Carter",
        "masked_account_number": "•••• 6789",
        "branch_name": "South Congress",
        "routing_number": "000000000"
      },
      "source": {
        "type": "seller_balance",
        "id": "bc49bb22-ddd2-43c9-947c-e428a2e2b403"
      },
      "review": {
        "approved_by": null,
        "approved_at": null,
        "review_note": "",
        "hold_reason": "",
        "cancellation_reason": ""
      },
      "transfer": {
        "processing_at": null,
        "transfer_reference": "",
        "receipt_url": "",
        "paid_at": null,
        "failure_reason": ""
      },
      "timeline": [
        {
          "stage": "requested",
          "label": "Payout requested",
          "status": "completed",
          "completed_at": "2026-09-20T05:20:00Z"
        },
        {
          "stage": "approved",
          "label": "Admin approval",
          "status": "pending",
          "completed_at": null
        },
        {
          "stage": "processing",
          "label": "Transfer processing",
          "status": "pending",
          "completed_at": null
        },
        {
          "stage": "paid",
          "label": "Payout completed",
          "status": "pending",
          "completed_at": null
        }
      ],
      "requested_at": "2026-09-20T05:20:00Z",
      "created_at": "2026-09-20T05:20:00Z",
      "updated_at": "2026-09-20T05:20:00Z"
    }
  }
}

Notes

  • The account number must be masked.

  • The details response should contain the account snapshot submitted with the payout.

  • Seller verification status is included to help the admin review the request.

  • The payout account snapshot must not change if the seller later submits different bank information.

  • A pending payout should expose approve, hold, and cancel as available actions.

  • A paid or canceled payout must not expose additional actions.

  • Returns HTTP 404 Not Found when the payout does not exist.


3. Perform Payout Action

Performs a validated action on a seller payout.

POST/admins/payouts/{payout_id}/actions/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}
Content-Type: application/json

Request Body

Approve a pending payout:

JSON
{
  "action": "approve",
  "note": "Seller and bank information verified."
}

Place a payout on hold:

JSON
{
  "action": "hold",
  "reason": "Seller verification is incomplete."
}

Release a held payout:

JSON
{
  "action": "release",
  "note": "Seller verification has been completed."
}

Start the bank transfer:

JSON
{
  "action": "process"
}

Mark a transfer as paid:

JSON
{
  "action": "mark_paid",
  "transfer_reference": "DBBL-PAYOUT-785421",
  "receipt_url": "https://example.com/payout-receipts/DBBL-PAYOUT-785421.pdf"
}

Mark a transfer as failed:

JSON
{
  "action": "mark_failed",
  "reason": "The receiving bank rejected the account information."
}

Cancel a payout:

JSON
{
  "action": "cancel",
  "reason": "Payout canceled after admin review."
}

Success Example

JSON
{
  "success": true,
  "message": "Payout approved successfully.",
  "data": {
    "payout": {
      "id": "43230f98-bef2-41f2-bf66-b74da805cdab",
      "reference": "PAY-20260920-4821",
      "payout_type": "seller_sale",
      "gross_amount": "350000.00",
      "fee_amount": "0.00",
      "net_amount": "350000.00",
      "currency": "USD",
      "status": "approved",
      "payout_account": {
        "bank_name": "Example Community Bank",
        "account_name": "Michael Carter",
        "masked_account_number": "•••• 6789",
        "branch_name": "South Congress",
        "routing_number": "000000000"
      },
      "approved_by": {
        "id": "07ddda70-fd16-4c6a-a975-d0e984719c83",
        "full_name": "EstateHub Admin",
        "email": "admin@estatehub.com"
      },
      "approved_at": "2026-09-21T06:10:00Z",
      "processing_at": null,
      "paid_at": null,
      "review_note": "Seller and bank information verified.",
      "hold_reason": "",
      "cancellation_reason": "",
      "failure_reason": "",
      "transfer_reference": "",
      "receipt_url": ""
    },
    "available_actions": [
      "process",
      "hold",
      "cancel"
    ]
  }
}

Notes

  • Supported actions:

    • approve

    • hold

    • release

    • process

    • mark_paid

    • mark_failed

    • cancel

  • Allowed transitions:

TEXT
    pending → approved, on_hold, canceled
    approved → processing, on_hold, canceled
    on_hold → pending, canceled
    processing → paid, failed
    
  • approve is allowed only for a pending payout.

  • hold is allowed for a pending or approved payout.

  • release is allowed only for an on-hold payout.

  • process is allowed only for an approved payout.

  • mark_paid is allowed only for a processing payout.

  • mark_failed is allowed only for a processing payout.

  • cancel is allowed for pending, approved, or on-hold payouts.

  • reason is required for hold, mark_failed, and cancel.

  • transfer_reference is required for mark_paid.

  • receipt_url is optional but must be a valid URL when supplied.

  • Paid and canceled payouts are final.

  • This version does not support retrying a failed payout.

  • After failure, the locked amount becomes available again and the seller submits a new payout request with corrected bank information.

  • Every action must record the authenticated admin and timestamp.

  • Every action must create an audit log.

  • The seller should be notified after approval, hold, release, processing, payment, failure, or cancellation.

  • A successful action returns HTTP 200 OK.

  • An invalid status transition returns HTTP 400 Bad Request.

  • A missing payout returns HTTP 404 Not Found.


Common Success Format

JSON
{
  "success": true,
  "message": "Operation completed successfully.",
  "data": {}
}

Common Error Format

JSON
{
  "success": false,
  "message": "Validation failed.",
  "errors": {
    "field_name": [
      "Error description."
    ]
  }
}