# Get Presentation by Subscription ID

Use this API to get a presentation request by subscription Id.

## Environment

Use our UAT environment endpoint for testing and for integration utilize our production endpoint.

| Environment                    | Endpoints                                                                                       |
| :----------------------------- | :---------------------------------------------------------------------------------------------- |
| User Acceptance Testing \[UAT] | `https://pluraluat.v2.pinepg.in/ps/api/v1/public/subscriptions/{subscription_id}/presentations` |
| Production \[PROD]             | `https://api.pluralpay.in/ps/api/v1/public/subscriptions/{subscription_id}/presentations`       |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "subscription",
    "version": "3.0"
  },
  "servers": [
    {
      "url": "https://pluraluat.v2.pinepg.in/ps/api/v1/public"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/subscriptions/{subscription_id}/presentations": {
      "get": {
        "summary": "Get Presentation by Subscription ID",
        "description": "Use this API to get a presentation request by subscription Id.",
        "operationId": "get-presentation-by-subscription-id",
        "parameters": [
          {
            "name": "subscription_id",
            "in": "path",
            "description": "Unique identifier for the subscription in the plural database.<ul><li>Maximum length: 50 characters.</ul></li>Example: `v1-sub-4405071524-aa-qlAtAf`",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "size",
            "in": "query",
            "description": "Number of items per page.<br><br>Example: `10`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number.<br><br>Example: `2`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sorting order for results.<br><br>Example: `frequency_type,asc`",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "Authorization"
                ],
                "properties": {
                  "Content-Type": {
                    "type": "string",
                    "description": "The type of content included in the HTTP message body.<br><br>Possible value: `application/json`.",
                    "default": "application/json"
                  },
                  "Authorization": {
                    "type": "string",
                    "description": "The HTTP header where you can include your secret token for authentication.<br><br>Example: `Bearer <access_token>`<br><br>**Note**: Use the access token generated using our <a href=\"https://developer.pluralonline.com/v3.0/reference/generate-token\" target=\"_blank\">Generate Token API</a>.",
                    "default": "Bearer"
                  },
                  "Request-Timestamp": {
                    "type": "string",
                    "description": "Use ISO 8601 UTC Timestamp, to create a timestamp when the generate token is requested.<br><br>Example: `2024-07-09T07:57:08.022Z`"
                  },
                  "Request-ID": {
                    "type": "string",
                    "description": "Use a global unique identifier [GUID] for the request.<ul><li>Minimum: 1 characters.</li><li>Maximum: 50 characters</ul></li>Example: `c17ce30f-f88e-4f81-ada1-c3b4909ed235`"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"links\": {\n    \"first\": null,\n    \"self\": {\n      \"href\": \"http://plural-subscription-service-uat.v2.pinepg.in/api/v1/public/subscriptions/v1-sub-250916121532-aa-lKR1S1/presentations?size=10&page=1&sort=cycleId%2Cdesc\"\n    },\n    \"next\": null,\n    \"last\": null\n  },\n  \"page\": {\n    \"size\": 10,\n    \"total_elements\": 4,\n    \"total_pages\": 1,\n    \"number\": 0\n  },\n  \"presentations\": [\n    {\n      \"subscription_id\": \"v1-sub-250916121532-aa-lKR1S1\",\n      \"presentation_id\": \"v1-bil-250916130526-aa-nBELDX\",\n      \"due_date\": \"2025-09-20T10:00:00Z\",\n      \"amount\": {\n        \"value\": 100,\n        \"currency\": \"INR\"\n      },\n      \"merchant_presentation_reference\": \"z1B3pu0916002\",\n      \"pdn_status\": \"NOTIFIED\",\n      \"status\": \"INITIATED\",\n      \"failure_count\": 0,\n  \t\t\"order_id\": \"v1-260210121553-aa-8Y4x1I\"\n    },\n    {\n      \"subscription_id\": \"v1-sub-250916121532-aa-lKR1S1\",\n      \"presentation_id\": \"v1-bil-250916130428-aa-wcK0OZ\",\n      \"due_date\": \"2025-09-20T01:00:00Z\",\n      \"amount\": {\n        \"value\": 100,\n        \"currency\": \"INR\"\n      },\n      \"merchant_presentation_reference\": \"merc113473-002\",\n      \"pdn_status\": \"NOTIFIED\",\n      \"status\": \"INITIATED\",\n      \"failure_count\": 0,\n      \"order_id\": \"v1-260210121553-aa-8Y4x2I\"\n    },\n    {\n      \"subscription_id\": \"v1-sub-250916121532-aa-lKR1S1\",\n      \"presentation_id\": \"v1-bil-250916124713-aa-sAmPgx\",\n      \"due_date\": \"2025-09-20T01:00:00Z\",\n      \"amount\": {\n        \"value\": 100,\n        \"currency\": \"INR\"\n      },\n      \"merchant_presentation_reference\": \"merc113473-001\",\n      \"pdn_status\": \"NOTIFIED\",\n      \"status\": \"INITIATED\",\n      \"failure_count\": 0,\n      \"order_id\": \"v1-260210121553-aa-8Y4x3I\"\n    },\n    {\n      \"subscription_id\": \"v1-sub-250916121532-aa-lKR1S1\",\n      \"presentation_id\": \"v1-bil-250916122333-aa-lDQHQ1\",\n      \"due_date\": \"2025-09-19T10:00:00Z\",\n      \"amount\": {\n        \"value\": 100,\n        \"currency\": \"INR\"\n      },\n      \"merchant_presentation_reference\": \"z1B3pu0916001\",\n      \"pdn_status\": \"NOTIFIED\",\n      \"status\": \"COMPLETED\",\n      \"failure_count\": 0,\n      \"order_id\": \"v1-260210121553-aa-8Y4x4I\"\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "links": {
                      "type": "object",
                      "properties": {
                        "first": {},
                        "self": {
                          "type": "object",
                          "properties": {
                            "href": {
                              "type": "string",
                              "example": "http://plural-subscription-service-uat.v2.pinepg.in/api/v1/public/subscriptions/v1-sub-250916121532-aa-lKR1S1/presentations?size=10&page=1&sort=cycleId%2Cdesc"
                            }
                          }
                        },
                        "next": {},
                        "last": {}
                      }
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "size": {
                          "type": "integer",
                          "example": 10,
                          "default": 0
                        },
                        "total_elements": {
                          "type": "integer",
                          "example": 4,
                          "default": 0
                        },
                        "total_pages": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "number": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        }
                      }
                    },
                    "presentations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "subscription_id": {
                            "type": "string",
                            "example": "v1-sub-250916121532-aa-lKR1S1"
                          },
                          "presentation_id": {
                            "type": "string",
                            "example": "v1-bil-250916130526-aa-nBELDX"
                          },
                          "due_date": {
                            "type": "string",
                            "example": "2025-09-20T10:00:00Z"
                          },
                          "amount": {
                            "type": "object",
                            "properties": {
                              "value": {
                                "type": "integer",
                                "example": 100,
                                "default": 0
                              },
                              "currency": {
                                "type": "string",
                                "example": "INR"
                              }
                            }
                          },
                          "merchant_presentation_reference": {
                            "type": "string",
                            "example": "z1B3pu0916002"
                          },
                          "pdn_status": {
                            "type": "string",
                            "example": "NOTIFIED"
                          },
                          "status": {
                            "type": "string",
                            "example": "INITIATED"
                          },
                          "failure_count": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "order_id": {
                            "type": "string",
                            "example": "v1-260210121553-aa-8Y4x1I"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```