# Create Challan

**Method:** `POST`

**Path:** `/api/pay/v1/order/{order_id}/challan`

**Category:** E-Challans

**Authentication:** Required

## Description

Creates an e-challan for a given order. The challan contains virtual account details
that customers can use for payment.


## Path Parameters

- `order_id` (`string`) **required** — Unique identifier of the order in the Pine Labs Online database.

## Request Body

Content-Type: `application/json`

- `convenience_fee_breakdown` (`object`) — An object that contains the convenience fee breakdown details.
  - `fee_amount` (`object`) — An object that contains the fee amount details.
    - `value` (`integer`) — The fee amount in Paisa. Minimum value: 100 (₹1). Maximum value: 100000000 (₹10 lakh). 
    - `currency` (`string`) — Type of currency.

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

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

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

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



### Example Request

```json
{
  "convenience_fee_breakdown": {
    "fee_amount": {
      "value": 1000,
      "currency": "INR"
    },
    "tax_amount": {
      "value": 180,
      "currency": "INR"
    },
    "additional_fee_amount": {
      "value": 0,
      "currency": "INR"
    },
    "maximum_fee_amount": {
      "value": 99999999,
      "currency": "INR"
    },
    "applicable_fee_amount": {
      "value": 1180,
      "currency": "INR"
    }
  }
}
```

## Responses

- `200` — Challan created successfully.
- `400` — 

### Response Schema

- `challan_id` (`string`) — Unique identifier of the challan.
- `order_id` (`string`) — Unique identifier of the order.
- `virtual_account_id` (`string`) — Unique customer account identifier.
- `account_name` (`string`) — Account holder's name.
- `account_ifsc` (`string`) — IFSC code of the account.
- `account_bank_name` (`string`) — Name of the bank.
- `account_bank_branch` (`string`) — Branch of the bank.
- `challan_pdf_url` (`string`) — URL to download the challan PDF.
- `amount_due` (`integer`) — Total amount due against the e-challan (in paisa).
- `expiry_date` (`string`) — Date when the e-challan expires.
- `created_date` (`string`) — ISO 8601 UTC timestamp when the challan was created.

### Example Response

```json
{
  "challan_id": "v1-cha-250912053848-aa-xrldQX",
  "order_id": "v1-250912053834-aa-a6T94l",
  "virtual_account_id": "PINEMFGEPXDRCSOKYO7SUQS8",
  "account_name": "Amazon Group",
  "account_ifsc": "UTIB0005717",
  "account_bank_name": "Axis Bank",
  "account_bank_branch": "Axis Bank Branch, CRC Greater Noida West",
  "challan_pdf_url": "https://payins-service-dev.v2.pinepg.in/api/pay/v1/order/v1-250912053834-aa-a6T94l/challan/pdf",
  "amount_due": 1001180,
  "expiry_date": "2025-09-19",
  "created_date": "2025-09-12T05:38:48.260Z"
}
```

---

Reference: https://localhost:3000/api/e-challans/create-challan
