Getting Started

Welcome to Rubi Docs. This page gives you a clean overview of what Rubi is, what you can build with it, and the fastest path to a solid first integration.

What is Rubi?

Rubi is a Saudi-first payments platform designed for fast merchant onboarding, reliable payment acceptance, and a modern developer experience. Whether you’re launching a new store or integrating into a product, Rubi is built to scale from day one.

Tip: Treat API secrets like passwords. Keep secret keys server-side only.

Choose your integration path

Payment Links (fastest)

Generate a payment link from the dashboard and start collecting payments immediately. Best for early launches and manual invoicing.

Hosted Checkout (recommended)

Redirect customers to a secure Rubi-hosted checkout page. You keep your backend clean while maintaining a premium payment experience.

API Integration (advanced)

Build a fully custom checkout UI and control the entire payment flow, including edge cases and advanced logic.

Environments

  • Test (Sandbox): Safe environment for development and QA using test keys.
  • Live (Production): Real transactions using live keys and production webhooks.

The reliable payment flow

A production-grade flow is webhook-driven. A “success page” is good for UX, but the webhook is the source of truth.

  1. Customer clicks “Pay”.
  2. Your server creates a checkout session or payment intent.
  3. Customer completes payment (hosted checkout or your UI).
  4. Rubi sends a payment.succeeded webhook.
  5. Your backend marks the order as paid and fulfills it.
Best practice: Verify webhook signatures and use idempotency keys for create operations to prevent duplicates during retries.

What you can build with Rubi

Merchant-ready operations
  • Dashboard to manage payments, customers, and activity.
  • Refunds, disputes workflow, and reconciliation.
  • Settlements & payouts tracking with reporting.
Multi-store & team access
  • Manage multiple stores under one organization.
  • Team roles and permissions.
  • Clean separation for reporting per store.
Developer-grade foundation
  • API-first integration with server-side secret keys.
  • Webhooks for reliable fulfillment and status changes.
  • Resilient event handling with idempotency.

Next steps

  • Installation (keys, env vars, local webhook testing)
  • API basics (create → confirm → handle events)
  • Webhooks (signature verification + fulfillment patterns)