🔌 Third-Party Integrations
Kloyst heavily relies upon flawless execution bridges alongside external APIs.
1. Meta WhatsApp Cloud API​
The foundational layer for executing our product boundaries natively relies upon Facebook's Graph API.
Core Interface Standards​
- Version targeting: System standardizes aggressively to
v18.0(or current specific LTS). - Authentication Header: Standard Bearer tokens via system user generation mapping.
Key API Mappings​
- Message Dispatch:
POST /v18.0/{PHONE_NUMBER_ID}/messages- Payload explicitly maps
messaging_product: "whatsapp". We explicitly push template parameters via strict interface boundaries dynamically parsing from our JSON contact attributes.
- Payload explicitly maps
- Template Generation:
POST /v18.0/{WABA_ID}/message_templates - WABA Registration (Embedded Flow): Maps an internal OAuth execution grabbing
config_idboundaries directly out from an iframe.
2. Payment Gateway (Razorpay/Stripe)​
Given the Shared WABA requirements strictly enforce prepaid balances via wallets, capturing payment integrity is hyper-critical.
Secure Handshake Pipeline​
- We execute an
orders/creategenerating a signature. - The React Frontend absorbs this signature via typical JS UI integrations opening the checkout.
- The platform completes payment independent of our backend HTTP scope.
- Razorpay sends a
payment.capturedWebhook cryptographically signed with our shared webhook secret. - NestJS captures this, explicitly runs a
crypto.createHmacmatching hashes strictly ensuring the payload isn't manipulated. - The
Walletengine adds the amount explicitly mapped onto the vendor's total safely pushing it through transaction bounds.
3. Potential AI Component Layer (Gemma / LLM)​
For clients seeking customer-support auto-replies or automated outbound template parsing.
Workflow​
- Meta sends an Inbound Message Webhook.
- Kloyst maps the webhook inbound text, dumping the payload to a Python execution wrapper or an internal LangChain micro-service containerized alongside Nest.
- AI calculates semantic bounds.
- AI Service responds by throwing an explicit HTTP payload onto our
Redis Output Dispatch Queuepushing an outbound dynamic text response cleanly back outside down the standard routing tree.