← All documentation
Integrations & payments

Integrations and Payments - Setup Guide

Connect WhatsApp, your own Razorpay account, Gmail, Instagram, your website and the rest, step by step, and learn exactly what each connection switches on.

Every connection belongs to one workspace and uses your own accounts and credentials. Secrets (WhatsApp tokens, Razorpay secrets, API keys) are stored encrypted and are never shown back to you, so copy anything that is shown once straight away. Connecting needs the Manage Integrations permission, and disconnecting a sensitive connection asks you to re-enter your password. None of this is needed to start: add each connection when you need what it does.

Chapter 1

WhatsApp Business

The channel for customer conversations, AI replies, campaigns, reminders and sending invoices. Connect it first.

Tip: Gather the three IDs before you open NEXTOSA: the permanent access token, the Phone Number ID and the WhatsApp Business Account ID. Having them in one note makes connecting a one-minute job.

What you need from Meta first

NEXTOSA uses the official WhatsApp Business Platform, so you need a Meta Business account with a WhatsApp Business Account and a phone number added to it. From Meta's developer console you collect: a permanent access token (create it for a system user so it does not expire), the Phone Number ID of the number you want to connect, the WhatsApp Business Account ID (WABA ID), and optionally your Meta App ID and your Meta App Secret.

  1. 1Create or open your Meta Business account and your app in Meta's developer console.
  2. 2Add the WhatsApp product and a phone number to your WhatsApp Business Account.
  3. 3Create a permanent access token for a system user with WhatsApp permissions and copy it.
  4. 4Copy the Phone Number ID and the WhatsApp Business Account ID from the WhatsApp section of the console.
  5. 5Copy the Meta App ID from the app dashboard if you plan to use templates with an image, video or document header.
  6. 6Copy the App Secret from App settings, Basic in the same console if you want NEXTOSA to verify that incoming messages really come from Meta (recommended).

Connect a number

Page: /settingsNeeds: Manage Integrations

Open Settings, Integrations, WhatsApp and choose Add WhatsApp Number. NEXTOSA checks the details with Meta before saving, so a wrong token or ID is rejected straight away with a plain message (for example that the token looks invalid or expired, or that Meta cannot find the ID).

  1. 1Give the number a label such as Sales or Support. The label is what your team sees on conversation tags and number pickers.
  2. 2Paste the permanent token, the Phone Number ID and the WhatsApp Business Account ID.
  3. 3Add the Meta App ID if you want media-header templates.
  4. 4Paste the Meta App Secret if you have it (optional, recommended). It is stored encrypted, never shown again, and used only to check the signature on incoming messages.
  5. 5Choose the mode (Auto or Approval, explained below) and save.

Several numbers, one primary

A workspace can hold more than one number, up to your plan's limit. One is the primary number and is used when the app sends something on its own and no number is named. Each number has its own mode and can be given its own AI agent. A number can be connected to only one NEXTOSA workspace at a time; connecting one that is already in use elsewhere is refused. Every conversation lives on the number it came in on, and replies always leave from that same number.

Auto or Approval mode

Auto lets the AI reply to a customer straight away. Approval holds every AI draft in the Approval Inbox until a person approves, edits or rejects it. Start in Approval while you are tuning your instructions, then move to Auto once you trust the answers. The mode is set per number and can be changed any time.

  1. 1Open Settings, Integrations, WhatsApp and pick the number.
  2. 2Choose Auto or Approval.
  3. 3In Approval mode, review drafts on the Approval Inbox page.

Receiving customer messages: the webhook

Incoming messages reach NEXTOSA through a webhook that you register once in your Meta app. You give Meta two things: a callback address and a verify token. Meta calls the address to confirm the token matches, and from then on sends every incoming message and delivery status to it. The values below are examples: use the real callback address and verify token that belong to your NEXTOSA account (ask the NEXTOSA team through the Contact page if you do not have them), and never publish the real token anywhere public.

  1. 1In Meta's developer console open your app, then WhatsApp, then Configuration.
  2. 2In the Webhook section choose Edit.
  3. 3Callback URL: https://your-server.com/api/whatsapp/webhook (replace it with the callback address for your account; the path always ends in /api/whatsapp/webhook).
  4. 4Verify token: YOUR_SECURE_TOKEN (replace it with the real verify token for your account, exactly as given, with no spaces).
  5. 5Choose Verify and save. If Meta says it could not verify, the address or the token does not match what NEXTOSA expects.
  6. 6Under Webhook fields, subscribe to the messages field, so incoming messages and message statuses are delivered.
  7. 7Send a test message from a personal phone to your connected number and confirm it appears in Conversations.

