Skip to main content

Get Subscription List

GetDescription:
Retrieves subscriptiona Listpaginated list of subscriptions. The response includes details of each subscription, and filtering options can be applied via query parameters.

Url Parameter Parameters:

There is one Url parameter called status which is optional

  • status (string, optional) – Filter subscriptions by status (e.g., SENT, ONGOING, COMPLETED, CANCELLED).

Query Parameters:

  • page (integer, optional) – The page number for pagination. Default: 1.
  • phone (string, optional) – Filter subscriptions by phone.
  • customerName (string, optional) – Retrieve subscriptions associated with a specific customer.
  • startDate (date, optional) – Filter subscriptions that started on or after this date (Format: YYYY-MM-DD).
  • endDate (date, optional) – Filter subscriptions that ended on or before this date (Format: YYYY-MM-DD). startDate and endDate should be used together.

Authentication

This endpoint requires authentication using a Bearer Token. The client must send the token in the Authorization header for every request.

Example Authentication Header:

Authorization: Bearer YOUR_ACCESS_TOKEN

If the token is missing or invalid, the API will return a 401 Unauthorized response.

Endpoint : https://demo-api.frontpayment.no/api/v1/connect/subscriptions/list/{status?}
Method : GET
Authorization : Bearer

Response Structure

{
    "status_code": 200,
    "status_message": "OK",
    "message": "subscriptionRetrieveSuccessfully",
    "is_data": true,
    "data": [  
        {
            "subscriptionUuid": "String",
            "orderUuid": "String",
            "repeats": "Integer",
            "frequency": "String",
            "amount": "Float",
            "currency": "String",
            "createdAt": "String",
            "customerName": "String",
            "clientName": "String",
            "customerEmail": "String",
            "countryCode": "String",
            "msisdn": "String",
            "numberOfOrder": "Integer",
            "status": "String",
            "isPaid": "Boolean",
            "isRefundable": "Boolean",
            "translationKey": "String",
            "refundCycles": {
                "cycles": [
                    {
                        "cycleName": "String",
                        "startDate": "String",
                        "endDate": "String"
                    }
                ],
                "subscriptionUuid": "String",
                "organizationName": "String",
                "payablePerMonth": "Float",
                "frequency": "String"
            }
        }
    ]
}

Example Response

{
    "status_code": 200,
    "status_message": "OK",
    "message": "subscriptionRetrieveSuccessfully",
    "is_data": true,
    "data": [
     
        {
            "subscriptionUuid": "SUB3959080783",
            "orderUuid": "ODR1530327942",
            "repeats": 12,
            "frequency": "month",
            "amount": 2000,
            "currency": "NOK",
            "createdAt": "07.11.2023",
            "customerName": "420 Test",
            "clientName": "Front Payment AS",
            "customerEmail": "[email protected]",
            "countryCode": "+47",
            "msisdn": "46567468",
            "numberOfOrder": 0,
            "status": "EXPIRED",
            "isPaid": false,
            "isRefundable": false,
            "translationKey": "subscriptionStatusExpired",
            "refundCycles": []
        },
        {
            "subscriptionUuid": "SUB4132380543",
            "orderUuid": "ODR2167679196",
            "repeats": 12,
            "frequency": "month",
            "amount": 2000,
            "currency": "NOK",
            "createdAt": "05.11.2023",
            "customerName": "420 Test",
            "clientName": "Front Payment AS",
            "customerEmail": "[email protected]",
            "countryCode": "+47",
            "msisdn": "46567468",
            "numberOfOrder": 4,
            "status": "ONGOING",
            "isPaid": true,
            "isRefundable": true,
            "translationKey": "subscriptionStatusOngoing",
            "refundCycles": {
                "cycles": [
                    {
                        "cycleName": "Cycle 1",
                        "startDate": "21.02.2023",
                        "endDate": "22.03.2023"
                    },
                    {
                        "cycleName": "Cycle 2",
                        "startDate": "23.03.2023",
                        "endDate": "21.04.2023"
                    },
                    {
                        "cycleName": "Cycle 3",
                        "startDate": "22.04.2023",
                        "endDate": "21.05.2023"
                    }
                ],
                "subscriptionUuid": "SUB4132380543",
                "organizationName": "Front Payment AS",
                "payablePerMonth": 2000,
                "frequency": "month"
            }
        },
        {
            "subscriptionUuid": "SUB2007828928",
            "orderUuid": "ODR187366332",
            "repeats": 12,
            "frequency": "month",
            "amount": 2000,
            "currency": "NOK",
            "createdAt": "05.11.2023",
            "customerName": "420 Test",
            "clientName": "Front Payment AS",
            "customerEmail": "[email protected]",
            "countryCode": "+47",
            "msisdn": "46567468",
            "numberOfOrder": 1,
            "status": "ONGOING",
            "isPaid": true,
            "isRefundable": true,
            "translationKey": "subscriptionStatusOngoing",
            "refundCycles": {
                "cycles": [
                    {
                        "cycleName": "Cycle 1",
                        "startDate": "21.02.2023",
                        "endDate": "22.03.2023"
                    }
                ],
                "subscriptionUuid": "SUB2007828928",
                "organizationName": "Front Payment AS",
                "payablePerMonth": 2000,
                "frequency": "month"
            }
        }
    ]
}