Redirecting to the Subscription Portal
What do I need?
Parent Timeback ID – The unique identifier of the parent in the one-roster system.
Expiry Time (optional) – Defaults to 60 minutes if not provided.
Edupaid API key – your edupaid api key
How do I generate the redirection url ?
Make a POST request to
https://api.edupaid.2hourlearning.com/functions/v1/generate-parent-tokenInclude your Edupaid API key in the request header:
x-api-key: <your_api_key>Send the request body in JSON format:
{ "parentTimebackId": "<parent_id>", "expiryMinutes": <expiry_time_in_minutes> }parentTimebackId→ required, the unique identifier of the parent.expiryMinutes→ optional, defaults to 60 minutes if not provided.
Receive the response – On success, you’ll get back a JSON object containing the time-limited portal URL:
{ "url": "https://students.edupaid.2hourlearning.com/subscription-portal?token=<token>" }Redirect the parent to the
urlreturned in the response. For example:https://students.edupaid.2hourlearning.com/subscription-portal?token=<token>
Tip: You can also try this endpoint directly in the Swagger API documentation by expanding the POST /generate-parent-token section and clicking “Try it out”.
Security Guidelines
Always use HTTPS when calling the generate-parent-token API.
Do not expose your Edupaid API key in frontend or client-side code.
Keep it secure on the backend. Limit token expiry times – 60 minutes is recommended for parent portal access.
Call the token generation API only from a trusted backend that you control.
Redirect only to the returned url from the API response. Do not attempt to manually construct subscription portal links.
Last updated