# Offer Discovery

**Method:** `POST`

**Path:** `/api/affordability/v1/offer/discovery`

**Category:** Affordability Suite

**Authentication:** Required

## Description

Use this API to discover offers available on cart amount or product and calculate the EMI.


## Request Body

Content-Type: `application/json`

- `order_amount` (`object`) **required** — An object that contains the transaction amount details.
  - `value` (`integer`) **required** — The transaction amount in Paisa. Minimum value: 100 (₹1). Maximum value: 100000000 (₹10 lakh).
  - `currency` (`string`) **required** — Type of currency.

- `product_details` (`object[]`) — Mandatory for Brand EMI. An object that contains product details.
  - `product_code` (`string`) **required** — Unique identifier for the product.
  - `product_amount` (`object`) — Mandatory Object. An object that contains product amount.
    - `value` (`integer`) **required** — The transaction amount in Paisa.
    - `currency` (`string`) **required** — Type of currency.

  - `product_coupon_discount_amount` (`object`) — An object that contains the product coupon discount amount details.
    - `value` (`integer`) **required** — The transaction amount in Paisa.
    - `currency` (`string`) **required** — Type of currency.


- `cart_coupon_discount_amount` (`object`) — An object that contains the cart coupon discount amount details.
  - `value` (`integer`) **required** — The transaction amount in Paisa.
  - `currency` (`string`) **required** — Type of currency.

- `issuer` (`object`) — An object that contains the issuer details.
  - `bin` (`string`) — Bank Identification Number, First 8 digits of your Card. Has to be 8 digits. Note: Passing the card information will filter the results based on the specific BIN.
  - `id` (`string`) — Mandatory for EMI with Downpayment. Unique Identifier of the issuer.
  - `name` (`string`) — Mandatory for EMI with Downpayment. Name of the issuer.
  - `issuer_type` (`CC_BANK | DC_BANK | CARDLESS_BANK | CC_NBFC | DC_NBFC | CARDLESS_NBFC | NTB | NTB_BANK | NTB_NBFC`) — Mandatory for EMI with Downpayment. The category of the issuer.

- `downpayment_details` (`object`) — Mandatory for EMI with Downpayment. An object that contains the downpayment amount details.
  - `downpayment_amount` (`object`) — An object that contains the downpayment amount details.
    - `value` (`integer`) **required** — The transaction amount in Paisa.
    - `currency` (`string`) **required** — Type of currency.


- `payment_options` (`object`) — An object that contains the details of the payment options. You can use either `card_details` or `card_token_details` as a payment option.
  - `card_details` (`object`) — An object that contains the card details.
    - `card_number` (`string`) — Card Number. Maximum length: 19 characters. Minimum length: 12 characters.

  - `card_token_details` (`object`) — An object that contains the card token details.
    - `token` (`string`) — Either `token` or `token_id` is Mandatory. Unique identifier of the card as per the token transaction type. Minimum: 1 character. Maximum: 50 characters.
    - `token_id` (`string`) — Either `token` or `token_id` is Mandatory. Unique identifier of the token in the Pine Labs database. Maximum length: 50 characters. Note: When `token_id` is included, the `customer_details` object is required.


- `customer_details` (`object`) — An object that contains the customer details.
  - `customer_id` (`string`) — Mandatory when `token_id` is included in the `card_token_details` object. Unique identifier of the customer in the Pine Labs Online database. Minimum length: 1 character. Maximum length: 19 characters.


### Example Request

```json
{
  "order_amount": {
    "value": 1200000,
    "currency": "INR"
  },
  "product_details": [
    {
      "product_code": "xyz",
      "product_amount": {
        "value": 1200000,
        "currency": "INR"
      },
      "product_coupon_discount_amount": {
        "value": 1200000,
        "currency": "INR"
      }
    }
  ],
  "cart_coupon_discount_amount": {
    "value": 1200000,
    "currency": "INR"
  },
  "issuer": {
    "bin": "60100000",
    "id": "2",
    "name": "ICICI DC",
    "issuer_type": "DC_BANK"
  },
  "downpayment_details": {
    "downpayment_amount": {
      "value": 200000,
      "currency": "INR"
    }
  },
  "payment_options": {
    "card_details": {
      "card_number": "4000000000000000"
    },
    "card_token_details": {
      "token": "4000000040001001",
      "token_id": "token-v1-250206114014-aa-nqIJoM"
    }
  },
  "customer_details": {
    "customer_id": "cust-v1-250709071350-aa-1M9thA"
  }
}
```

## Responses

- `200` — 200
- `400` — 400
- `422` — 422

