SudoSOS Back-end API / stripe/payment-request / PaymentRequest
Class: PaymentRequest ​
A shareable, fixed-amount request to top up a specific user's SudoSOS balance. See the module page for full lifecycle and integration notes.
Extends ​
Constructors ​
Constructor ​
ts
new PaymentRequest(): PaymentRequest;Returns ​
PaymentRequest
Overrides ​
BaseEntityWithoutId.constructor
Properties ​
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
amount | public | Dinero | Fixed, immutable amount. | - |
attempts | public | PaymentRequestAttempt[] | Payment attempts (intents) | - |
cancelledAt | public | Date | When the request was cancelled (null if not cancelled). | - |
cancelledBy | public | User | The user that cancelled this request (null if not cancelled). | - |
createdAt | readonly | Date | The creation date of the object. | BaseEntityWithoutId.createdAt |
createdBy | public | User | Audit: who issued this request. | - |
description | public | string | Human-readable description (e.g. "Drinks at Walhalla naborrel 2026-04-12"). | - |
expiresAt | public | Date | After this moment the request stops accepting payments. Once expiresAt has passed, the derived status flips to EXPIRED (unless the request had already been paid or cancelled, which take precedence — see PaymentRequest.status). | - |
for | public | User | The user whose balance will be credited on successful payment. | - |
fulfilledBy | public | User | The admin that marked the request paid out-of-band via the escape hatch (null otherwise). | - |
id | public | string | UUID v4. Also the public-facing identifier shared in payment links. | - |
paidAt | public | Date | When the request was marked paid (null if pending/cancelled/expired). | - |
updatedAt | readonly | Date | The last update date of the object. | BaseEntityWithoutId.updatedAt |
version | readonly | number | The current version of the object. | BaseEntityWithoutId.version |
Accessors ​
status ​
Get Signature ​
ts
get status(): PaymentRequestStatus;Derived status — not persisted. Order of precedence: PAID > CANCELLED > EXPIRED > PENDING.
Returns ​
Methods ​
getOwner() ​
ts
getOwner(): Promise<User>;Returns ​
Promise<User>