Add escrow payment mode for proposed events #10

Open
opened 2026-04-27 08:34:00 +00:00 by padreug · 0 comments
Owner

Summary

When a non-admin user proposes an event, ticket payments currently go directly to the proposer's wallet. For events by new or unverified organizers, an admin may want payments to go to an admin/organization wallet first and be released to the organizer after the event concludes successfully.

Proposed design

Add a payment_mode field to the Event model:

  • direct (default) — ticket payments go to the event organizer's wallet (current behavior)
  • escrow — ticket payments go to an admin-designated wallet, released to the organizer after the event

Escrow flow

  1. Admin approves event with payment_mode: escrow and specifies an escrow_wallet (admin wallet that holds funds)
  2. Ticket purchases create invoices against the escrow wallet
  3. After the event, admin triggers a release that pays out the organizer
  4. If the event is canceled, escrowed funds are refunded to ticket holders (existing refund flow)

API changes

  • PUT /events/{id}/approve — accept optional payment_mode and escrow_wallet fields
  • New: PUT /events/{id}/release — admin releases escrowed funds to organizer wallet
  • Event model: add payment_mode (direct/escrow) and escrow_wallet (optional wallet ID)

Considerations

  • The organizer's wallet ID is stored on the event (set during propose). The escrow wallet is set by admin during approval.
  • Release could be automatic (triggered by event end date) or manual (admin action)
  • Partial releases could support multi-day events
  • This builds on the approval workflow from #6 / PR #9

Depends on

## Summary When a non-admin user proposes an event, ticket payments currently go directly to the proposer's wallet. For events by new or unverified organizers, an admin may want payments to go to an admin/organization wallet first and be released to the organizer after the event concludes successfully. ## Proposed design Add a `payment_mode` field to the Event model: - **`direct`** (default) — ticket payments go to the event organizer's wallet (current behavior) - **`escrow`** — ticket payments go to an admin-designated wallet, released to the organizer after the event ### Escrow flow 1. Admin approves event with `payment_mode: escrow` and specifies an `escrow_wallet` (admin wallet that holds funds) 2. Ticket purchases create invoices against the escrow wallet 3. After the event, admin triggers a release that pays out the organizer 4. If the event is canceled, escrowed funds are refunded to ticket holders (existing refund flow) ### API changes - `PUT /events/{id}/approve` — accept optional `payment_mode` and `escrow_wallet` fields - New: `PUT /events/{id}/release` — admin releases escrowed funds to organizer wallet - Event model: add `payment_mode` (direct/escrow) and `escrow_wallet` (optional wallet ID) ### Considerations - The organizer's wallet ID is stored on the event (set during propose). The escrow wallet is set by admin during approval. - Release could be automatic (triggered by event end date) or manual (admin action) - Partial releases could support multi-day events - This builds on the approval workflow from #6 / PR #9 ## Depends on - aiolabs/events#6 (approval workflow) — must be merged first
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiolabs/events#10
No description provided.