Better Payment 0.11.1 API
    Preparing search index...

    Class HttpClient

    Minimal HTTP client on fetch, so the library runs on Node.js, Deno, Bun and edge runtimes. Logs requests without bodies (they contain card data and credentials), and retries only idempotent requests: GET/HEAD/OPTIONS or requests marked retryable. Payment, refund and cancel requests are never retried, because a timeout after the provider received the request would otherwise charge or refund twice.

    Index
    • Parameters

      • options: HttpClientOptions

      Returns HttpClient

    post

    • post<T = unknown>(
          url: string,
          data?: string,
          config?: HttpRequestConfig,
      ): Promise<HttpResponse<T>>

      Type Parameters

      • T = unknown

      Parameters

      Returns Promise<HttpResponse<T>>