Phase 9 β Chef Payouts
The chef payment flow. RideNDine handles all payouts via Stripe / Bank. COOCO provides a preview and receives results via webhook.
Overviewβ
RideNDine (internal) β COOCO (GET preview) β Chef (dashboard)
RideNDine β Chef (bank transfer) β COOCO (webhook)
| Step | From | To | Action |
|---|---|---|---|
| 9.1 | RideNDine | RideNDine | Internal β calculate chef balance |
| 9.2 | COOCO | RideNDine | GET /payouts/preview?chefId={id} |
| 9.3 | RideNDine | Chef | Stripe / Bank payout |
| 9.4 | RideNDine | COOCO | POST /webhooks/payout-status |
| 9.5 | COOCO | Chef | Internal β payout dashboard |
Step 9.1 β Calculate Chef Balance (RideNDine Internal)β
RideNDine internally calculates the amount owed to the chef from completed orders. COOCO does not send anything at this step.
Step 9.2 β View Payout Previewβ
From: COOCO β To: RideNDine
Endpoint: GET /payouts/preview
Proxied through Directus Extension: GET /ridendine/payouts/preview.
Purpose: The chef views the upcoming payment before RideNDine initiates the transfer.
Query Parametersβ
| Param | Value |
|---|---|
merchant_id | stores.ridendine_merchant_id |
external_merchant_id | stores.id (fallback) |
from_date | optional |
to_date | optional |
Step 9.3 β RideNDine Transfers Funds to Chefβ
RideNDine executes a batch payout via Stripe / Bank transfer directly to the chef. COOCO is not involved at this step.
Step 9.4 β Webhook: Payout Statusβ
From: RideNDine β To: COOCO
Endpoint (COOCO expose): {DIRECTUS_URL}/ridendine/webhooks/payout-status
Method: POST
Purpose: COOCO updates the payout history for the chef to view.
Payload receivedβ
{
"external_merchant_id": "<stores.id>",
"amount_cents": 38500,
"status": "PENDING | COMPLETED | FAILED",
"period_start": "2026-06-01",
"period_end": "2026-06-15",
"paid_at": "<ISO8601>"
}
Save to Directusβ
Save to the chef_payouts collection or a JSON field on stores.
Step 9.5 β Payout Dashboard (Internal)β
From: COOCO β To: Chef
The cookin-web chef dashboard reads data from Directus to display the payout history.
No requests are sent to RideNDine at this step.