---
title: Get Subscription Details
slug: api-marketplace/get-subscription-details
description: Learn how to use the Auth API to generate payment links for customers and securely authenticate transactions using API Keys. This comprehensive document provides step-by-step instructions and highlights the necessary input parameters like amount, product 
createdAt: 2023-06-13T06:58:14.000Z
---

# Introduction

The "Get Subscription Details" API retrieves comprehensive information about a subscription based on its unique subscription reference ID. By supplying the subscription reference ID as input, this API returns a detailed overview of the subscription, including its plan name, maximum cycles, type, maximum amount, currency, customer details (such as name, email, and phone number), payment mode, status, expiry date, and other relevant information. This API facilitates easy access to subscription details, enabling efficient management and tracking of subscription services within a system or application.

# Authentication

This API employs API Keys for request authentication. It's crucial to safeguard your API Keys, as they grant various privileges. To obtain the Access Key, kindly reach out to our Support/CSM team. Once obtained, please utilize this access key in the Authorization header.

Authentication for the API is executed through the Authorization header.

:::BlockQuote
\--header 'Authorization: YOUR\_ACCESS\_KEY\_HERE'
:::

Feel free to replace 'YOUR\_ACCESS\_KEY\_HERE' with the actual Access Key provided by our Support/CSM team.

# API Details

The details of the API can be found here.

## Sample Request&#x20;

:::CodeblockTabs
Pre-Production

```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/eNach/eMandates/{subReferenceId}' \
--header 'Authorization: YOUR_ACCESS_KEY_HERE' \
--data ''
```

Production

```curl
curl --location 'https://api.signzy.app/api/v3/eNach/eMandates/{subReferenceId}' \
--header 'Authorization: YOUR_ACCESS_KEY_HERE' \
--data ''
```
:::

## Path Parameters

Here's a table outlining the key parameters, descriptions, whether they are mandatory or optional, and their data types.

| **Key**        | **Description**                                                   | **M/O**   | **Type** |
| -------------- | ----------------------------------------------------------------- | --------- | -------- |
| subReferenceId | A unique ID which was generated when the subscription was created | Mandatory | String   |

# Sample Response

:::CodeblockTabs
200

```json
{
    "result": {
        "status": "OK",
        "message": "Subscription Details",
        "subscription": {
            "subReferenceId": 256809,
            "planName": "NA",
            "maxCycles": 1,
            "type": "ON_DEMAND",
            "maxAmount": 10,
            "currency": "INR",
            "customerName": "Manish",
            "customerEmail": "",
            "customerPhone": "",
            "mode": "SBC_UPI",
            "cardNumber": null,
            "status": "ACTIVE",
            "firstChargeDate": null,
            "expiryDate": "2024-09-30 00:00:00",
            "addedOn": "2024-04-18 14:14:51",
            "scheduledOn": null,
            "currentCycle": 0,
            "authLink": "",
            "upiId": "",
            "umn": "",
            "authFlow": "UPI_COLLECT",
            "tpvEnabled": false,
            "payerAccountDetails": {}
        }
    }
}
```
:::

## Output Parameters

| **Key**                          | **Description**             | **Type** |
| -------------------------------- | --------------------------- | -------- |
| result                           | Result object               | Object   |
| result.status                    | Status of the result        | String   |
| result.message                   | Message of the result       | String   |
| result.subscription              | Subscription details        | Object   |
| subscription.subReferenceId      | Subscription reference ID   | Integer  |
| subscription.planName            | Name of the plan            | String   |
| subscription.maxCycles           | Maximum cycles allowed      | Integer  |
| subscription.type                | Type of subscription        | String   |
| subscription.maxAmount           | Maximum amount              | Integer  |
| subscription.currency            | Currency of amount          | String   |
| subscription.customerName        | Name of the customer        | String   |
| subscription.customerEmail       | Email of the customer       | String   |
| subscription.customerPhone       | Phone of the customer       | String   |
| subscription.mode                | Mode of subscription        | String   |
| subscription.cardNumber          | Card number                 | String   |
| subscription.status              | Status of subscription      | String   |
| subscription.firstChargeDate     | Date of first charge        | String   |
| subscription.expiryDate          | Expiry date of subscription | String   |
| subscription.addedOn             | Date added                  | String   |
| subscription.scheduledOn         | Scheduled date              | String   |
| subscription.currentCycle        | Current cycle               | Integer  |
| subscription.authLink            | Authentication link         | String   |
| subscription.upiId               | UPI ID                      | String   |
| subscription.umn                 | UMN                         | String   |
| subscription.authFlow            | Authentication flow         | String   |
| subscription.tpvEnabled          | TPV enabled                 | Boolean  |
| subscription.payerAccountDetails | Payer account details       | Object   |

# Sample Errors

:::CodeblockTabs
401

```json
{
    "message": "Invalid authentication credentials"
}
```

404

```json
{
    "error": {
        "name": "error",
        "message": "Subscription Does not exist for subReferenceId : 25680978",
        "status": "404",
        "reason": "ERROR",
        "type": "Not Found",
        "statusCode": "404"
    }
}
```
:::

## Error Parameters

| **Key**          | **Description**   | **Type** |
| ---------------- | ----------------- | -------- |
| error            | Main error object | Object   |
| error.name       | Error name        | String   |
| error.message    | Error message     | String   |
| error.status     | Error status code | String   |
| error.reason     | Error reason      | String   |
| error.type       | Type of error     | String   |
| error.statusCode | HTTP status code  | String   |

## Error Codes

| **Error Code** | **Error Message**     | **Explanation**                                                    |
| -------------- | --------------------- | ------------------------------------------------------------------ |
| 400            | Bad Request           | Input parameter has a missing required parameter or invalid inputs |
| 401            | Authorization Failed  | Authorization token is invalid                                     |
| 404            | Not Found             | The eneterd Sub Reference ID is not found                          |
| 500            | Internal Server Error | Internal error at Signzy, Please reach out to help\@signzy.com     |

