PlexySDK DOCS
Online Payouts

Staged Payouts

Multi-step payout workflow with review and approval for enhanced security and compliance

Staged Payouts

Staged Payouts enable a multi-step workflow where payouts are submitted, reviewed, and then confirmed or declined before funds are disbursed. This approach implements the four-eye principle for enhanced security and is ideal for organizations requiring approval workflows or compliance controls.

Staged Payouts are available for all payout methods including instant card, bank transfer, and wallet payouts. Contact your Plexy account manager to enable staged payouts for your account.

How It Works

Create a payout in stored status. Funds are not yet reserved or sent.

Your team reviews the payout details, verifies recipient information, and checks compliance requirements.

Approve the payout to proceed with disbursement, or decline to cancel it.

Confirmed payouts are processed and funds are delivered to the recipient.

Four-Eye Principle

The four-eye principle (also known as dual control) requires two separate individuals to authorize a transaction. This significantly reduces fraud risk and ensures compliance with financial regulations.

RoleActionsDescription
SubmitterCreate, StorePrepares payout requests
ApproverReview, Confirm, DeclineAuthorizes or rejects payouts

By default, the same API key can both submit and confirm payouts. For true separation of duties, configure role-based access in your Plexy Dashboard to require different credentials for each action.

Stage 1: Submit Payout (Store)

Create a payout in stored status. The payout is saved but not yet processed.

curl -X POST https://api.plexypay.com/v2/payouts/store \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: staged_payout_12345" \
  -d '{
    "amount": {
      "value": 500000,
      "currency": "KZT"
    },
    "method": "instant_card",
    "recipient": {
      "type": "individual",
      "first_name": "Alex",
      "last_name": "Johnson",
      "email": "alex@example.com",
      "card": {
        "number": "4111111111111111",
        "exp_month": 12,
        "exp_year": 2028,
        "holder_name": "ALEX JOHNSON"
      }
    },
    "reference": "expense_reimbursement_001",
    "description": "Q1 expense reimbursement",
    "metadata": {
      "expense_report_id": "exp_789",
      "department": "engineering",
      "submitted_by": "user_456"
    }
  }'

Store Response

{
  "id": "po_staged_abc123def456",
  "object": "payout",
  "status": "stored",
  "amount": {
    "value": 500000,
    "currency": "KZT"
  },
  "method": "instant_card",
  "recipient": {
    "id": "rec_xyz789",
    "type": "individual",
    "first_name": "Alex",
    "last_name": "Johnson",
    "card": {
      "brand": "visa",
      "last4": "1111"
    }
  },
  "reference": "expense_reimbursement_001",
  "description": "Q1 expense reimbursement",
  "created_at": "2026-03-25T09:00:00Z",
  "expires_at": "2026-03-26T09:00:00Z",
  "metadata": {
    "expense_report_id": "exp_789",
    "department": "engineering",
    "submitted_by": "user_456"
  }
}

Stage 2: Review Pending Payouts

List payouts awaiting approval.

curl -X GET "https://api.plexypay.com/v2/payouts?status=stored&limit=50" \
  -H "x-api-key: YOUR_API_KEY"

Get Payout Details

Retrieve full details of a specific payout for review.

curl -X GET https://api.plexypay.com/v2/payouts/po_staged_abc123def456 \
  -H "x-api-key: YOUR_API_KEY"

Stage 3a: Confirm Payout

Approve a stored payout to proceed with processing.

curl -X POST https://api.plexypay.com/v2/payouts/po_staged_abc123def456/confirm \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "approved_by": "approver_user_123",
    "approval_notes": "Verified against expense report EXP-789. Amount matches receipts."
  }'

Confirm Response

{
  "id": "po_staged_abc123def456",
  "object": "payout",
  "status": "processing",
  "amount": {
    "value": 500000,
    "currency": "KZT"
  },
  "method": "instant_card",
  "recipient": {
    "id": "rec_xyz789",
    "card": {
      "brand": "visa",
      "last4": "1111"
    }
  },
  "reference": "expense_reimbursement_001",
  "created_at": "2026-03-25T09:00:00Z",
  "confirmed_at": "2026-03-25T10:30:00Z",
  "estimated_arrival": "2026-03-25T11:00:00Z",
  "approved_by": "approver_user_123",
  "approval_notes": "Verified against expense report EXP-789. Amount matches receipts.",
  "metadata": {
    "expense_report_id": "exp_789",
    "department": "engineering",
    "submitted_by": "user_456"
  }
}

Stage 3b: Decline Payout

Reject a stored payout. The payout is cancelled and no funds are disbursed.

curl -X POST https://api.plexypay.com/v2/payouts/po_staged_abc123def456/decline \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "declined_by": "approver_user_123",
    "decline_reason": "duplicate_request",
    "decline_notes": "This expense was already reimbursed in batch #42 on 2026-03-20."
  }'

Decline Reasons

ReasonDescription
duplicate_requestPayout already exists for this payment
invalid_recipientRecipient information is incorrect
compliance_issueFailed compliance or sanctions check
insufficient_documentationMissing required supporting documents
amount_mismatchAmount doesn't match source records
fraud_suspectedPotential fraudulent request
budget_exceededExceeds department/project budget
otherCustom reason (provide in notes)

Decline Response

{
  "id": "po_staged_abc123def456",
  "object": "payout",
  "status": "declined",
  "amount": {
    "value": 500000,
    "currency": "KZT"
  },
  "reference": "expense_reimbursement_001",
  "created_at": "2026-03-25T09:00:00Z",
  "declined_at": "2026-03-25T10:30:00Z",
  "declined_by": "approver_user_123",
  "decline_reason": "duplicate_request",
  "decline_notes": "This expense was already reimbursed in batch #42 on 2026-03-20."
}

