# `Stancer.API.PaymentIntents`

# `create`

```elixir
@spec create(map()) :: {:ok, map()} | {:error, term()}
```

POST `/v2/payment_intents/`

## Parameters

  * `amount` (integer, optional)
  * `billing_address` (string (matches ^addr_[a-zA-Z0-9]{24}$), optional) - Billing address ID
    - Example: "addr_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `capture` (boolean, optional)
  * `card` (string (matches ^card_[a-zA-Z0-9]{24}$), optional)
    - Example: "card_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `currency` (string, optional)
  * `customer` (string (matches ^cust_[a-zA-Z0-9]{24}$), optional)
    - Example: "cust_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `date_settlement` (string (format: date), optional)
  * `description` (string (3-64 chars), optional)
  * `metadata` (object, optional)
  * `methods_allowed` (array, optional)
  * `order_id` (string (1-36 chars, format: binary), optional)
  * `return_url` (string (1-65536 chars, format: uri), optional)
  * `sepa` (string (matches ^sepa_[a-zA-Z0-9]{24}$), optional)
    - Example: "sepa_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `shipping_address` (string (matches ^addr_[a-zA-Z0-9]{24}$), optional) - Shipping address ID
    - Example: "addr_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `threeds` (object, optional)
  * `unique_id` (string (1-36 chars, format: binary), optional)

# `delete`

```elixir
@spec delete(String.t()) :: {:ok, map()} | {:error, term()}
```

DELETE `/v2/payment_intents/{id}`

# `get`

```elixir
@spec get(String.t()) :: {:ok, map()} | {:error, term()}
```

GET `/v2/payment_intents/{id}`

# `list`

```elixir
@spec list() :: {:ok, map()} | {:error, term()}
```

GET `/v2/payment_intents/`

# `update`

```elixir
@spec update(String.t(), map()) :: {:ok, map()} | {:error, term()}
```

PATCH `/v2/payment_intents/{id}`

## Parameters

  * `amount` (integer, optional)
  * `billing_address` (string (matches ^addr_[a-zA-Z0-9]{24}$), optional) - Billing address ID
    - Example: "addr_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `capture` (boolean, optional)
  * `card` (string (matches ^card_[a-zA-Z0-9]{24}$), optional)
    - Example: "card_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `currency` (string, optional)
  * `customer` (string (matches ^cust_[a-zA-Z0-9]{24}$), optional)
    - Example: "cust_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `date_settlement` (string (format: date), optional)
  * `description` (string (3-64 chars), optional)
  * `metadata` (object, optional)
  * `methods_allowed` (array, optional)
  * `order_id` (string (1-36 chars, format: binary), optional)
  * `return_url` (string (1-65536 chars, format: uri), optional)
  * `sepa` (string (matches ^sepa_[a-zA-Z0-9]{24}$), optional)
    - Example: "sepa_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `shipping_address` (string (matches ^addr_[a-zA-Z0-9]{24}$), optional) - Shipping address ID
    - Example: "addr_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `threeds` (object, optional)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