### Response Schema

- `issuers` (`IssuerOffer[]`) — List of issuers with available offers.
  - `id` (`string`) — Unique identifier of the issuer id in the Pine Labs Online database.
  - `name` (`string`) — Name of the Issuer.
  - `display_name` (`string`) — Name of the issuer offering the offer.
  - `issuer_type` (`CC_BANK | DC_BANK | CARDLESS_BANK | CC_NBFC | DC_NBFC | CARDLESS_NBFC | NTB | NTB_BANK | NTB_NBFC`) — The type of the Issuer offering the offer.
  - `priority` (`integer`) — The priority of the issuer providing the offer.
  - `tenures` (`Tenure[]`) — Available EMI tenures for this issuer.
    - `tenure_id` (`string`) — Tenure id in the Pine Labs Online database.
    - `name` (`string`) — The name of the tenure.
    - `tenure_type` (`MONTH`) — The type of the Tenure.
    - `tenure_value` (`integer`) — The value of the tenure.
    - `issuer_offer_parameters` (`object[]`) — Offer parameters for this tenure.
      - `program_type` (`string`) — Type of program. Accepted values: BANK_EMI, BRAND_EMI, MERCHANT_BANK_OFFER, MERCHANT_BRAND_OFFER, BRAND_OFFER, MY_EMI
      - `offer_id` (`string`) — Unique identifier of the offer.
      - `offer_parameter_id` (`string`) — Unique offer parameter identifier.

    - `details` (`object[]`) — Product details array (populated for Brand EMI and Split EMI).
      - `product_code` (`string`)
      - `product_display_name` (`string`)
      - `brand_id` (`string`)
      - `brand_name` (`string`)
      - `product_offer_parameters` (`object[]`)
        - `program_type` (`string`)
        - `offer_id` (`string`)
        - `offer_parameter_id` (`string`)

      - `product_amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)

      - `product_coupon_discount_amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)

      - `subvention` (`object`)
        - `subvention_type` (`INSTANT | POST`)
        - `offer_type` (`LOW_COST | NO_COST | STANDARD`)
        - `percentage` (`number`)
        - `amount` (`object`)
          - `currency` (`string`)
          - `value` (`integer`)

        - `breakup` (`object`)
          - `brand` (`object`)
            - `amount` (`object`)
              - `currency` (`string`)
              - `value` (`integer`)



        - `max_amount` (`object`)
          - `currency` (`string`)
          - `value` (`integer`)

        - `min_amount` (`object`)
          - `currency` (`string`)
          - `value` (`integer`)


      - `discount` (`object`)
        - `discount_type` (`INSTANT | DEFERRED`)
        - `discount_string` (`string`)
        - `percentage` (`number`)
        - `amount` (`object`)
          - `currency` (`string`)
          - `value` (`integer`)

        - `max_amount` (`object`)
          - `currency` (`string`)
          - `value` (`integer`)

        - `breakup` (`object`)
          - `merchant` (`object`)
            - `amount` (`object`)
              - `currency` (`string`)
              - `value` (`integer`)


          - `brand` (`object`)
            - `amount` (`object`)
              - `currency` (`string`)
              - `value` (`integer`)



        - `discount_deferred_duration_value` (`integer`)
        - `discount_deferred_duration_type` (`DAY | MONTH`)

      - `interest_amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)

      - `interest_rate` (`number`)
      - `cart_coupon_discount_product_share` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)

      - `downpayment_amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)

      - `after_downpayment_reduced_product_amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)

      - `bundle_id` (`string`) — Unique identifier of the bundle offer. Returned only for SKUs configured for bundled offers.

    - `discount` (`object`) — Tenure-level discount details.
      - `discount_type` (`INSTANT | DEFERRED`)
      - `discount_string` (`string`)
      - `percentage` (`number`)
      - `amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)

      - `max_amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)

      - `breakup` (`object`)
        - `merchant` (`object`)
          - `amount` (`object`)
            - `currency` (`string`)
            - `value` (`integer`)


        - `brand` (`object`)
          - `amount` (`object`)
            - `currency` (`string`)
            - `value` (`integer`)


        - `issuer` (`object`)
          - `amount` (`object`)
            - `currency` (`string`)
            - `value` (`integer`)


        - `dealer` (`object`)
          - `amount` (`object`)
            - `currency` (`string`)
            - `value` (`integer`)



      - `discount_deferred_duration_value` (`integer`)
      - `discount_deferred_duration_type` (`DAY | MONTH`)

    - `auth_amount` (`object`)
      - `currency` (`string`)
      - `value` (`integer`)

    - `loan_amount` (`object`)
      - `currency` (`string`)
      - `value` (`integer`)

    - `total_discount_amount` (`object`)
      - `currency` (`string`)
      - `value` (`integer`)

    - `net_payment_amount` (`object`)
      - `currency` (`string`)
      - `value` (`integer`)

    - `monthly_emi_amount` (`object`)
      - `currency` (`string`)
      - `value` (`integer`)

    - `total_emi_amount` (`object`)
      - `currency` (`string`)
      - `value` (`integer`)

    - `interest_amount` (`object`)
      - `currency` (`string`)
      - `value` (`integer`)

    - `total_subvention_amount` (`object`)
      - `currency` (`string`)
      - `value` (`integer`)

    - `split_emi_display_name` (`string`) — Name of the split EMI. Returned only if the brand provides a display name.
    - `split_emi_amount` (`object`)
      - `currency` (`string`)
      - `value` (`integer`)

    - `split_emi_percentage` (`number`) — Interest rate percentage for the split.
    - `interest_rate_percentage` (`number`) — Interest rate percentage for the tenure.
    - `processing_fee_details` (`object`) — Processing fee details.
      - `percentage` (`number`)
      - `amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)


    - `processing_fee_amount` (`object`)
      - `currency` (`string`)
      - `value` (`integer`)

    - `convenience_fee_breakdown` (`object`) — Convenience fee breakdown details.
      - `fee_calculated_on_amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)

      - `fee_amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)

      - `tax_amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)

      - `additional_fee_amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)

      - `maximum_fee_amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)

      - `applicable_fee_amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)

      - `subvented_fee_amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)


    - `cart_coupon_discount_amount` (`object`)
      - `currency` (`string`)
      - `value` (`integer`)

    - `total_coupon_discount` (`object`)
      - `currency` (`string`)
      - `value` (`integer`)

    - `total_down_payment_amount` (`object`)
      - `currency` (`string`)
      - `value` (`integer`)

    - `downpayment_details` (`object`) — Down payment details within tenure.
      - `downpayment_amount` (`object`)
        - `currency` (`string`)
        - `value` (`integer`)


    - `emi_type` (`LOW_COST | NO_COST | STANDARD`) — Type of EMI.

  - `issuer_data` (`object`) — Issuer-specific data including OTP and consent details.
    - `otp_length` (`integer`) — Length of the OTP.
    - `otp_time_in_sec` (`integer`) — OTP validity time in seconds.
    - `otp_retry_count` (`integer`) — Maximum OTP retry count.
    - `is_consent_page_required` (`boolean`) — Whether consent page is required.
    - `consent_data` (`string`) — Transaction consent data (HTML).
    - `terms_and_conditions` (`string`) — Transaction terms and conditions.
    - `show_key_fact_statement` (`boolean`) — Whether key fact statement needs to be displayed.
    - `auth_type` (`PENNY_DROP | OTP`) — Authentication type.
    - `penny_transaction_amount` (`object`)
      - `currency` (`string`)
      - `value` (`integer`)

    - `is_tokenized_transaction_supported` (`boolean`) — Whether tokenized transactions are supported.
    - `pan_number_last_digit_count` (`integer`) — Last digit count of PAN.
    - `offer_validation_parameters_required` (`string`) — Parameters required in offer validation API.



### Example Response

```json
{
  "issuers": [
    {
      "id": "23",
      "name": "INDUSIND CC",
      "display_name": "INDUSIND",
      "issuer_type": "CC_BANK",
      "priority": 1,
      "tenures": [
        {
          "tenure_id": "1",
          "name": "3 Months",
          "tenure_type": "MONTH",
          "tenure_value": 3,
          "issuer_offer_parameters": [
            {
              "program_type": "BANK_EMI",
              "offer_id": "1563",
              "offer_parameter_id": "63813"
            }
          ],
          "details": [
            {
              "product_code": "redmi_1",
              "product_display_name": "Redmi Note 14 5G",
              "brand_id": "3",
              "brand_name": "Xiaomi",
              "product_offer_parameters": [
                {
                  "program_type": "BRAND_OFFER",
                  "offer_id": "309",
                  "offer_parameter_id": "20"
                }
              ],
              "product_amount": {
                "currency": "INR",
                "value": 2000000
              },
              "product_coupon_discount_amount": {
                "currency": "INR",
                "value": 1000
              },
              "subvention": {
                "subvention_type": "INSTANT",
                "offer_type": "NO_COST",
                "percentage": 5,
                "amount": {
                  "currency": "INR",
                  "value": 85714
                },
                "breakup": {
                  "brand": {
                    "amount": {
                      "currency": "INR",
                      "value": 85714
                    }
                  }
                },
                "max_amount": {
                  "currency": "INR"
                },
                "min_amount": {
                  "currency": "INR"
                }
              },
              "discount": {
                "discount_type": "INSTANT",
                "percentage": 10,
                "amount": {
                  "currency": "INR",
                  "value": 200000
                },
                "max_amount": {
                  "currency": "INR",
                  "value": 200000
                },
                "breakup": {
                  "merchant": {
                    "amount": {
                      "currency": "INR",
                      "value": 100000
                    }
                  },
                  "brand": {
                    "amount": {
                      "currency": "INR",
                      "value": 100000
                    }
                  }
                },
                "discount_deferred_duration_type": "DAY"
              },
              "interest_amount": {
                "currency": "INR"
              },
              "interest_rate": 16,
              "cart_coupon_discount_product_share": {
                "currency": "INR"
              },
              "downpayment_amount": {
                "currency": "INR",
                "value": 200000
              },
              "after_downpayment_reduced_product_amount": {
                "currency": "INR",
                "value": 200000
              },
              "bundle_id": "BUNDLE_002_OE3"
            }
          ],
          "discount": {
            "discount_type": "INSTANT",
            "percentage": 10,
            "amount": {
              "currency": "INR",
              "value": 200000
            },
            "max_amount": {
              "currency": "INR",
              "value": 400000
            },
            "breakup": {
              "merchant": {
                "amount": {
                  "currency": "INR",
                  "value": 100000
                }
              },
              "brand": {
                "amount": {
                  "currency": "INR",
                  "value": 100000
                }
              },
              "issuer": {
                "amount": {
                  "currency": "INR"
                }
              },
              "dealer": {
                "amount": {
                  "currency": "INR"
                }
              }
            },
            "discount_deferred_duration_type": "DAY"
          },
          "auth_amount": {
            "currency": "INR",
            "value": 1200000
          },
          "loan_amount": {
            "currency": "INR",
            "value": 1200000
          },
          "total_discount_amount": {
            "currency": "INR",
            "value": 200000
          },
          "net_payment_amount": {
            "currency": "INR",
            "value": 1232139
          },
          "monthly_emi_amount": {
            "currency": "INR",
            "value": 410713
          },
          "total_emi_amount": {
            "currency": "INR",
            "value": 1232139
          },
          "interest_amount": {
            "currency": "INR",
            "value": 32139
          },
          "total_subvention_amount": {
            "currency": "INR"
          },
          "split_emi_display_name": "Apple Live",
          "split_emi_amount": {
            "currency": "INR",
            "value": 2358490
          },
          "split_emi_percentage": 25,
          "interest_rate_percentage": 16,
          "processing_fee_details": {
            "percentage": 0,
            "amount": {
              "currency": "INR",
              "value": 19900
            }
          },
          "processing_fee_amount": {
            "currency": "INR",
            "value": 19900
          },
          "convenience_fee_breakdown": {
            "fee_calculated_on_amount": {
              "currency": "INR"
            },
            "fee_amount": {
              "currency": "INR",
              "value": 100
            },
            "tax_amount": {
              "currency": "INR",
              "value": 19
            },
            "additional_fee_amount": {
              "currency": "INR",
              "value": 10
            },
            "maximum_fee_amount": {
              "currency": "INR",
              "value": 99999999
            },
            "applicable_fee_amount": {
              "currency": "INR",
              "value": 129
            },
            "subvented_fee_amount": {
              "currency": "INR"
            }
          },
          "cart_coupon_discount_amount": {
            "currency": "INR"
          },
          "total_coupon_discount": {
            "currency": "INR"
          },
          "total_down_payment_amount": {
            "currency": "INR",
            "value": 200000
          },
          "downpayment_details": {
            "downpayment_amount": {
              "currency": "INR",
              "value": 200000
            }
          },
          "emi_type": "STANDARD"
        }
      ],
      "issuer_data": {
        "otp_length": 5,
        "otp_time_in_sec": 180,
        "otp_retry_count": 5,
        "is_consent_page_required": true,
        "terms_and_conditions": "Sample TNC",
        "show_key_fact_statement": true,
        "auth_type": "PENNY_DROP",
        "penny_transaction_amount": {
          "currency": "INR",
          "value": 100
        },
        "is_tokenized_transaction_supported": false,
        "pan_number_last_digit_count": 3
      }
    }
  ]
}
```

---

Reference: https://localhost:3000/api/affordability-suite/create-offer-discovery
