# `Worldpay.Partner.Boarding`
[🔗](https://github.com/iamkanishka/worldpay/blob/v1.0.0/lib/worldpay/access/partner.ex#L1)

Worldpay **Merchant Boarding API** — onboard merchants programmatically.

Partners (ISOs) collect merchant business information and submit it via
this API, giving full control over the merchant onboarding experience.

## Example

    {:ok, merchant} = Worldpay.Partner.Boarding.create_merchant(%{
      "merchant" => %{
        "businessName" => "Jane's Bakery",
        "businessType" => "soleTrader",
        "mcc" => "5462",
        "website" => "https://janesbakery.com",
        "contact" => %{
          "firstName" => "Jane",
          "lastName" => "Doe",
          "email" => "jane@example.com",
          "phone" => "+441234567890"
        },
        "address" => %{
          "address1" => "123 High Street",
          "city" => "London",
          "postalCode" => "SW1A 1AA",
          "countryCode" => "GB"
        },
        "bankAccount" => %{
          "accountNumber" => "12345678",
          "sortCode" => "010203",
          "accountName" => "Jane Doe"
        }
      }
    }, config)

# `create_merchant`

```elixir
@spec create_merchant(map(), Worldpay.Config.t()) ::
  {:ok, map()} | {:error, Worldpay.Error.t()}
```

Create (board) a new merchant.

# `get_merchant`

```elixir
@spec get_merchant(String.t(), Worldpay.Config.t()) ::
  {:ok, map()} | {:error, Worldpay.Error.t()}
```

Retrieve a boarded merchant by ID.

# `list_merchants`

```elixir
@spec list_merchants(
  keyword(),
  Worldpay.Config.t()
) :: {:ok, map()} | {:error, Worldpay.Error.t()}
```

List boarded merchants for the partner.

# `update_merchant`

```elixir
@spec update_merchant(String.t(), map(), Worldpay.Config.t()) ::
  {:ok, map()} | {:error, Worldpay.Error.t()}
```

Update an existing merchant's details.

---

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