> ## Documentation Index
> Fetch the complete documentation index at: https://fastflowpe.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Check Subscription Status

> Use this POST endpoint to retrieve the current authorization and lifecycle status of a recurring subscription.

Use the internal `subscription_id` returned by the subscription initialize API.

Do not use `merchant_ref_id` or the PSP subscription ID for this endpoint.

Use the API key in the `x-api-key` header. Do not send it in the `Authorization` header.

> [!TIP]
>
> **Quick Reference**
>
> **Required:** `subscription_id`
>
> **Returns:** `subscription_id`, `auth_status`, `subscription_status`
>
> **Method:** `POST`

## Endpoint

```http theme={"dark"}
POST https://api.fastflowpe.com/merchant/recurring/subscription/status
```

## Request Headers

**x-api-key** `string` *required*

Your secret merchant API key issued by FastFlowPe.

**Content-Type** `string` *required*

Must be `application/json`.

**Accept** `string` *required*

Must be `application/json`.

## Request Body

**subscription\_id** `string` *required*

Internal FastFlowPe subscription UUID returned by the subscription initialize API.

Do not pass `merchant_ref_id` or the PSP subscription ID.

Example:

`4cbbd450-b326-4cac-9913-f772c57824b8`

> [!NOTE]
>
> This is a `POST` API even though it retrieves subscription status.

```bash cURL theme={"dark"}
curl --location 'https://api.fastflowpe.com/merchant/recurring/subscription/status' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-x-api-key>' \
--data '{
    "subscription_id": "YOUR_SUBSCRIPTION_UUID"
}'
```

```python Python theme={"dark"}
import requests

url = "https://api.fastflowpe.com/merchant/recurring/subscription/status"
headers = {"Accept": "application/json", "Content-Type": "application/json", "x-api-key": "<your-x-api-key>"}
payload = {
    "subscription_id": "YOUR_SUBSCRIPTION_UUID"
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())
```

```javascript Node.js theme={"dark"}
const response = await fetch("https://api.fastflowpe.com/merchant/recurring/subscription/status", {
  method: "POST",
  headers: {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "x-api-key": "<your-x-api-key>",
  },
  body: JSON.stringify({
    subscription_id: "YOUR_SUBSCRIPTION_UUID",
  }),
});
console.log(await response.json());
```

```java Java theme={"dark"}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

String body = """
{
  "subscription_id": "YOUR_SUBSCRIPTION_UUID"
}
""";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.fastflowpe.com/merchant/recurring/subscription/status"))
    .header("Accept", "application/json")
    .header("Content-Type", "application/json")
    .header("x-api-key", "<your-x-api-key>")
    .POST(HttpRequest.BodyPublishers.ofString(body))
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

```go Go theme={"dark"}
package main

import (
    "bytes"
    "fmt"
    "io"
    "net/http"
)

func main() {
    payload := []byte(`{
        "subscription_id": "YOUR_SUBSCRIPTION_UUID"
    }`)

    req, _ := http.NewRequest("POST", "https://api.fastflowpe.com/merchant/recurring/subscription/status", bytes.NewBuffer(payload))
    req.Header.Set("Accept", "application/json")
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("x-api-key", "<your-x-api-key>")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
```

```php PHP theme={"dark"}
<?php
$payload = json_encode([
    "subscription_id" => "YOUR_SUBSCRIPTION_UUID",
]);

$ch = curl_init("https://api.fastflowpe.com/merchant/recurring/subscription/status");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Accept: application/json",
    "Content-Type: application/json",
    "x-api-key: <your-x-api-key>",
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

```ruby Ruby theme={"dark"}
require 'net/http'
require 'uri'
require 'json'

uri = URI('https://api.fastflowpe.com/merchant/recurring/subscription/status')
request = Net::HTTP::Post.new(uri)
request['Accept'] = 'application/json'
request['Content-Type'] = 'application/json'
request['x-api-key'] = '<your-x-api-key>'
request.body = {
  subscription_id: 'YOUR_SUBSCRIPTION_UUID',
}.to_json

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }
puts response.body
```

Replace `YOUR_SUBSCRIPTION_UUID` with the internal `subscription_id` returned by `/merchant/recurring/subscription/initialize`.

## Response

A successful request returns the current mandate authorization status and subscription lifecycle status.

```json Success theme={"dark"}
{
  "status": "success",
  "status_code": 200,
  "message": "Subscription status fetched successfully",
  "detail": null,
  "data": {
    "subscription_id": "4cbbd450-b326-4cac-9913-f772c57824b8",
    "auth_status": "AUTHENTICATED",
    "subscription_status": "SUCCESS"
  },
  "meta": null
}
```

```json Not Found theme={"dark"}
{
  "status": "error",
  "status_code": 404,
  "message": "Subscription not found",
  "detail": null,
  "data": null,
  "meta": null
}
```

```json Failure theme={"dark"}
{
  "status": "failure",
  "status_code": 400,
  "message": "Get subscription status failed",
  "detail": null,
  "data": {
    "error_message": "Error returned by PSP",
    "raw_response": {}
  },
  "meta": null
}
```

**status** `string`

Indicates whether the API request succeeded or failed.

Possible values include `success`, `error`, and `failure`.

**status\_code** `integer`

HTTP-style status code associated with the response.

**message** `string`

Human-readable message describing the result of the status request.

**detail** `object`

Additional response details when available.

This may be `null`.

**data.subscription\_id** `string`

Internal FastFlowPe subscription UUID.

This is the same `subscription_id` used in the request.

**data.auth\_status** `string`

Current mandate authorization status.

**data.subscription\_status** `string`

Current lifecycle status of the subscription.

**data.error\_message** `string`

Error message returned when the status check fails.

This field is present in failure responses.

**data.raw\_response** `object`

Raw response returned by the underlying PSP when the status check fails.

**meta** `object`

Optional response metadata.

This may be `null`.

## Authorization Status Values

| Status | Meaning |
| - | - |
| `PENDING` | Mandate authorization is awaiting customer or bank confirmation. |
| `AUTHENTICATED` | Mandate was approved successfully. |
| `FAILED` | Mandate authorization failed. |
| `REVOKED` | Customer cancelled or revoked the mandate. |
| `DEACTIVATED` | Mandate expired or was disabled. |

## Subscription Status Values

| Status | Meaning |
| - | - |
| `CREATED` | Subscription was created, but authorization may still be pending. |
| `PENDING` | Subscription or bank approval is pending. |
| `SUCCESS` | Subscription is active. |
| `HOLD` | Subscription is paused. |
| `CANCELED` | Subscription has been cancelled. |
| `COMPLETED` | All billing cycles have completed. |

> [!NOTE]
>
> Always use the internal FastFlowPe `subscription_id` for subscription status checks and management operations.
>
> Do not use `merchant_ref_id` or the PSP subscription ID.

> [!TIP]
>
> Store the `subscription_id` returned by the initialize API. This identifier should be used for future subscription status and management operations.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.