Fovea.Billing

is now IAPTIC, please go to the new and better version of our system.

Subscriptions API

This developer documentation explains how to use the Subscriptions API, which lets you retrieve your customers’ subscription status.


Get Customer Subscription

GET https://reeceipt-validator.fovea.cc/v1/customers/<<applicationusername>>>/subscription

Retrieve data for a single user, knowing its applicationUsername.


Requirements:


URL Parameters:

  • <<applicationusername>>
    • The User Identifier used by your application.
    • REQUIRED

Query Parameters:

  • appName and apiKey
    • For authentication using your App Name and Secret Key (Find them in your Account page).
    • REQUIRED

Example request:

curl 'https://reeceipt-validator.fovea.cc/v1/customers/my_user_id_AD/subscription?appName=test&apiKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx'


Example response:

{
    "id": "my_user_id_AD",
    "createdAt": "2019-02-11T19:45:29.399Z",
    "updatedAt": "2019-02-21T16:56:55.135Z",
    "subscription": {
        "productId": "cc.fovea.purchase.subscription1",
        "expiresAt": 1550768267000,
        "renewedAt": 1550768087000,
        "subscribedAt": 1550679449000,
        "transactionId": "ios-1000000504545596",
        "subscriptionId": "ios-1000000504175380"
    }
}

Response

  • id: the user identifier.
  • createdAt: the user creation data.
  • updatedAt: the user’s last update.
  • subscription.productId: id of the in-app product the user is/was subscribed to.
  • subscription.expiresAt: expiry date of the subscription (in the future when active, in the past when expired).
  • subscription.renewedAt: last renewal date of the subscription.
  • subscription.subscribedAt: date of the first subscription.
  • subscription.transactionId: unique identifier of the last renewal’s transaction.
  • subscription.subscriptionId: unique identifier of the subscription.

All dates are in millis since epoch.


Any doubts? Any suggestions? Contact us!