satim-module - v1.0.0
    Preparing search index...

    Class RegisterResponse

    Immutable wrapper around a registration response.

    Invariants:

    • _raw is a deep clone of the gateway payload, made at construction time.
    • The wrapper exposes no mutator methods; callers cannot affect SDK state.
    Index

    Constructors

    Methods

    • Returns string

      The gateway-assigned order identifier. Always present after construction.

    • Returns string

      The hosted payment form URL.

      SatimMissingDataError when no URL is present. (In practice unreachable because validateRegisterSchema enforces a non-empty formUrl at construction.)

    • Build a Web API 302 redirect to the hosted payment form. Returns a standard Response usable in any Web-API runtime (Cloudflare Workers, Deno, Bun, Node 18+).

      Enforces HTTPS and the TRUSTED_SATIM_HOSTNAMES allowlist — the only barrier against a gateway returning a formUrl on an attacker-controlled domain.

      Returns Response

      SatimInvalidArgumentError when formUrl is not HTTPS, not on a trusted host, or fails URL parsing.