> For the complete documentation index, see [llms.txt](https://docs.sensepass.com/sensepay/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sensepass.com/sensepay/transaction-api/payment-flows/subscription/fetch-a-subscription.md).

# Fetch a subscription

Fetch a subscription by subscription ID.

{% hint style="info" %}
It is required to send one authentication header, only one header key is required for the request in the example below
{% endhint %}

## Get the subscription details and its paid transactions.

<mark style="color:blue;">`GET`</mark> `https://api.sensepass.com/api/subscription/:subscriptionUid`

#### Path Parameters

| Name            | Type   | Description                                                                                                                                                 |
| --------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| subscriptionUid | string | <p>bf8b7e01-466d-4996-b9a2-fc0880923359</p><p>subscription ID received from the <a href="/pages/msIKzcRIXZuPsh0wetqD">Create a Transaction </a>response</p> |

#### Headers

| Name           | Type   | Description                                                                                          |
| -------------- | ------ | ---------------------------------------------------------------------------------------------------- |
| deviceId       | string | 2ooeww5ufzg3nkuf8a10g15i5epu8o58jv1rznif3o1tr6xsb1rm                                                 |
| merchantApiKey | string | xvRKKxOWAYbTH2yKQLlzkta2eovvkzlzTW98NcA9KVfwrOF22GA7bBOHHAeooQrmKelv0TU3Q7c8wiJgTQweKCbXR5ohC6JtCygJ |
| branchApiKey   | string | mQzMLLSpqjRZfWBgQcAej5Dus7HHvmRsSsrN6FYoeWWUAehm3RjD596pZb9gfrxx4jQOP2MCQgoLaaU9SAdlzVsWnR63ZETqALpn |

{% tabs %}
{% tab title="200: OK " %}

<pre class="language-json" data-line-numbers><code class="lang-json"><strong>{
</strong>    "id": "bf8b7e01-466d-4996-b9a2-fc0880923359",
    "active": true,
    "created": "2023-05-29T15:33:36.278Z",
    "updated": "2023-05-29T15:34:38.641Z",
    "expires": null,
    "start_date": "2023-06-01T11:00:00.000Z",
    "interval": "1month",
    "status": "active",
    "customer": {},
    "payments": [
        {
            "TransactionNumber": "d3d4f01b6e0ecb01e40f2ac3a9d223a1f64ca80afbf3dbfea732fc89",
            "date": "2023-05-29T15:34:24.701Z",
            "amount": "10",
            "baseAmount": "10",
            "currency": "USD",
            "status": 5,
            "statusName": "Transaction Approved",
            "timeoutDate": "2023-05-29T15:49:26.809Z",
            "maxInstallments": 1,
            "reason": null,
            "methodType": 0,
            "paymentProcessRequestID": "7DZ9KO003XRN51E4RHRML25",
            "confirmation": {
                "approvedBy": "Credit Card",
                "dateApproval": "2023-05-29T15:34:33.241Z",
                "approvalDate": "2023-05-29T15:34:33.241Z",
                "paymentType": "Regular",
                "sensePassReferenceId": "sm0tgjpcjitbd9gfodhi",
                "providerId": "jDPPZyn8zdGtBcKUP4EbxTfwy62j+JShtQGDlbwx4/c=",
                "confirmationNumberNumeric": 16660218953577,
                "authNumber": null,
                "acquirer": null,
                "voucher": null,
                "referenceNumber": null,
                "requestID": "7DZ9KO003XRN51E4RHRML25",
                "confirmationNumber": "166-60218953577",
                "fullConfirmationCode": "166-60218953577",
                "cardType": "VISA",
                "lastFourDigits": "4580",
                "cardMask": "458045******4580",
                "expiration": "1234",
                "cardExpiration": "1234",
                "installments": 1,
                "extraDetails": {
                    "email": null
                }
            },
            "confirmationNumber": "166-60218953577",
            "confirmations": [
                {
                    "approvedBy": "Credit Card",
                    "dateApproval": "2023-05-29T15:34:33.241Z",
                    "approvalDate": "2023-05-29T15:34:33.241Z",
                    "paymentType": "Regular",
                    "sensePassReferenceId": "sm0tgjpcjitbd9gfodhi",
                    "providerId": "jDPPZyn8zdGtBcKUP4EbxTfwy62j+JShtQGDlbwx4/c=",
                    "confirmationNumberNumeric": 16660218953577,
                    "authNumber": null,
                    "acquirer": null,
                    "voucher": null,
                    "referenceNumber": null,
                    "requestID": "7DZ9KO003XRN51E4RHRML25",
                    "confirmationNumber": "166-60218953577",
                    "fullConfirmationCode": "166-60218953577",
                    "cardType": "VISA",
                    "lastFourDigits": "4580",
                    "cardMask": "458045******4580",
                    "expiration": "1234",
                    "cardExpiration": "1234",
                    "installments": 1,
                    "extraDetails": {
                        "email": null
                    }
                }
            ]
        }
    ]
}
</code></pre>

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Refer to the Subscritption entity at [Subscription Model](/sensepay/transaction-api/models/subscription-model.md) for additional information.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sensepass.com/sensepay/transaction-api/payment-flows/subscription/fetch-a-subscription.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