Verifying that messages really come from Meta

Meta signs every message it sends to the webhook with the App Secret of your Meta app. When you save that secret on the number, NEXTOSA checks the signature on each incoming message and refuses anything that does not match, so nobody who learns the callback address can invent customer messages. The connection card shows whether the check is on. Numbers without a secret keep working for now, but we recommend adding it to every number. You can replace the secret at any time by choosing Update credentials; leaving the field blank keeps the existing one.

If messages do not arrive

Check these in order. First, the number is connected in NEXTOSA and its Phone Number ID matches the number you are texting. Second, the webhook shows as verified in Meta and the messages field is subscribed. Third, the callback address is typed exactly, including https and the full path. Fourth, the verify token matches exactly. A token that was changed on the server stops Meta from re-verifying, so if it was changed, update it in Meta as well. If you added an App Secret, make sure it is the secret of the same Meta app that owns the webhook: a wrong secret makes NEXTOSA refuse every incoming message as unsigned. Customer messages sent to you do not count against your monthly message allowance.

Templates and the 24-hour window

Page: /templatesNeeds: WhatsApp Templates

WhatsApp only lets you send a free-form message within 24 hours of the customer's last message. Outside that window you must use a template that Meta has approved. Create templates on the Templates page, then submit for approval. A template goes Draft, then Pending, then Approved or Rejected, and only Approved templates can be sent. Some automations need a template shaped a particular way, for example invoices, receipts, proposals and demand letters need a Document header and exactly one variable in the body (the client's first name) so the PDF can be attached.

  1. 1Open Templates and create a template with a clear category and body.
  2. 2For document sends, set the header to Document and upload an example PDF.
  3. 3Click Submit for Approval and wait for Meta's review.
  4. 4Once Approved, select it in the matching Settings automation (invoices, receipts, reminders and so on).

What counts against your plan

Every message your workspace successfully sends counts toward the monthly WhatsApp allowance of your plan: replies, AI replies, templates, campaigns, reminders and document sends. Incoming messages and failed sends do not count. See the Plan limits page for the numbers per plan.

Update or disconnect

To rotate a token, choose Update credentials and paste the new one; leaving the token blank keeps the existing one. Disconnecting stops automated replies and the Approval Inbox for that number until you reconnect, and asks for your password.

Chapter 2

Payments: your own Razorpay account

Connect Razorpay so payment links, invoice QR codes and online payments go to your own business account, never a shared one.

Important: Money goes straight from your customer to your Razorpay account. NEXTOSA never holds funds, and uses your Key ID and Key Secret only to create payment links and to read confirmations.

Get your Razorpay keys

You need a Razorpay account. In the Razorpay Dashboard open Settings, then API Keys, and generate a Key ID and Key Secret. Test keys (starting rzp_test) let you try everything without real money; live keys (starting rzp_live) need Razorpay's account verification first. If you do not have a website during verification, choose that you have no website and explain that you use NEXTOSA to generate invoices and collect payments, or give your business Instagram or Facebook page address instead.

  1. 1Log in to the Razorpay Dashboard.
  2. 2Go to Settings, API Keys and generate a key pair.
  3. 3Copy the Key ID and the Key Secret. The secret is shown by Razorpay only once.

Connect Razorpay in NEXTOSA

Page: /settingsNeeds: Manage Integrations

Open Settings, Payment Integrations. Paste the Key ID and Key Secret and save. NEXTOSA checks them against Razorpay and tells you if they are wrong. To change the Key ID later, leave the secret blank to keep the stored one.

Close the payment loop with the webhook

Page: /settingsNeeds: Manage Integrations

Without the webhook a customer can pay, but NEXTOSA does not find out. With it, a captured payment automatically marks the matching invoice Paid and records the payment. Each workspace has its own webhook address and its own secret.

  1. 1In Payment Integrations choose Generate Webhook Secret. Copy the secret now: it is shown once.
  2. 2Copy the Webhook URL shown on the same card.
  3. 3In the Razorpay Dashboard open Settings, Webhooks, Add New Webhook.
  4. 4Paste the URL and the secret into the matching fields.
  5. 5Under Active Events tick payment.captured and order.paid, then save.

Regenerating the secret

If you lose the webhook secret, regenerate it. The old secret stops working immediately, so update it in the Razorpay Dashboard in the same minute, or captured payments will stop being recorded.

Scan-to-pay QR on invoices

