@pwngh/economy-lab
    Preparing search index...

    Function httpProcessor

    • Build a Processor that pays sellers via an external provider over HTTP. It asks the provider to send money; it does not touch our ledger.

      submitPayout POSTs { key, userId, amount }: the idempotency key (a resend pays out only once), an opaque recipient token (no personal information), and the USD to pay as a decimal string. It reads back the provider's reference id. A failed send or non-2xx status is retryable. A 2xx with no reference id is non-retryable: the money may already have been sent, so retrying could pay twice; reconciliation resolves the ambiguity.

      Parameters

      • config: HttpProcessorConfig

      Returns Processor

      Processor for how the payout port plugs into the ledger.