Moov.ApplePay (Moov v1.0.0)

Copy Markdown View Source

Support for Apple Pay as a payment source: accepting it (apple-pay), disbursing to it (push-to-apple-pay), and - for approved use cases - pulling from it (pull-from-apple-pay). Linking a single token returns every supported Apple Pay payment method at once.

See https://docs.moov.io/api/sources/apple-pay/.

Summary

Functions

Creates an Apple Pay merchant validation session for the client to complete the Apple Pay JS flow.

Exchanges an Apple Pay payment token for a Moov payment method (params: %{token: ...}).

Gets the registered Apple Pay domains for an account.

Registers domains for Apple Pay on the Web (params: %{domain_names: [...]}).

Updates the registered Apple Pay domains for an account.

Functions

create_session(client, account_id, params)

@spec create_session(Moov.Client.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Creates an Apple Pay merchant validation session for the client to complete the Apple Pay JS flow.

create_token(client, account_id, params)

@spec create_token(Moov.Client.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Exchanges an Apple Pay payment token for a Moov payment method (params: %{token: ...}).

get_domains(client, account_id)

@spec get_domains(Moov.Client.t(), String.t()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Gets the registered Apple Pay domains for an account.

register_domains(client, account_id, params)

@spec register_domains(Moov.Client.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Registers domains for Apple Pay on the Web (params: %{domain_names: [...]}).

update_domains(client, account_id, params)

@spec update_domains(Moov.Client.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Moov.Error.t()}

Updates the registered Apple Pay domains for an account.