Turn on Show Razorpay QR Code on Invoices to put a scan-to-pay QR, linked to a real payment link for the amount due, on every invoice PDF you download or send.

What payments switch on

With Razorpay connected: the AI Sales Agent can send payment links to customers; invoices can carry a QR code; payments confirmed by the webhook mark invoices Paid; and, for restaurants, diners can pay online at a QR table order (the app can also refund a cancelled paid order automatically). Without Razorpay you can still record payments by hand on any invoice as Paid, Pending or Partial, and restaurants can offer pay at the counter.

Receipts after payment

A payment receipt can go to the customer automatically. Turn on the auto-send receipts option in Settings and pick an approved receipt template with a Document header, or turn on email sending if Gmail is connected. If neither is set up, nothing is sent and you can still download or send the receipt yourself from the invoice.

Disconnect

Disconnecting Razorpay stops payment links and invoice QR codes until you reconnect, and asks for your password.

Chapter 3

Gmail and email

Send invoices, receipts and campaigns from your own Gmail, and optionally let the AI answer your inbox.

Connect Gmail

Page: /settingsNeeds: Manage Integrations

Open Settings, App Integrations, Gmail and sign in with the Google account whose mailbox you want to use. NEXTOSA asks only for permission to send mail and to read mail. Everything NEXTOSA emails goes out from this mailbox, so use the address your customers know.

Email invoices and receipts

Turn on the email option in Settings, Billing and invoicing to email every invoice and payment receipt automatically with the PDF attached. It sends only to clients who have an email address saved; others are skipped without error. For schools the email goes to the guardian. You can also send or resend any single invoice or receipt by hand from its page.

Email broadcasts and drips

Page: /automationsNeeds: Manage Integrations

The Automations page has one-click starters for an email broadcast, a drip sequence and an automatic reply to incoming mail. Every marketing email carries an unsubscribe link, contacts who unsubscribed are never emailed again, and a workspace is limited to 300 automation emails per rolling 24 hours.

Let the AI answer your inbox

Switch on Answer inbound emails with AI to have new customer emails answered in the same thread. It is off until you turn it on, only mail that arrives afterwards is answered, newsletters, mailing lists, automated and no-reply mail and your own messages are always skipped, and the AI sends at most three replies per conversation per hour. If Gmail asks for permission to read mail, choose Reconnect Gmail and approve it. Choose which agent answers (Support or Sales) on that agent's page. If the switch reports that inbound email is unavailable, contact us, because it depends on a platform-side mail connection.

  1. 1Connect Gmail, then open the Gmail panel in App Integrations.
  2. 2Turn on Let the AI answer new emails that arrive in this inbox.
  3. 3Pick the Support Agent or Sales Agent that should handle the mailbox.
  4. 4Send yourself a test email from another address and check the reply.

Chapter 4

Instagram and marketing

Connect an Instagram Business account so the Marketing Agent can plan, write and publish for you.

Before you connect

You need an Instagram Business account linked to a Facebook Page. If your Page has no linked Instagram Business account yet, link one in Meta Business Suite first.

Connect Instagram

Page: /settingsNeeds: Manage Integrations

Open Settings, Instagram and choose Connect Instagram. Sign in with Meta and approve access. NEXTOSA then shows whether your Page and ad account were found; if the ad account is not resolved, reconnect.

Organic posts and paid ads

Organic posting to your feed has no ad spend, but every caption and image still uses AI tokens from your plan. Paid ads need a daily budget: every campaign is created paused and spends nothing until you activate it, and Meta needs a valid payment method on your ad account. Video uses more tokens than a still image.

The AI Marketing Agent

Page: /ai-agents/marketing-agentNeeds: Admin

Write a weekly or monthly plan in plain words, preview what the agent understood, apply it, and review the drafts in the Content queue. It runs in review mode by default; autopilot is an opt-in switch. WhatsApp broadcasts use an approved template and only contacts with your chosen tag, and anyone who opted out is always excluded. Replies from broadcast recipients that show buying interest can be handed to the Sales Agent with a Deal and a follow-up task.

Chapter 5

Connected Websites and your own apps

Send leads and bookings from your website into NEXTOSA, and let NEXTOSA send commands back to your site.

Add a connected website

Page: /custom-appsNeeds: Manage Integrations

Open Connected Websites in the sidebar and choose Add Custom App. Give it a name, its base URL, and the headers it needs (an API key or a Bearer token is just a header). Optionally set an outbound webhook URL where NEXTOSA sends commands to your site, link a WhatsApp number to it so leads from that site are answered on that number, and keep it Active. The number of connections is limited by your plan.

