> ## Documentation Index
> Fetch the complete documentation index at: https://nombasub.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How the Engine Works

> Understand the managed billing architecture and Nomba-powered payment flow.

# How the Engine Works

## In a nutshell

The Subscriptions Engine sits between your application and Nomba. Your app uses one billing API for plans, customers, subscriptions, checkout, tokenized cards, invoices, and webhooks. The engine handles the payment-provider mapping behind the scenes.

## Integration model

```txt theme={null}
Your backend
  -> Subscriptions Engine API
  -> Nomba-powered payment collection
  -> Billing state update
  -> Webhook to your backend
```

## Core responsibilities

| Area            | What the engine handles                               |
| --------------- | ----------------------------------------------------- |
| Plans           | Pricing, billing interval, trials, and plan versions. |
| Customers       | End-customer identity and billing relationships.      |
| Subscriptions   | Recurring billing schedule and lifecycle state.       |
| Invoices        | Amount due for each billing period.                   |
| Payment sources | Reusable tokenized card references.                   |
| Webhooks        | Normalized billing events sent to your system.        |

## Payment collection

The first card payment is completed through Nomba Checkout with tokenization enabled. After payment succeeds, the card token is stored as a reusable payment source. Future billing cycles can be charged automatically using the saved token.

## Merchant webhooks

After billing events occur, the engine sends normalized webhook events such as `invoice.paid`, `invoice.payment_failed`, `subscription.created`, and `subscription.paused` to your configured endpoint.

## Nomba as provider

Nomba is the payment provider behind checkout and tokenized-card charges. You do not need to bring Nomba credentials into your integration; you call the Subscriptions Engine API and receive subscription-native webhooks.
