basalt / subscriptions/src / MemoryPaymentStore
Class: MemoryPaymentStore
Defined in: subscriptions/src/payment.ts:145
In-memory PaymentStore — per-process; swap for a durable one in production.
Implements
Constructors
Constructor
> new MemoryPaymentStore(): MemoryPaymentStore
Returns
MemoryPaymentStore
Methods
create()
> create(payment): Promise<void>
Defined in: subscriptions/src/payment.ts:148
Insert a pending payment. Idempotent: a no-op if the id already exists.
Parameters
payment
Returns
Promise<void>
Implementation of
get()
> get(id): Promise<PaymentRecord | undefined>
Defined in: subscriptions/src/payment.ts:183
Parameters
id
string
Returns
Promise<PaymentRecord | undefined>
Implementation of
setStatus()
> setStatus(id, status, patch?): Promise<void>
Defined in: subscriptions/src/payment.ts:163
Apply a terminal status; upserts if the payment wasn't recorded first.
Parameters
id
string
status
patch?
amount?
number
raw?
unknown
Returns
Promise<void>