Sumup.PaymentInstruments (Sumup v1.0.0)

Copy Markdown View Source

Payment instruments: tokenized cards saved against a Sumup.Customer, created as a side effect of a Sumup.Checkouts.process/3 call with purpose: "SETUP" (or a regular charge that opts to save the method). API version v0.1.

Summary

Functions

Deactivates a saved payment instrument so it can no longer be charged.

Lists all payment instruments saved for a customer.

Functions

deactivate(config, customer_id, token)

@spec deactivate(Sumup.Config.t(), String.t(), String.t()) ::
  :ok | {:error, Sumup.Error.t()}

Deactivates a saved payment instrument so it can no longer be charged.

list(config, customer_id)

@spec list(Sumup.Config.t(), String.t()) ::
  {:ok, [Sumup.PaymentInstrument.t()]} | {:error, Sumup.Error.t()}

Lists all payment instruments saved for a customer.