Packages

A production-grade, fully-typed Elixir client for the SumUp API (Checkouts, Readers, Customers, Transactions, Payouts, Receipts, Members, Memberships, Roles and Merchants) with telemetry, retries, cursor streaming, webhook handling, and RFC 9457 aware error handling.

Current section

Files

Jump to
sumup lib sumup.ex
Raw

lib/sumup.ex

defmodule Sumup do
@external_resource "README.md"
@moduledoc """
A production-grade Elixir client for the [SumUp API](https://developer.sumup.com/api).
## Installation
def deps do
[{:sumup, "~> 0.1"}]
end
## Quick start
config = Sumup.Config.new!(api_key: {:system, "SUMUP_API_KEY"})
{:ok, checkout} =
Sumup.Checkouts.create(config,
checkout_reference: "order-1234",
amount: 10.50,
currency: "EUR",
merchant_code: "MC12345"
)
Every resource is its own module (`Sumup.Checkouts`, `Sumup.Readers`,
`Sumup.Customers`, `Sumup.PaymentInstruments`, `Sumup.Transactions`,
`Sumup.Payouts`, `Sumup.Receipts`, `Sumup.Members`, `Sumup.Memberships`,
`Sumup.Roles`, `Sumup.Merchants`) exposing typed structs
(`Sumup.Checkout`, `Sumup.Reader`, ...) built on a shared transport
(`Sumup.Client`) with unified error handling (`Sumup.Error`), retries,
and `:telemetry` instrumentation (`Sumup.Telemetry`). `Sumup.Webhooks`
handles incoming checkout webhooks — see its moduledoc for why that
means re-fetching from the API rather than checking a signature. See
the README for a full architecture overview.
"""
end