Subscription Status Inquiry

Check your subscribers' status with Zotlo

This API service informs you about the latest status of subscriptions managed by Zotlo. The subscription status inquiry service operates using the GET method. Sending subscriberId and packageId parameters is mandatory to retrieve subscriber information.

Method

GET

URL

İstek Parametreleri

subscriberId: The email or phone number used by the user when starting the subscription. packageId: It is the package ID that will be queried for the subscription of the user. If there is a subscription belonging to the sent package only successful response is returned by the service.

Example Request

When sending a request to the subscription inquiry service, you can obtain the necessary Access Key and Access Secret information from the Developer Tools/API Keys page in the Zotlo Panel.

Sending the Application ID information is not mandatory.

GET https://api.zotlo.com/v1/subscription/profile?subscriberId=SUBSCRIBER_ID&packageId=PACKAGE_ID HTTP/1.1
AccessKey: ••••••
AccessSecret: ••••••
Content-Type: application/json
ApplicationId: •
Language: ••

Successful Response Examples

If Subscription Profile Exists and Is Active:

{
  "meta": {
    "requestId": "6d2989e84793-REQ-5f32a82e299ff",
    "httpStatus": 200
  },
  "result": {
    "profile": {
      "status": "active",
      "realStatus": "active",
      "subscriberId": "9",
      "subscriptionType": "paid",
      "startDate": "2020-08-10 21:57:25",
      "expireDate": "2020-09-09 21:57:25",
      "package": "zotlo-premium",
      "country": "TR",
      "phoneNumber": "+905555555555",
      "language": "tr",
      "originalTransactionId": "80397a95-742d-4c74-975e-f740d1909580",
      "cancellation": null,
      "customParameters": {
        "source": "Landing",
        "adjust": {
          "idfa": "A161AD92-7DC3-4B15-B14C-3AA65995AFCC"
        }
      },
      "renewalFetchCount": 0
    },
    "package": {
      "packageId": "zotlo-premium",
      "price": 3.99,
      "currency": "USD",
      "packageType": "subscription",
      "name": "Zotlo Premium"
    },
    "newPackage": null,
    "card": {
      "cardNumber": "411111******1111",
      "expireDate": "12/20"
    },
    "customer": {
      "id": 1,
      "createDate": "2020-05-13 12:57:36",
      "country": "TR",
      "firstname": "Test",
      "lastname": "Test",
      "email": "test@test.com"
    }
  }
}

If Subscription Profile Exists but Account Is Cancelled

{
  "meta": {
    "requestId": "6d2989e84793-REQ-5f32a89037084",
    "httpStatus": 200
  },
  "result": {
    "profile": {
      "status": "active",
      "realStatus": "passive",
      "subscriberId": "313334342",
      "subscriptionType": "paid",
      "startDate": "2020-08-07 06:44:16",
      "expireDate": "2020-09-06 06:44:16",
      "package": "zotlo-premium",
      "country": "TR",
      "phoneNumber": "+905555555555",
      "language": "tr",
      "originalTransactionId": "51e8fd2a-5b28-4b9f-bfe3-5f752b09d3a3",
      "cancellation": {
        "date": "2020-08-07 06:46:00",
        "reason": "Not Interest",
        "code": "CU00001"
      },
      "customParameters": {
        "source": "Landing"
      }
    },
    "package": {
      "packageId": "zotlo-premium",
      "price": 2.99,
      "currency": "USD",
      "packageType": "subscription",
      "name": "Zotlo Premium"
    },
    "newPackage": null,
    "card": {
      "cardNumber": "411111******1111",
      "expireDate": "12/20"
    },
    "customer": {
      "id": 1,
      "createDate": "2020-05-13 12:57:36",
      "country": "TR",
      "firstname": "Test",
      "lastname": "Test",
      "email": "test@test.com"
    }
  }
}

Successful Response Parameters

The parameters included in the successful response are as follows.

FieldDescription

status

Indicates the subscription status. active : User can continue to use their rights. passive : User's rights have expired. grace : The package renewal process could not be completed, but the user can continue to use their rights for a certain period.

realStatus

Provides the real status of the subscriber. Returns 'passive' if the user's account has been cancelled in any way. Different from 'status', 'active' will continue to return until the user's expiration date. active : User can continue to use their rights. passive : User's account has been cancelled in some way.Different from 'status'. 'Status' will continue to return active until the user's expiration date. grace : The package renewal process could not be completed, but the user can continue to use their rights for a certain period.

subscriptionType

Indicates the status of the user's subscription. trial : The subscriber is still within the trial period. paid : The user has transitioned to paid period and has been charged at least once for the package.

startDate

Start date of the subscription.

expireDate

Expire date of the subscription. Renewal will be made on this date.

package

Package information for the active subscription.

country

Country information of the user.

language

Language information of the user.

cancellation

Indicates whether the user's account is cancelled. Returns 'null' if the user account is active. If returned as an array, details of the subscription cancellation can be accessed.

cancellation.date

Date when the subscription was cancelled.

cancellation.reason

Reason for the cancellation of the subscription.

cancellation.code

Status code for the subscription cancellation given by Zotlo. Possible values include: CP00001 : Subscription cancelled because automatic renewal could not be performed on the user's account. CU00001: User cancelled their account voluntarily. CU00002: System automatically cancelled the subscription after a refund process.

Failed Request Example

Our services return HTTP status code 200 for successful responses. For unsuccessful cases, HTTP status codes 400 or 500 are returned. An example error response is as follows:

{
  "meta": {
    "requestId": "app2.domain-REQ-5e73a811d5d",
    "httpStatus": 400,
    "errorMessage": "Kullanıcı profili bulunamadı.",
    "errorCode": 400009
  },
  "result": []
}

Failed Response Parameters

Below are the parameters included in failed responses.

FieldDescription

requestId

A unique request parameter generated and stored by Zotlo.

httpStatus

The HTTP status code associated with the response. Standard codes include 400 or 500.

errorMessage

Details of the error received. Error messages are sent according to the language parameter you send. 404001: Invalid endpoint 401002: AccessKey, AccessSecret parameters are incorrect. 400008: SubscriberId parameter is incorrect. 400009: Subscriber profile not found. 500000: Server error.

errorCode

The error code specific to Zotlo. Zotlo has unique error codes for each type of error. 404001: Invalid endpoint 401002: AccessKey, AccessSecret parameters are incorrect. 400008: SubscriberId parameter is incorrect. 400009: Subscriber profile not found. 500000: Server error.

result

This field can dynamically change. In case of an error, the response from the service may be returned filled with details or as an empty object.

Last updated