# `AdyenClient.Checkout.Payments`
[🔗](https://github.com/iamkanishka/adyen_client/blob/v1.0.0/lib/adyen_client/checkout/payments.ex#L1)

Adyen Checkout Payments API.

Handles payment method listing, transaction initiation, detail submission,
and card BIN details.

# `create`

```elixir
@spec create(
  map(),
  keyword()
) :: AdyenClient.Client.response()
```

Start a payment transaction (Advanced flow).

## Required fields
- `amount`
- `merchantAccount`
- `reference`
- `paymentMethod` — payment method details or encrypted data
- `returnUrl`

## Optional notable fields
- `shopperReference` — for tokenization
- `storePaymentMethod` — boolean
- `recurringProcessingModel` — `"CardOnFile"` | `"Subscription"` | `"UnscheduledCardOnFile"`
- `additionalData` — map of extra fields
- `lineItems` — for Level 2/3 data
- `browserInfo` — required for 3DS
- `channel` — `"Web"` | `"iOS"` | `"Android"`

# `get_card_details`

```elixir
@spec get_card_details(
  map(),
  keyword()
) :: AdyenClient.Client.response()
```

Get the brand and other details of a card based on partial card number.

## Required fields
- `merchantAccount`
- `cardNumber` — at least 6 digits

# `list_payment_methods`

```elixir
@spec list_payment_methods(
  map(),
  keyword()
) :: AdyenClient.Client.response()
```

Get a list of available payment methods for the given context.

## Required fields
- `merchantAccount`
- `amount` — used to filter methods that support the currency/amount
- `countryCode` — ISO 3166-1 alpha-2

## Example

    AdyenClient.Checkout.Payments.list_payment_methods(%{
      merchantAccount: "YourMerchantECOM",
      amount: %{currency: "EUR", value: 1000},
      countryCode: "NL"
    })

# `submit_details`

```elixir
@spec submit_details(
  map(),
  keyword()
) :: AdyenClient.Client.response()
```

Submit additional details for a payment (e.g. after 3DS redirect).

## Required fields
- `details` — map of additional data (e.g. `%{"redirectResult" => "..."}`)
- `paymentData` — the `paymentData` value returned by the initial `create/2`

---

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