Skip to content

SudoSOS Back-end API / stripe/payment-request-service / validPaymentRequestBeneficiaryTypes

Function: validPaymentRequestBeneficiaryTypes() ​

ts
function validPaymentRequestBeneficiaryTypes(): UserType[];

User types allowed to be the beneficiary of a PaymentRequest. Anything not on this list is rejected, so the default for newly-added user types is fail-closed. Soft-deleted users are rejected at runtime regardless of type.

Excluded types and why:

  • ORGAN -- committee account, no human counterpart for share-link UX.
  • VOUCHER -- promotional credit, not a payer.
  • POINT_OF_SALE -- synthetic POS account, no human.
  • INTEGRATION -- bot/service account, no human.

Returned via a function (not a top-level const) to sidestep the residual circular import chain user.ts -> ... -> stripe-service.ts -> payment-request-service.ts -> user.ts that leaves UserType temporarily undefined at module-evaluation time.

Returns ​

UserType[]