Skip to main content

Introduction

Welcome to the Connect World API documentation. This API enables you to manage streaming subscriptions, process payments, and integrate with our content catalog.

Base URL

All API requests should be made to:
https://your-domain.com/api

Authentication

Most endpoints are publicly accessible but implement strict rate limiting per IP address to prevent abuse. Sensitive operations validate all input data server-side.
The Connect World API uses server-side validation and rate limiting instead of API keys for public endpoints. All payment operations are secured through:
  • Rate limiting per IP address
  • Server-side price validation to prevent tampering
  • Honeypot fields to detect bot traffic
  • Input sanitization on all parameters

Rate Limiting

Rate limits are applied per IP address to prevent abuse:
EndpointRate LimitWindow
/api/orders5 requests10 minutes
/api/stripe10 requests15 minutes
/api/paypal/create-order10 requests15 minutes
/api/paypal/capture-orderNo limit-
/api/tmdbNo limit-

Rate Limit Response

When you exceed the rate limit, you’ll receive a 429 status code:
{
  "error": "Demasiadas solicitudes. Intenta de nuevo en unos minutos."
}

Error Response Format

All API errors follow a consistent format:
{
  "error": "Error message describing what went wrong"
}

Common HTTP Status Codes

200
OK
Request succeeded
201
Created
Resource successfully created
400
Bad Request
Invalid or missing parameters in the request
429
Too Many Requests
Rate limit exceeded - wait before retrying
500
Internal Server Error
Server error - contact support if persists

Error Codes

Common error messages you may encounter:
Error MessageCauseSolution
Datos del formulario inválidos o incompletosMissing or invalid request parametersCheck all required fields are provided
Plan inválidoInvalid plan IDUse a valid plan ID: plan-1, plan-2, or plan-3
Duración inválidaInvalid subscription durationUse valid months: 1, 2, 3, 6, or 12
Monto inválidoAmount doesn’t match plan pricingUse correct price for selected plan and duration
Número de dispositivos inválidoDevices don’t match planEnsure devices match the plan (1, 2, or 3)
Demasiadas solicitudesRate limit exceededWait before making more requests

Available Plans

Connect World offers three subscription plans:

Plan IDs

{
  "id": "plan-1",
  "devices": 1,
  "name": "Basic",
  "prices": [
    { "months": 1, "price": 10 },
    { "months": 2, "price": 20 },
    { "months": 3, "price": 30 },
    { "months": 6, "price": 60 },
    { "months": 12, "price": 120 }
  ]
}

Quick Start

Here’s a typical workflow for creating a subscription:
  1. Choose a plan and duration from the available options
  2. Create a payment intent using /api/stripe or /api/paypal/create-order
  3. Process the payment on the client side
  4. Create the order using /api/orders with the payment receipt ID

API Endpoints

Orders

Create and manage subscription orders

Stripe

Create Stripe payment intents

PayPal

Create and capture PayPal orders

TMDB

Fetch trending movies and shows

Request Headers

All POST requests should include:
Content-Type: application/json

Best Practices

  • Always validate prices client-side before submitting (server validates again)
  • Implement exponential backoff when rate limited
  • Handle all error responses gracefully
  • Never expose payment secrets in client code

Support

If you encounter issues with the API:
  1. Check this documentation for correct usage
  2. Verify your request parameters match the schemas
  3. Check rate limits and error messages
  4. Contact support with the error details and timestamp

Build docs developers (and LLMs) love