> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moduluslabs.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Modulus Labs API Documentation

> Accept payments and onboard merchants with Modulus Labs APIs

## Welcome to Modulus Labs

Modulus Labs provides payment infrastructure for businesses in the Philippines. Our suite of APIs enables you to accept QR Ph payments, onboard merchants, and receive real-time transaction notifications.

## Security & Compliance

<Info>
  **PCI DSS 4.1 Certified** - Modulus Labs maintains PCI DSS 4.1 compliance, ensuring the highest standards of payment security and data protection for all transactions processed through our APIs.
</Info>

<CardGroup cols={3}>
  <Card title="QR API" icon="qrcode" href="/docs/qr/introduction">
    Accept QR Ph payments with Dynamic QR codes
  </Card>

  <Card title="Onboarding API" icon="user-plus" href="/docs/onboarding/introduction">
    Onboard merchants to accept various payment methods
  </Card>

  <Card title="QR PH Webhooks" icon="webhook" href="/docs/webhooks/overview">
    Receive real-time transaction notifications
  </Card>
</CardGroup>

## QR API

Accept QR Ph payments from your customers using Dynamic QR codes. The QR API enables Consumer Scans Business (C2B) transactions where customers scan QR codes using their banking apps to complete payments.

**Key Features:**

* Generate Dynamic QR Ph codes with specific amounts and references
* Support for multiple currencies (PHP, USD, etc.)
* JWE-encrypted payloads for maximum security
* Real-time webhook notifications for payment status
* Comprehensive error handling
* Full sandbox environment for testing

**Use Cases:**

* E-commerce checkout payments
* In-store point-of-sale transactions

## Onboarding API

Streamline merchant onboarding with our KYC (Know Your Customer) API. Enable businesses to accept various payment methods including QR Ph, PayMaya, GCash, and more through a single integration.

**Key Features:**

* Complete merchant onboarding workflow
* Support for multiple payment methods (QR Ph, PayMaya, GCash, Cards)
* Document upload and verification
* Business information collection
* JWT-based authentication

**Use Cases:**

* Payment service provider platforms
* Multi-merchant marketplaces
* Financial technology applications
* Business management platforms

## Webhooks API

Receive real-time notifications when QR Ph transactions complete. Webhooks push transaction updates directly to your server, enabling instant order fulfillment and payment verification.

**Key Features:**

* Real-time transaction notifications
* JWE-encrypted payloads for security
* Automatic retry mechanism (up to 4 attempts)
* Support for success and declined events
* HTTP Basic Authentication
* Multi-merchant support with activation codes

<Warning>
  **Webhooks are REQUIRED for QR Ph integration.** Without webhooks, you cannot receive transaction status updates.
</Warning>

**Use Cases:**

* Order fulfillment automation
* Payment confirmation emails
* Transaction reconciliation
* Real-time dashboard updates
* Customer notification systems

## Authentication

Each API uses different authentication methods:

| API            | Authentication Method | Header Format                        |
| -------------- | --------------------- | ------------------------------------ |
| QR API         | HTTP Basic Auth       | `Authorization: Basic {credentials}` |
| Onboarding API | JWT Bearer Token      | `Authorization: Bearer {token}`      |
| Webhooks API   | HTTP Basic Auth       | `Authorization: Basic {credentials}` |

## Environments

All APIs are currently available in sandbox mode for testing:

| API            | Sandbox URL                           |
| -------------- | ------------------------------------- |
| QR API         | `https://qrph.sbx.moduluslabs.io`     |
| Onboarding API | `https://kyc.sbx.moduluslabs.io`      |
| Webhooks API   | `https://webhooks.sbx.moduluslabs.io` |

## Quick Links

<CardGroup cols={3}>
  <Card title="QR API Reference" icon="code" href="/api-reference/qr/create">
    View QR API endpoints
  </Card>

  <Card title="Onboarding API Reference" icon="code" href="/api-reference/onboarding/onboard-merchant">
    View Onboarding API endpoints
  </Card>

  <Card title="Webhooks API Reference" icon="code" href="/api-reference/webhooks/create">
    View Webhooks API endpoints
  </Card>

  <Card title="Error Codes" icon="triangle-exclamation" href="/docs/errors">
    Common error codes and solutions
  </Card>

  <Card title="Testing" icon="flask" href="/docs/qr/testing">
    Test in sandbox environment
  </Card>

  <Card title="Webhook Setup" icon="gear" href="/docs/webhooks/setup">
    Configure webhook endpoints
  </Card>

  <Card title="Enums Reference" icon="list" href="/docs/onboarding/enums">
    Onboarding API enumerations
  </Card>

  <Card title="Webhook Payload" icon="file-code" href="/docs/webhooks/payload">
    Understand webhook data structure
  </Card>

  <Card title="Support" icon="envelope" href="mailto:support@moduluslabs.io">
    Contact technical support
  </Card>
</CardGroup>

## Getting Started

Choose your integration path:

<Steps>
  <Step title="Accept QR Payments">
    Start with the [QR API introduction](/docs/qr/introduction) to accept QR Ph payments from customers. Set up webhooks to receive real-time notifications.
  </Step>

  <Step title="Onboard Merchants">
    Use the [Onboarding API](/docs/onboarding/introduction) to enable merchants to accept various payment methods through your platform.
  </Step>

  <Step title="Build a Complete Platform">
    Combine all three APIs to create a comprehensive payment solution: onboard merchants, accept QR payments, and receive real-time notifications via webhooks.
  </Step>
</Steps>

<Note>
  **New to our APIs?** Start with the QR API quickstart guide to make your first API call in minutes, then explore webhooks for real-time notifications.
</Note>

## Support

For technical support and questions:

* Email: [support@moduluslabs.io](mailto:support@moduluslabs.io)
* Documentation feedback: Use the feedback buttons on each page
* Technical issues: Include API endpoint, request/response details, and error codes