Send data into NEXTOSA

Generate an Inbound API Key on the connection. The key and the inbound address are shown once, so copy them into your website's server settings. Your site then posts leads and events to the inbound address with the key in an x-api-key header, and they appear as contacts in NEXTOSA. Regenerating the key stops the old one immediately.

  1. 1Create the connection and save it.
  2. 2Choose Generate Inbound API Key and copy the key and the inbound address.
  3. 3Store the key in your website's server-side environment settings, never in browser code.
  4. 4Send a test lead from your site and confirm the contact appears.

Receive commands from NEXTOSA

When NEXTOSA sends a command to your site, it signs the request with the same key (an HMAC-SHA256 signature in the x-nextosa-signature header). Build a POST route on your backend, and verify that signature before acting, so you only accept genuine NEXTOSA requests.

Store catalog and the AI Sales Agent

A connection can sync a product catalog from a product sync address and let the AI Sales Agent answer WhatsApp questions using only that store's products. Only one connected store can have this on at a time.

Booking availability

Decide when customers can book appointments from your websites. A site checks your open slots first and only then books, so you are never double-booked, even against appointments your team adds by hand.

Chapter 6

Shopify, Slack, Zapier and outgoing webhooks

Connect the other tools you already use.

Shopify

Page: /settingsNeeds: Manage Integrations

In App Integrations connect your Shopify store with its shop domain and credentials, then use Test Connection to confirm. Once connected your AI can add products and analyse recent sales and revenue by product.

Slack

Page: /settingsNeeds: Manage Integrations

Connect your Slack workspace from App Integrations. By default the AI can post to any channel the bot can see; turn on Restrict AI to specific channels to allow only the ones you tick. The bot must be added to a channel in Slack before it appears in the list.

Zapier, Make and Google Sheets

In the AI customer support settings you can paste a Zapier webhook address. The AI then sends lead details (name, phone, email, context) to it, which connects NEXTOSA to thousands of apps such as Google Sheets and Notion. Add custom tags (for example campaign: diwali_sale) that go out with every lead so you can filter and route them.

Outbound webhooks

Page: /settingsNeeds: Manage Integrations

Outbound Webhooks tell your own system when something happens, for example Invoice paid or Contact created. Add the target address and the events, and copy the signing secret that is shown once. Each request is a signed POST and you verify the X-NEXTOSA-Signature header. Use the test ping to confirm delivery.

  1. 1Open Settings, Outbound Webhooks and choose Add webhook.
  2. 2Enter the target address, a description and tick the events to send.
  3. 3Copy the signing secret immediately.
  4. 4Send a test ping and check that your system received it.

Chapter 7

AI setup

Teach the AI how your business talks, and choose which agent answers where.

Instructions and replies

Page: /settingsNeeds: Manage Integrations

In the AI customer support settings turn on AI replies to incoming WhatsApp messages and write your instructions: who you are, what you sell, your tone, your opening hours, what the AI must never promise. The AI follows these together with each number's Auto or Approval mode. Away mode lets you set an automatic out-of-hours behaviour.

Sales, Support and Marketing agents

Page: /ai-agentsNeeds: Admin

The AI Agents page has three agents. The Sales Agent answers prospects with your catalog and prices and can create deals and bookings. The Support Agent answers from your knowledge base, hands the chat to a person when it cannot help, and can have several named personas. The Marketing Agent plans and publishes content. A WhatsApp number is answered by exactly one agent. You can test each one safely in its Test chat before it talks to a customer.

Knowledge base

For the Support Agent add articles in plain text. Only published articles are used, the agent answers only from them, and when it has no good answer it hands over instead of guessing.

Tokens and cost

Every AI action uses tokens from one monthly allowance per workspace. See the AI tokens page for exactly where tokens are used, what never uses tokens, and the top-up packs.

Chapter 8

Plan, billing and limits

Where to see what you have used and what to do at a limit.

Check your usage

Page: /settings

Settings, Billing and Plan shows your plan and live usage of messages, AI tokens, documents, storage and team seats. A plan covers one workspace; add more workspaces for separate businesses or branches.

At a limit

Reaching a limit blocks only the action that went over, such as a send, an upload or an invitation, and the app offers an upgrade on the spot. Nothing is deleted. The Plan limits page lists every limit for every plan.

If a plan lapses

The workspace becomes read-only: you can still view and export your data, but changes are refused until you renew.

Ready to run your entire business on one platform?

Join businesses using NEXTOSA to manage billing, staff, and compliance, and automate client communication on WhatsApp — all from one AI operating system.