# Check BNPL Eligibility

**Method:** `POST`

**Path:** `/api/payment-option/eligibility/bnpl`

**Category:** BNPL

**Authentication:** Required

## Description

Check whether a customer is eligible for Buy Now Pay Later (BNPL) payment
based on their mobile number and the selected BNPL provider.


## Request Body

Content-Type: `application/json`

- `mobile` (`string`) **required** — Customer's 10-digit mobile number without country code.
- `pay_code` (`LAZYPAY`) **required** — BNPL service provider code.
- `amount` (`object`) **required** — Monetary amount with currency.
  - `value` (`integer`) **required** — Amount in the smallest currency unit (e.g., paisa for INR).
  - `currency` (`string`) **required** — Three-letter ISO 4217 currency code.

- `device_info` (`object`) — Device information details.
  - `operating_system` (`ANDROID | IOS | MACOS | WINDOWS`) — Type of operating system of the device. **Mandatory when the request is made from a mobile platform.** 
  - `source_ip_address` (`string`) — The IP address of the user's device initiating the request, used for security validation and fraud detection.
  - `browser_ip_address` (`string`) — The IP address captured from the user's browser during the transaction.
  - `browser_user_agent` (`string`) — The user's browser information string, used to identify the browser, device type, and operating system.
  - `device_model` (`string`) — The model of the user's device.
  - `device_manufacturer` (`string`) — The name of the company that manufactured the user's device.

- `email` (`string`) — Customer's email address.

### Example Request

```json
{
  "mobile": "9876543210",
  "pay_code": "LAZYPAY",
  "amount": {
    "value": 50000,
    "currency": "INR"
  },
  "device_info": {
    "operating_system": "ANDROID",
    "source_ip_address": "10.11.19.2",
    "browser_ip_address": "203.0.113.42",
    "browser_user_agent": "Chrome",
    "device_model": "Samsung S21 Ultra",
    "device_manufacturer": "Samsung"
  },
  "email": "john.doe@example.com"
}
```

## Responses

- `200` — Eligibility check completed.
- `400` — 
- `401` — 
- `422` — Unprocessable entity.
- `500` — 

### Response Schema

- `txn_eligibility` (`boolean`) — Whether the customer is eligible for BNPL.
- `metadata` (`object`) — Credit limit meta information.
  - `credit_limit_available_in_paise` (`string`) — Running line of credit limit available in paise.
  - `installments` (`object[]`) — Installment breakdown for BNPL.
    - `serial_no` (`integer`) — Installment serial number.
    - `amount_in_paise` (`integer`) — Installment amount in paise.
    - `due_date` (`string`) — Installment due date.



### Example Response

```json
{
  "txn_eligibility": true,
  "metadata": {
    "credit_limit_available_in_paise": "0",
    "installments": [
      {
        "serial_no": 1,
        "amount_in_paise": 1134,
        "due_date": "2025-06-30"
      }
    ]
  }
}
```

---

Reference: https://localhost:3000/api/bnpl/check-bnpleligibility
