# Create Presentation

Use this API to allow you to submit mandate debit requests for both AS and OT frequency transactions. This API is an essential part of Pine Labs Online mandate management system, enabling you to initiate debit requests based on existing customer mandates.

## 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": {
      "post": {
        "summary": "Create Presentation",
        "description": "Use this API to allow you to submit mandate debit requests for both AS and OT frequency transactions. This API is an essential part of Pine Labs Online mandate management system, enabling you to initiate debit requests based on existing customer mandates.",
        "operationId": "create-presentation",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "The type of content included in the HTTP message body.<br><br>Possible value: `application/json`.",
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "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>.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "Bearer"
            }
          },
          {
            "name": "Request-Timestamp",
            "in": "header",
            "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`",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Request-ID",
            "in": "header",
            "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`",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subscription_id": {
                    "type": "string",
                    "description": "Unique identifier for the subscription in the Pine Labs Online database.<ul><li>Maximum length: 50 characters.</ul></li>Example: `v1-sub-4405071524-aa-qlAtAf`"
                  },
                  "due_date": {
                    "type": "string",
                    "description": "The ISO 8601 UTC Timestamp is the date & time at which the payment is due.<br><br>Example:`2022-09-21T17:32:28Z`"
                  },
                  "amount": {
                    "type": "object",
                    "description": "An object that contains the amount details.",
                    "required": [
                      "value",
                      "currency"
                    ],
                    "properties": {
                      "value": {
                        "type": "integer",
                        "description": "Transaction amount is Paisa.<ul><li>Minimum value: `100` (₹1)</li><li>Maximum value: `100000000` (₹10 lakh).</ul></li>Example: `1000`",
                        "format": "int32"
                      },
                      "currency": {
                        "type": "string",
                        "description": "Type of currency.<br><br>Example: INR"
                      }
                    }
                  },
                  "merchant_presentation_reference": {
                    "type": "string",
                    "description": "Unique identifier of the merchant presentation reference entered while creating a presentation.<ul><li>Minimum length: 1 character.</li><li>Maximum length: 50 characters.</ul></li>Example: `1234567890`"
                  }
                }
              },
              "examples": {
                "Create Presentation": {
                  "value": {
                    "subscription_id": "v1-sub-4405071524-aa-qlAtAf",
                    "due_date": "2022-09-21T17:32:28Z",
                    "amount": {
                      "value": 100,
                      "currency": "INR"
                    },
                    "merchant_presentation_reference": "1234567890"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"subscription_id\": \"v1-sub-250612062122-aa-3HLXL5\",\n  \"presentation_id\": \"v1-bil-250612063111-aa-FJIBcB\",\n  \"due_date\": \"2025-06-05T06:14:21.72036Z\",\n  \"amount\": {\n    \"value\": 100,\n    \"currency\": \"INR\"\n  },\n  \"status\": \"CREATED\",\n  \"merchant_presentation_reference\": \"9caa061f-0e50-494b-aa13-8e902b0bef03\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscription_id": {
                      "type": "string",
                      "example": "v1-sub-250612062122-aa-3HLXL5"
                    },
                    "presentation_id": {
                      "type": "string",
                      "example": "v1-bil-250612063111-aa-FJIBcB"
                    },
                    "due_date": {
                      "type": "string",
                      "example": "2025-06-05T06:14:21.72036Z"
                    },
                    "amount": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "integer",
                          "example": 100,
                          "default": 0
                        },
                        "currency": {
                          "type": "string",
                          "example": "INR"
                        }
                      }
                    },
                    "status": {
                      "type": "string",
                      "example": "CREATED"
                    },
                    "merchant_presentation_reference": {
                      "type": "string",
                      "example": "9caa061f-0e50-494b-aa13-8e902b0bef03"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "500",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"code\": \"INTERNAL_ERROR\",\n  \"message\": \"Internal Server Error\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "INTERNAL_ERROR"
                    },
                    "message": {
                      "type": "string",
                      "example": "Internal Server Error"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```