Skip to main content

Authentication and Billing

Subscripto Login provides a number of benefits once integrated. Authentication,data access and billing. These are not mutuallly exclusive. You can use the Subscripto Login to authenticate people without the initial plan to access their data or bill them. This is, for example, a way to offer your app to a user base the may become future subscribers (Think AppSumo with lifetime offers). In such case, you do not need to ask the user for permissions when signing up.

Authentication

Authentication happens with OAuth. It emables our users to login to your application and create an account using their Subscripto credentials. They do not need to create or remember a new password. We follow best practises and standard for OAuth Login, such that, you will receive information such as the users Subscripo User ID. You should map this to the user account created in your application as you will need the Subscripto User ID to make request for that Subscripto user. Simply, Subscripto has no knowledge of the User ID or email you have registered directly in your application, but needed to invoke actions on that user.

See examples such as:

Authentication Expiration

When your app uses Subscripto Login to authenticate someone, it receives a User token. The token has a specifed life time which will expire after sometime. Alongside the user token, there is a refresh token supplied so the users session could be continued. In such case, the User Token will expire after a certain time after the session ends.

DELETE

Once you have registered as a partner, you will need to register an app to be able to:

  • Enable integration: Start the integration of the "Login with Subscripto" button with your application
  • Manage Permissions: You can select the permissions and features your application will request the user to agree to when tey sign up to your application
  • Obtain user credentials: Each application will have its own Application ID and Application Secret, which is needed for authentication and authorisation for generating an access token for the application

Permission and Features use cases

Use cases define the available options that Subscripto will allow your application to interact with our platform and also the users that register with your application.

When you add a use case to your application, the features, permissions are displayed to the user for acceptance when they register with your application. For example, if you select application_billing, this will enable the application to perform billing requests for actions taken in their application.

You can add multiple use cases as required by your application, provided it makes sense for your application.

Our existing use cases

Permissions

PropertyDescription
account_emailThe application may want your email address for certain usage
account_phoneThe application may want your phone number for certain usage
account_credits_readEnable the application the check your remaining
account_credits_chargeEnable the application to charge your credits (usually for in-app purchases)
account_pay_as_you_goEnable the application to bill on a pay as you go purposes)
account_notificationsEnable the application the send notifications (via Subscripto Partner API)

Features

PropertyDescription
application_in_app_billingEnable in app billing
application_submit_metered_usageEnable the application to submit usage information
application_marketingEnables the application to send you marketing message
application_notificationEnables the application to send you notification message related to the application

What are permissions and features

Permissions are how the application asks someone if if can access their data stored on the Subscripto platform.

To be deleted

To integrate your application with our platform, you need to create a partner account

Make sure to enter details correctly as this will be displayed to users during the sign up phase.

If you wish to join us as an early adopter or beta tester, please get in touch with us.

Terms and Conditions

Review the Subscripto platform Terms and Conditions and Privacy Policy on our main website which outlines how to use the application. We have these available as a PDFs: Terms and Conditions PDF and Privacy Policy

Verify your account

Once you have created your account, you will receive an email to verify the creation of the account. There are various step to following, which we will cover in the following sections:

Next Steps

Now you have created your account, you should register your first application.

Applications Properties


SUBSCRIPTO_CLIENT_ID=ac-b2ce-7231-92c4-592e2da195c0
SUBSCRIPTO_CLIENT_SECRET=9h0pFrAB5MbX5gR4A2lMJgEykMRYxepVrBE
SUBSCRIPTO_REDIRECT_URI=https://yourapp.com/auth/subscripto/callback
SUBSCRIPTO_OAUTH_SERVER_URL=http://localhost:8000
SUBSCRIPTO_SCOPE="app_provider_billing account_details"

We have

PropertyDescription
SUBSCRIPTO_CLIENT_IDYour Client ID that indicate the application
SUBSCRIPTO_CLIENT_SECRETThe Client Secret for your application
SUBSCRIPTO_REDIRECT_URIWhere should our OAuth server redirect to
SUBSCRIPTO_OAUTH_SERVER_URLThe OAuth server - usually subscripto's server auth.getsubscripto.com
SUBSCRIPTO_SCOPEThis is the scope of access you application will request from the user
ParagraphText

Applications scope permissions

Permissions lets you request information from Subscripto about the user they have given to us. Some permission relates to features such as enabling metered billing/confirmation, In-app billing. Other permission relate to sharing data such as Email, Telephone number. You can indicate some requested permission as optional, to ensure that users can proceed if they feel the need not to share such information

PermissionDescription
emailRequest that the user shares their email address when signing up. This could be for emails from your application
phone_numberRequest that the user shares their phone number. This can be for notification via your application
account_details
biling_in_app_billing
billing_metered_billing

Add Markdown or React files to src/pages to create a standalone page:

  • src/pages/index.jslocalhost:3000/
  • src/pages/foo.mdlocalhost:3000/foo
  • src/pages/foo/bar.jslocalhost:3000/foo/bar

Create your first React Page

Create a file at src/pages/my-react-page.js:

src/pages/my-react-page.js
import React from 'react';
import Layout from '@theme/Layout';

export default function MyReactPage() {
return (
<Layout>
<h1>My React page</h1>
<p>This is a React page</p>
</Layout>
);
}

A new page is now available at http://localhost:3000/my-react-page.

Create your first Markdown Page

Create a file at src/pages/my-markdown-page.md:

src/pages/my-markdown-page.md
# My Markdown page

This is a Markdown page

A new page is now available at http://localhost:3000/my-markdown-page.