# `Stancer.API.Checkout`

# `create`

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

POST `/v2/checkout/`

## Parameters

  * `amount` (integer, optional) - Amount in positive integer format
  * `auth` (object, optional)
  * `billing_address` (string (matches ^addr_[a-zA-Z0-9]{24}$), optional) - Billing address ID
    - Example: "addr_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `capture` (boolean, optional) - Capture the funds or not
  * `card` (object, optional) - Card associated with the payment
    - Example: "card_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `currency` (string, optional) - Currency
  * `customer` (object, optional)
  * `date_settlement` (string (format: date), optional) - Settlement date in YYYY-MM-DD format
  * `description` (string (3-64 chars), optional) - Amount in positive integer format
  * `device` (object, optional)
  * `methods_allowed` (array (min 1 chars), optional) - All methods allowed for the payment
  * `order_id` (object, optional) - Non unique id without unicity check
  * `return_url` (string (1-65536 chars, format: uri), optional) - Merchant return url
  * `sepa` (object, optional) - Sepa associated with the payment
    - Example: "sepa_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `shipping_address` (string (matches ^addr_[a-zA-Z0-9]{24}$), optional) - Shipping address ID
    - Example: "addr_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `unique_id` (string (1-36 chars, format: binary), optional) - Unique id with unicity check
  * `wallet` (object, optional) - Wallet object containing a wallet payment token

# `get`

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

GET `/v2/checkout/{id}`

# `list`

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

GET `/v2/checkout/`

# `update`

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

PATCH `/v2/checkout/{id}`

## Parameters

  * `amount` (integer, optional) - Amount in positive integer format
  * `auth` (object, optional) - Activate 3ds authentication system
  * `billing_address` (string (matches ^addr_[a-zA-Z0-9]{24}$), optional) - Billing address ID
    - Example: "addr_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `capture` (boolean, optional) - Capture status of the payment
  * `card` (object, optional)
  * `currency` (string, optional) - Currency in 3 digit format
  * `customer` (object, optional)
  * `date_settlement` (string (format: date), optional) - Settlement date in YYYY-MM-DD format
  * `description` (string (3-64 chars), optional) - A small description
  * `device` (object, optional)
  * `methods_allowed` (array, optional)
  * `order_id` (string (1-36 chars, format: binary), optional) - Non unique id without unicity check
  * `return_url` (string (1-65536 chars, format: uri), optional)
  * `sepa` (object, optional)
  * `shipping_address` (string (matches ^addr_[a-zA-Z0-9]{24}$), optional) - Shipping address ID
    - Example: "addr_yWYfCSzsUUhr9KwMv7vuLZHX"
  * `status` (string, optional)
  * `wallet` (object, optional)

---

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