Payout Statuses

StatusDescription
storedPayout submitted, awaiting confirmation
processingConfirmed and being processed
completedFunds successfully delivered
failedProcessing failed
declinedRejected during review
expiredNot confirmed before expiration
cancelledCancelled by submitter

Expiration

Stored payouts expire after 24 hours by default if not confirmed or declined. You can customize the expiration time:

curl -X POST https://api.plexypay.com/v2/payouts/store \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": {"value": 500000, "currency": "KZT"},
    "method": "instant_card",
    "recipient": { ... },
    "expires_in": 86400,
    "reference": "custom_expiry_payout"
  }'
ParameterTypeDefaultDescription
expires_ininteger86400Seconds until expiration (min: 3600, max: 604800)

Batch Operations

Confirm Multiple Payouts

curl -X POST https://api.plexypay.com/v2/payouts/confirm-batch \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "payout_ids": [
      "po_staged_001",
      "po_staged_002",
      "po_staged_003"
    ],
    "approved_by": "approver_user_123",
    "approval_notes": "Bulk approval for weekly seller payouts"
  }'

Batch Confirm Response

{
  "confirmed": [
    { "id": "po_staged_001", "status": "processing" },
    { "id": "po_staged_002", "status": "processing" }
  ],
  "failed": [
    {
      "id": "po_staged_003",
      "error": "payout_expired",
      "message": "Payout has expired and cannot be confirmed"
    }
  ]
}

Webhook Events

Staged payouts trigger specific webhook events at each stage.

EventTrigger
PAYOUT_SUBMITTEDPayout stored, awaiting confirmation
PAYOUT_CONFIRMEDPayout approved and processing started
PAYOUT_DECLINEDPayout rejected
PAYOUT_PAIDFunds delivered to recipient
PAYOUT_FAILEDProcessing failed

See Payout Webhooks for detailed payload examples.

Role-Based Access Control

Configure separate API keys or roles for submitters and approvers.

Dashboard Configuration

  1. Navigate to Settings > API Keys in your Plexy Dashboard
  2. Create separate keys for each role:
    • Submitter Key: Can call /payouts/store only
    • Approver Key: Can call /payouts/{id}/confirm and /payouts/{id}/decline

Permission Scopes

ScopeActions Allowed
payouts:storeCreate stored payouts
payouts:readView payout details
payouts:confirmConfirm stored payouts
payouts:declineDecline stored payouts
payouts:cancelCancel stored payouts

Implementation Example

Full workflow implementation with role separation. Use separate API keys (scoped to payouts:store vs. payouts:confirm/payouts:decline) for submitters and approvers.

Submitter: store the payout

curl -X POST https://api.plexypay.com/v2/payouts/store \
  -H "x-api-key: YOUR_SUBMITTER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: staged_payout_expense_001" \
  -d '{
    "amount": { "value": 500000, "currency": "KZT" },
    "method": "instant_card",
    "recipient_id": "rec_xyz789",
    "reference": "expense_001",
    "description": "Q1 expense reimbursement",
    "metadata": {
      "expense_id": "exp_789",
      "submitted_by": "user_456",
      "department": "engineering",
      "expense_category": "travel"
    }
  }'

Approver: retrieve and review the payout, then confirm or decline

# Retrieve for review
curl -X GET https://api.plexypay.com/v2/payouts/po_staged_abc123def456 \
  -H "x-api-key: YOUR_APPROVER_API_KEY"

# Confirm (only if approver != submitter — enforce in your application logic)
curl -X POST https://api.plexypay.com/v2/payouts/po_staged_abc123def456/confirm \
  -H "x-api-key: YOUR_APPROVER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "approved_by": "approver_user_123",
    "approval_notes": "Verified against expense report EXP-789"
  }'

# Decline
curl -X POST https://api.plexypay.com/v2/payouts/po_staged_abc123def456/decline \
  -H "x-api-key: YOUR_APPROVER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "declined_by": "approver_user_123",
    "decline_reason": "duplicate_request",
    "decline_notes": "Already reimbursed in batch #42"
  }'

After confirming, record the action in your audit log with the payout_id, approver ID, and timestamp.

Best Practices

Use different API keys for submitters and approvers. Never allow the same user to both submit and approve a payout.

Balance between giving approvers enough time to review and not leaving payouts pending indefinitely.

Store submitter ID, department, source documents, and other context needed for approval decisions.

Alert approvers of pending payouts and submitters of approval/rejection decisions.

Log all submission, approval, and rejection actions with timestamps and user IDs.

Monitor for expiring payouts and notify relevant parties before expiration.

Testing

Use these scenarios in test mode:

Test Workflow

# 1. Store a payout
PAYOUT_ID=$(curl -X POST https://api.plexypay.com/v2/payouts/store \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": {"value": 100000, "currency": "KZT"},
    "method": "instant_card",
    "recipient": {
      "card": {"number": "4111111111111111", "exp_month": 12, "exp_year": 2028, "holder_name": "TEST USER"},
      "first_name": "Test",
      "last_name": "User"
    },
    "reference": "test_staged_001"
  }' | jq -r '.id')

# 2. Confirm the payout
curl -X POST "https://api.plexypay.com/v2/payouts/${PAYOUT_ID}/confirm" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "approved_by": "test_approver",
    "approval_notes": "Test approval"
  }'

Test Card Numbers

Card NumberScenario After Confirmation
4111 1111 1111 1111Completes successfully
4000 0000 0000 0085Fails with card_not_eligible

Next Steps

On this page