> ## 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 Payment Status

> Use this POST endpoint to retrieve the latest status of a specific subscription payment transaction.

Use the internal FastFlowPe `subscription_id` and `transaction_id`.

Both values must be valid UUIDs.

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

> [!TIP]
>
> **Quick Reference**
>
> **Required:** `subscription_id`, `transaction_id`
>
> **Returns:** `payment_status`, `payment_type`, `payment_amount`, `utr`
>
> **Method:** `POST`

## Endpoint

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

## Request Headers

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

Your secret merchant API key issued by FastFlowPe.

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

Must be `application/json`.

## Request Body

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

Internal FastFlowPe subscription UUID.

This must be a valid UUID.

Example:

`550e8400-e29b-41d4-a716-446655440000`

**transaction\_id** `string` *required*

Internal FastFlowPe transaction UUID associated with the subscription.

This must be a valid UUID.

Example:

`7c9e6679-7425-40de-944b-e07fc1f90ae7`

```bash cURL theme={"dark"}
curl --location 'https://api.fastflowpe.com/merchant/recurring/subscription/payment/status' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-x-api-key>' \
--data '{
    "subscription_id": "550e8400-e29b-41d4-a716-446655440000",
    "transaction_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}'
```

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

url = "https://api.fastflowpe.com/merchant/recurring/subscription/payment/status"
headers = {"Content-Type": "application/json", "x-api-key": "<your-x-api-key>"}
payload = {
    "subscription_id": "550e8400-e29b-41d4-a716-446655440000",
    "transaction_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}

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/payment/status", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": "<your-x-api-key>",
  },
  body: JSON.stringify({
    subscription_id: "550e8400-e29b-41d4-a716-446655440000",
    transaction_id: "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  }),
});
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": "550e8400-e29b-41d4-a716-446655440000",
  "transaction_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}
""";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.fastflowpe.com/merchant/recurring/subscription/payment/status"))
    .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": "550e8400-e29b-41d4-a716-446655440000",
        "transaction_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
    }`)

    req, _ := http.NewRequest("POST", "https://api.fastflowpe.com/merchant/recurring/subscription/payment/status", bytes.NewBuffer(payload))
    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" => "550e8400-e29b-41d4-a716-446655440000",
    "transaction_id" => "7c9e6679-7425-40de-944b-e07fc1f90ae7",
]);

$ch = curl_init("https://api.fastflowpe.com/merchant/recurring/subscription/payment/status");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "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/payment/status')
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['x-api-key'] = '<your-x-api-key>'
request.body = {
  subscription_id: '550e8400-e29b-41d4-a716-446655440000',
  transaction_id: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
}.to_json

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

## Response

A successful request returns the current payment status for the specified subscription transaction.

```json Success theme={"dark"}
{
  "status": "success",
  "status_code": 200,
  "message": "Subscription payment status fetched successfully",
  "detail": null,
  "data": {
    "transaction_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "payment_status": "SUCCESS",
    "payment_type": "CHARGE",
    "payment_amount": 1000,
    "subscription_id": "550e8400-e29b-41d4-a716-446655440000",
    "utr": "123456789012"
  },
  "meta": null
}
```

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

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

```json PSP Transaction ID Missing theme={"dark"}
{
  "status": "error",
  "status_code": 400,
  "message": "PSP transaction ID not available for this transaction",
  "detail": null,
  "data": null,
  "meta": null
}
```

**status** `string`

Indicates whether the API request succeeded or failed.

**status\_code** `integer`

HTTP-style status code associated with the response.

**message** `string`

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

**detail** `object`

Additional response details when available.

This may be `null`.

**data.transaction\_id** `string`

Internal FastFlowPe transaction UUID.

**data.payment\_status** `string`

Current status of the subscription payment.

Possible values may include:

* `SUCCESS`
* `FAILED`
* `PENDING`

**data.payment\_type** `string`

Identifies the purpose of the payment.

Example: `CHARGE`

**data.payment\_amount** `number`

Amount associated with the subscription payment transaction.

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

Internal FastFlowPe subscription UUID associated with the transaction.

**data.utr** `string`

UTR or payment reference returned for the payment.

This field may be `null`.

**meta** `object`

Optional response metadata.

This may be `null`.

## Payment Status Values

| Status | Meaning |
| - | - |
| `SUCCESS` | Subscription payment completed successfully. |
| `FAILED` | Subscription payment failed. |
| `PENDING` | Subscription payment is still awaiting a final status. |

> [!NOTE]
>
> The `transaction_id` must belong to the specified `subscription_id`.
>
> Use the internal FastFlowPe transaction ID, not a PSP transaction ID.

> [!TIP]
>
> You can retrieve subscription transaction IDs from the subscription transactions API and then use this endpoint to check the latest payment status for a specific transaction.


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