Chatilo
USDPrices shown in US dollars Sign in Start free trial
For platform admins

Set up payment gateways

Connect Razorpay, Stripe or Revolut so customers can pay for plans, add each gateway's webhook, test it and choose which gateway takes each currency.

Last updated

On this page
  1. Before you start
  2. Razorpay
  3. Stripe
  4. Revolut
  5. Choose which gateway takes each currency
  6. What the badges mean
  7. What happens next
  8. Common problems

Customers pay for their plan through a payment gateway that you connect. Chatilo supports Razorpay, Stripe and Revolut. You can run one, two or all three and decide which ones each currency uses. All of it is on one page: Platform settings.

Before you start

  • An account with at least one gateway, with subscriptions (recurring payments) enabled on it.
  • The site running on HTTPS at its final address. Webhook addresses are built from the Site URL you gave the installer.
  • The background worker running.

Keys and secrets are stored encrypted and are never shown again. A field that already holds a value shows Saved. Leave empty to keep it. Leave it empty to keep the saved value.

Nothing on the page is saved until you click Save settings at the bottom.

Razorpay

Razorpay's keys are in the Razorpay section of the page; its on/off switch is further down under Payment gateways.

  1. In Razorpay, create API keys (Dashboard → Account & Settings → API Keys). Use test keys first.
  2. In Platform settings, under Razorpay, fill in Key ID and Key secret.
  3. In Razorpay, add a webhook (Settings → Webhooks) with:

    • the address shown in Webhook address (it ends in /webhooks/razorpay; click Copy)
    • a secret of your choice
    • the events subscription.charged, subscription.halted, subscription.cancelled and subscription.completed
  4. Type the same secret into Webhook secret.
  5. Under Payment gateways, keep Take plan payments through Razorpay ticked. It is on by default.
  6. Click Test connection in the Razorpay block, then Save settings.

Test mode: use keys that start with rzp_test_. The test then answers "Connected to Razorpay (test mode)".

Renewals: each plan purchase is a Razorpay subscription. The customer pays in Razorpay's checkout window on their billing page, and Razorpay charges them again each month or year. Each charge reaches Chatilo as a subscription.charged webhook, which records the payment and extends the plan.

Stripe

  1. In Stripe, copy your secret key (Developers → API keys). Use a test key first.
  2. Under Payment gateways → Stripe, tick Take plan payments through Stripe and paste the key into Secret key.
  3. In Stripe, add a webhook endpoint (Developers → Webhooks) with:

    • the address shown in Webhook address (it ends in /webhooks/stripe)
    • the Snapshot payload style
    • the events checkout.session.completed, checkout.session.async_payment_succeeded, invoice.paid, invoice.payment_failed, customer.subscription.updated and customer.subscription.deleted
  4. Paste the endpoint's signing secret (it starts with whsec_) into Signing secret.
  5. Click Test connection, then Save settings.

Test mode: use a key that starts with sk_test_. Test and live keys keep separate price lists, so you can switch to the live key later without clearing anything.

Renewals: the customer pays on Stripe's checkout page and the plan renews as a Stripe subscription. Each paid invoice arrives as invoice.paid and extends the plan. A failed renewal marks the customer's renewal as failed so they are told on their billing page.

Revolut

  1. In Revolut Business, create a Merchant API secret key (APIs → Merchant API). It needs read and write access to Orders, Customers, Subscriptions and Webhooks, without request signing.
  2. Under Payment gateways → Revolut, tick Take plan payments through Revolut.
  3. Paste the key into Merchant API secret key and set Key is for to Live payments or Sandbox (testing).
  4. Click Save settings.
  5. Come back to the Revolut block and click Register webhook.

    Revolut has no screen for webhooks, so Chatilo creates it for you. It registers the address ending in /webhooks/revolut for the events ORDER_COMPLETED, ORDER_PAYMENT_FAILED, ORDER_PAYMENT_DECLINED, SUBSCRIPTION_OVERDUE, SUBSCRIPTION_CANCELLED and SUBSCRIPTION_FINISHED, and saves the signing secret. You see "Webhook registered and its signing secret saved."

  6. Click Test connection. A good result ends with "The webhook is registered."

If you created the webhook yourself through Revolut's API, paste its secret into Webhook signing secret instead of using the button.

Test mode: choose Sandbox (testing) and use a sandbox key. The key must match the mode.

Renewals: the customer pays the first period on Revolut's checkout page, and Revolut then charges the saved card each period. Because Revolut sends no dedicated renewal event, the background worker also checks each Revolut subscription around its renewal date, at most once an hour per workspace.

Revolut needs your site to be on a domain name, not localhost or an IP address.

Choose which gateway takes each currency

Under Which gateway takes each currency there is one row for each currency you sell in and one tick box per gateway.

  • Tick one gateway and customers paying in that currency use it.
  • Tick more than one and the customer chooses.
  • Leave a row empty for the default: rupees go to Razorpay; every other currency goes to Stripe, or Revolut if Stripe is not set up, or Razorpay if neither is.

The Customers see now column shows the result. No online payment means no gateway can take that currency yet.

Chatilo does not limit which currency a gateway can be ticked for. A gateway is offered only when it is switched on and has its keys, so check that your account with that gateway accepts the currency.

Customers who already pay stay on their gateway until they choose a plan again.

What the badges mean

BadgeMeaning
Taking paymentsSwitched on and keys saved
Needs keysSwitched on, but a key is missing
OffSwitched off

What happens next

  • Every payment appears under Payments, and its numbered invoice under Invoices. See Review payments and invoices.
  • A plan stays active for 2 days after its renewal date, so a charge that arrives late does not lock the customer out.
  • When a customer turns off automatic renewal, the plan runs until the end of the period already paid for.
  • Refunds and disputes are not applied automatically for any gateway. Refund in the gateway, then mark the invoice as refunded and change the customer's plan by hand.

Common problems

"Enter the Razorpay key ID and key secret first." / "Enter the Stripe secret key first." / "Enter the Revolut secret key first."

Test connection tests what you typed, or the saved keys if the fields are empty. There is nothing to test yet.

"Razorpay didn’t accept these keys" / "Stripe didn’t accept this key" / "Revolut didn’t accept this key"

The gateway refused the key. For Revolut, check that the key matches Key is for.

"Save the Revolut secret key first, then register the webhook."

Register webhook uses the saved key. Click Save settings first.

"Revolut can only send events to a public address, not localhost or an IP address."

Put the site on a domain name and correct the site URL before registering.

"That’s a lot of tests. Try again in a few minutes."

You can run 30 gateway tests in 10 minutes.

A customer paid but the plan did not change

The webhook is not reaching the site or its secret is wrong. Check the webhook address and secret, and look at the delivery log in the gateway's dashboard. Stripe and Revolut events whose timestamp is more than 5 minutes off are rejected, so make sure the server clock is correct.

Customers see no way to pay

No gateway is ready for their currency. Check the badges and the Customers see now column.

Cookies on this site

We use the cookies needed to run the site and keep you signed in. With your OK we also remember choices you make here, such as the currency for prices. We don’t use advertising or tracking cookies. Cookie policy