# APM Installments

The `apm-installments` endpoint allows you to retrieve available installment plans for specific Alternative Payment Methods (APMs). This is particularly useful for integrations like NuPay, where you may want to present installment options to the customer before finalizing the payment.

### Usage Scenarios

Depending on your integration flow, you will use this endpoint differently:

*   **Enrollment Flow**: Used when a customer has already enrolled their NuPay account. You'll need to provide the `vaulted_token` and the customer `id`.
*   **2FA Mode (Direct)**: Used for direct integrations where you collect customer details (email/document) to initiate a two-factor authentication flow.

<Note>
This endpoint is currently specific to certain APMs. For standard credit card installments, please refer to the [Installments Plan](/reference/installments/get-installments-plan) documentation.
</Note>

**POST** `/apm-installments`

Base URL: `https://api-sandbox.whitelabel.com/v1`

Retrieve available installment plans for specific Alternative Payment Methods (APMs). This is useful for integrations like NuPay, where you may want to present installment options to the customer before finalizing the payment.

## Authorization

- public-api-key (apiKey in header)
- private-secret-key (apiKey in header)
- X-Account-Code (apiKey in header)

## Body

Content type: `application/json`

- `country` (string, required)
  ISO 3166-1 alpha-2 country code (e.g., BR).
- `amount` (object, required)
  - `currency` (string, required)
    ISO 4217 currency code.
  - `value` (string, required)
    Amount in minor units.
- `customer` (object)
  Customer data. Can include id or email and document details.
  - `id` (string)
    WHITELABEL customer ID.
  - `email` (string<email>)
  - `document` (object)
    - `type` ("CPF" | "CNPJ")
    - `number` (string)
- `payment_method` ("NU_PAY" | "NU_PAY_ENROLLMENT" | "APPLE_PAY", required)
  The alternative payment method to retrieve installments for.
- `vaulted_token` (string)
  Required for enrollment flow.

Example:

```json
{
  "country": "BR",
  "amount": {
    "currency": "BRL",
    "value": "25000"
  },
  "customer": {
    "id": "c9d0e1f2-3a4b-5c6d-7e8f-9a0b1c2d3e4f",
    "email": "customer@example.com",
    "document": {
      "type": "CPF",
      "number": "00000000000"
    }
  },
  "payment_method": "NU_PAY_ENROLLMENT",
  "vaulted_token": "vaulted_token_uuid"
}
```

## Responses

### 200

List of available installment plans.

- `installment` (integer)
- `amount` (object)
  - `currency` (string)
  - `value` (number)
- `rate` (number)

Example:

```json
[
  {
    "installment": 0,
    "amount": {
      "currency": "string",
      "value": 0
    },
    "rate": 0
  }
]
```