Paddle.Request (paddlex v0.2.0)

Copy Markdown View Source

Low-level HTTP layer for the Paddle API.

Requests are performed with Req. Both post/3 and get/3 accept an opts keyword list of per-call configuration overrides — see Paddle.Config for the supported keys.

Summary

Functions

Performs a GET request against the checkout API.

Performs a POST request against the vendors API, merging the configured vendor_id/vendor_auth_code credentials into params.

Functions

get(path, params \\ %{}, opts \\ [])

@spec get(String.t(), map(), keyword()) :: {:ok, term()} | {:error, Paddle.Error.t()}

Performs a GET request against the checkout API.

post(path, params \\ %{}, opts \\ [])

@spec post(String.t(), map(), keyword()) :: {:ok, term()} | {:error, Paddle.Error.t()}

Performs a POST request against the vendors API, merging the configured vendor_id/vendor_auth_code credentials into params.