HTTP client for making requests to the Razorpay API.
This module handles all HTTP communication with Razorpay's servers, including authentication, request formatting, and response parsing.
Usage
# Using the default client
{:ok, response} = RazorpayEx.Client.request(:get, "/payments/pay_123")
# With custom options
{:ok, response} = RazorpayEx.Client.request(:post, "/orders", %{amount: 50000}, timeout: 60000)
Summary
Functions
Makes a raw HTTP request without automatic entity transformation.
Types
@type http_method() :: :get | :post | :put | :patch | :delete
@type request_options() :: keyword()
@type response() :: {:ok, map() | list()} | {:error, RazorpayEx.Error.t()}
Functions
@spec raw_request(http_method(), String.t(), map(), request_options()) :: {:ok, map()} | {:error, RazorpayEx.Error.t()}
Makes a raw HTTP request without automatic entity transformation.
This is useful when you need access to the raw HTTP response.
Examples
{:ok, response} =
RazorpayEx.Client.raw_request(:get, "/payments/pay_123")
@spec request(http_method(), String.t(), map(), request_options()) :: response()