# Create Debit

**Method:** `POST`

**Path:** `/ps/api/v1/public/subscriptions/execute`

**Category:** Subscriptions - Presentations

**Authentication:** Required

## Description

Executes a debit (payment collection) against a subscription.
Use this when the PDN (Pre-Debit Notification) is controlled by you.


## Request Body

Content-Type: `application/json`

- `presentation_id` (`string`) — Presentation ID from Pine Labs.
- `merchant_presentation_reference` (`string`) — Merchant presentation reference.
- `is_merchant_retry` (`string`) — Set to true to control retry process yourself.

### Example Request

```json
{
  "presentation_id": "v1-pre-4405071524-aa-qlAtAf",
  "merchant_presentation_reference": "1234567890",
  "is_merchant_retry": "false"
}
```

## Responses

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

### Response Schema

- `subscription_id` (`string`) — Unique identifier for the subscription.
- `presentation_id` (`string`) — Unique identifier for the presentation.
- `due_date` (`string`) — The ISO 8601 UTC Timestamp when the payment is due.
- `amount` (`object`) — Monetary amount with currency for subscription-related APIs.
  - `value` (`integer`) **required** — Amount in the smallest currency unit (paisa for INR). Minimum ₹1 (100), maximum ₹10 lakh (100000000).
  - `currency` (`string`) **required** — Three-letter ISO 4217 currency code.

- `merchant_presentation_reference` (`string`) — Unique identifier of the merchant presentation reference.
- `status` (`CREATED | PENDING | PAUSED | CANCELLED | FAILED | COMPLETED`) — Debit status. - CREATED: Presentation request successfully received. - PENDING: Pre-debit notification initiated. - PAUSED: Subscription is paused. - CANCELLED: Subscription is cancelled. - FAILED: Pre-debit notification or customer debit fails (up to 3 retries). - COMPLETED: Debit is successful. 

### Example Response

```json
{
  "subscription_id": "v1-sub-4405071524-aa-qlAtAf",
  "presentation_id": "v1-pre-4405071524-aa-qlAtAf",
  "due_date": "2024-03-15T10:30:00Z",
  "amount": {
    "value": 1000,
    "currency": "INR"
  },
  "merchant_presentation_reference": "1234567890",
  "status": "CREATED"
}
```

---

Reference: https://localhost:3000/api/subscriptions-presentations/create-debit
