Handles Solana transaction creation for card transaction clearing
The ID of the card transaction
Solana transaction and last valid block height for the transaction
The credit returning an expired authorization's hold: its whole amount,
settlement account to card, the way a reversal returns one. Only for an
authorization already marked RETURNED + AUTH_EXPIRED, so nothing
releases a hold a clearing still holds.
Handles Solana transaction creation for card transactions
The ID of the card transaction
Solana transaction and last valid block height for the transaction
Create card transaction entry for the Girasol transaction event we receive. A pending authorization debits the card into the Girasol mastercard account; a pending reversal or refund credits it back.
Card transaction with clearing data
Publishes a transaction's current status, for a write made silent until
its outcome settled: a reversal claims its original silently and announces
it only once the credit landed, so a refused credit never leaves a
REVERSED event behind.
The rows Girasol sent about girasolTransactionIds: a reversal whose
event names one as its original_transaction (its own id has a new base),
or an advice whose id is one's <id>-<suffix>. Every Girasol id on the
card is returned too, so a credit already recorded is never taken for a
missed one.
Drives an authorization whose clearing was already recorded to CLEARED,
from the clearing data stored on it rather than recomputed: a MATCH is
finished in place, an adjustment's workflow is started again. The transfer
is keyed clearing_${id} on chain, so a restart never moves funds twice.
OptionalcardIds?: string[]OptionalcustomerId?: stringOptionalfromDate?: DateOptionalgirasolCardTransactionIds?: string[]OptionalidempotencyKeys?: string[]Optionalids?: string[]OptionalorderBy?: DbOrderByCriterion<OptionaloriginalGirasolCardTransactionIds?: string[]Optionalpage?: numberOptionalpageSize?: numberOptionalstatuses?: ("PENDING" | "FAILED" | "COMPLETED" | "PROCESSING" | "RETURNED" | "CANCELLED")[]OptionaltoDate?: DateOptionaltypes?: ("authorization" | "notification" | "reversal" | "refund")[]Optionaluncleared?: booleanOnly those with no clearing record.
Update the girasol card transaction and publish an event if required.
With onlyIf, the row is read under FOR UPDATE and written only while it
still holds onlyIf.status and, for uncleared, has no clearing record
or clearing data: a compare-and-set that a concurrent clearing wins.
silent writes the history row but publishes nothing, for a write that
undoes one whose own events never went out as a settled outcome.
The process service; the Girasol customer and the card workflows' queue come from the
girasolandtemporalnamespaces.