# 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="../create-a-transaction">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](https://docs.sensepass.com/sensepay/transaction-api/models/subscription-model "mention") for additional information.
{% endhint %}
