A production-grade Elixir client for the SumUp API.
Installation
def deps do
[{:sumup, "~> 0.1"}]
endQuick 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.