User guide

Payment gateways

Connecting your own payment gateway so the agent sends payment links: each gateway's keys, the notifications address (webhook) and where to put it, your account currency, and common payment problems.

Supported gateways

  • Moyasar: Saudi Arabia and the Gulf, with mada and Apple Pay.
  • Paymob: Egypt and North Africa, with cards and e-wallets.
  • PayTabs: the Middle East and the Gulf.
  • Stripe: card payments worldwide, with Apple Pay and Google Pay.
  • PayPal: the global digital wallet.
  • Payments go straight to your own gateway account. CustBot does not process payments or hold money, and you do not need a connected store.

Your account currency

The page shows Your account currency. If it is not set yet, choose your currency from your account menu (your name at the top of the page) and then Currency, before turning on payment features. If the connected gateway does not accept your account currency, the page warns you and lists the currencies it accepts, so change the account currency or connect a gateway that accepts it, otherwise payment links will fail at payment.

Adding a gateway

Open the gateway's card and enter its keys, press Test Key (it shows Valid Credentials or Invalid Key), then Save & Activate. Keys are stored encrypted and do not show again after saving: the box then says Saved. Leave empty to keep it. Each gateway needs:

  • Moyasar: the Secret Key.
  • Paymob: the API secret key, the Integration ID and the iFrame ID.
  • PayTabs: the Server Key, the Profile ID and the Account region.
  • Stripe: the Secret Key, and the Publishable Key (optional).
  • PayPal: the Client ID and the Client Secret, and the environment: Sandbox or Live.

The payment notifications address (webhook)

After saving, the Payment notification address appears. Copy it with the Copy button and add it in your gateway's dashboard. The gateway uses this address to tell CustBot about a payment, so the agent knows the order was paid. If it is not added, the card shows Needs webhook secret, and payments will not be confirmed automatically.

Where to put the address in each gateway

  • Moyasar: in the Moyasar dashboard open Settings then Webhooks and add the address. Choose any secret token there, and write the same token in the Webhook secret token box in CustBot. Choose the events payment_paid, payment_failed and payment_refunded.
  • Paymob: put the address in the Transaction processed callback box, and copy the HMAC key from your account details into the HMAC secret box.
  • PayTabs: open Developer then Key Management and put the address in the Callback box. Nothing else is needed, because verification uses the server key.
  • Stripe: open Developers then Webhooks and add the address, and choose the events checkout.session.completed, checkout.session.async_payment_succeeded, checkout.session.async_payment_failed, checkout.session.expired and charge.refunded. Copy the signing key that starts with whsec into the Webhook signing secret box.
  • PayPal: in the PayPal app add a Webhook with the address, and choose the events Checkout order approved, Payment capture completed, Payment capture denied and Payment capture refunded, and paste the Webhook ID into the Webhook ID box.

When the agent uses the gateway

The agent sends a payment link only when the Payment Links Dispatch action is turned on in the agent settings, a gateway is saved and the account currency is set. The action's settings are in the Payment links article. The system checks the amount and currency against the order total before it creates the link.

Payment is not confirmed?

  • Make sure the gateway is saved as Active.
  • Make sure the notifications address is added in the gateway's dashboard with the events listed, and that the secret token, signing key or webhook ID is in its box.
  • Press Test Key: Invalid Key means the gateway rejected it, so copy it again.
  • Make sure your account currency is one the gateway accepts.
  • On PayPal, make sure the environment is Live, not Sandbox, for real payments.