View Source Stripe.PaymentMethodDomain (stripity_stripe v3.2.0)

A payment method domain represents a web domain that you have registered with Stripe. Stripe Elements use registered payment method domains to control where certain payment methods are shown.

Related guides: Payment method domains.

Summary

Types

t()

The payment_method_domain type.

Functions

Creates a payment method domain.

Lists the details of existing payment method domains.

Retrieves the details of an existing payment method domain.

Updates an existing payment method domain.

Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren’t satisfied when the domain was created, the payment method will be inactive on the domain.The payment method doesn’t appear in Elements for this domain until it is active.

Types

@type t() :: %Stripe.PaymentMethodDomain{
  apple_pay: term(),
  created: integer(),
  domain_name: binary(),
  enabled: boolean(),
  google_pay: term(),
  id: binary(),
  link: term(),
  livemode: boolean(),
  object: binary(),
  paypal: term()
}

The payment_method_domain type.

  • apple_pay
  • created Time at which the object was created. Measured in seconds since the Unix epoch.
  • domain_name The domain name that this payment method domain object represents.
  • enabled Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements.
  • google_pay
  • id Unique identifier for the object.
  • link
  • livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
  • object String representing the object's type. Objects of the same type share the same value.
  • paypal

Functions

Link to this function

create(params \\ %{}, opts \\ [])

View Source
@spec create(
  params :: %{
    optional(:domain_name) => binary(),
    optional(:enabled) => boolean(),
    optional(:expand) => [binary()]
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Creates a payment method domain.

Details

  • Method: post
  • Path: /v1/payment_method_domains
Link to this function

list(params \\ %{}, opts \\ [])

View Source
@spec list(
  params :: %{
    optional(:domain_name) => binary(),
    optional(:enabled) => boolean(),
    optional(:ending_before) => binary(),
    optional(:expand) => [binary()],
    optional(:limit) => integer(),
    optional(:starting_after) => binary()
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Lists the details of existing payment method domains.

Details

  • Method: get
  • Path: /v1/payment_method_domains
Link to this function

retrieve(payment_method_domain, params \\ %{}, opts \\ [])

View Source
@spec retrieve(
  payment_method_domain :: binary(),
  params :: %{optional(:expand) => [binary()]},
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Retrieves the details of an existing payment method domain.

Details

  • Method: get
  • Path: /v1/payment_method_domains/{payment_method_domain}
Link to this function

update(payment_method_domain, params \\ %{}, opts \\ [])

View Source
@spec update(
  payment_method_domain :: binary(),
  params :: %{optional(:enabled) => boolean(), optional(:expand) => [binary()]},
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Updates an existing payment method domain.

Details

  • Method: post
  • Path: /v1/payment_method_domains/{payment_method_domain}
Link to this function

validate(payment_method_domain, params \\ %{}, opts \\ [])

View Source
@spec validate(
  payment_method_domain :: binary(),
  params :: %{optional(:expand) => [binary()]},
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren’t satisfied when the domain was created, the payment method will be inactive on the domain.The payment method doesn’t appear in Elements for this domain until it is active.

To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint.

Related guides: Payment method domains.

#### Details * Method: `post` * Path: `/v1/payment_method_domains/{payment_method_domain}/validate`