> For the complete documentation index, see [llms.txt](https://docs.doku.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.doku.com/subscription-and-billing/flexibill/account-billing.md).

# Account Billing

**Account Billing** is FlexiBill's auto-debit engine — designed for businesses that provide ongoing services and need to charge customers automatically at regular intervals. Instead of requiring customers to manually settle an invoice every billing cycle, Account Billing securely stores their payment method once and charges them on schedule without any customer action.

This makes payments effortless for the customer and ensures your business collects revenue on time, every cycle.

## What Is Account Billing?

Account Billing is a **complement to Subscription and Billing** — and can also be used as a **standalone auto-debit solution** independently of the subscription engine.

<table><thead><tr><th width="196.046875">Scenario</th><th>How to Use Account Billing</th></tr></thead><tbody><tr><td><strong>With Subscription and Billing</strong></td><td>Use Subscription and Billing to manage plans, pricing, and invoice records, then layer Account Billing on top to execute the actual charge automatically each cycle — so customers never need to click a payment link.</td></tr><tr><td><strong>Without Subscription and Billing</strong></td><td>Use Account Billing directly to register customer payment methods and execute recurring charges on schedule — without any invoice or subscription structure. Ideal when you manage billing logic in your own system and only need DOKU to execute the charge.</td></tr></tbody></table>

{% hint style="info" %}
**Subscription and Billing** issues invoices that customers pay manually via a payment link. **Account Billing** charges the customer's registered card or bank account automatically — no customer action required after initial registration. Use them together or independently depending on your billing workflow.
{% endhint %}

## Two Scheduler Models

### DOKU Hosted Scheduler

A fully automated billing orchestration model where DOKU manages the entire charge execution lifecycle. Merchants register customer card details once, and DOKU handles all subsequent scheduling and payment processing automatically.

* No need to manage customer token data storage on the merchant side
* Schedule fully managed and executed by DOKU
* One-time centralized data synchronization between merchant platform and DOKU ecosystem
* Real-time registration and payment status callbacks

**Set it once. DOKU charges automatically on schedule.**

👉 [*Learn more*](/subscription-and-billing/flexibill/account-billing/doku-hosted-scheduler.md)

### Merchant Hosted Scheduler

A merchant-controlled billing model where the merchant manages their own customer token data and triggers payment execution on demand. Gives merchants full control over when and how charges are initiated.

* Merchant manages customer token data storage internally
* Merchant defines and controls the billing schedule
* Supports bulk billing orchestration via file upload (SFTP or Dashboard)
* Suitable for data-driven, internally controlled billing workflows

**You own the schedule. DOKU executes the charge.**

👉 [*Learn more*](/subscription-and-billing/flexibill/account-billing/merchant-hosted-scheduler.md)

## Features & Benefits

**💳 Automatic Charging — Set and Forget**

Once a customer's payment method is registered, charges are processed automatically on the configured schedule — daily, weekly, or monthly — without any manual trigger from the merchant or the customer.

**🔒 Secure Card Tokenization**

Customer card details are stored using industry-standard PCI-DSS compliant tokenization managed entirely by DOKU. Sensitive card data — card numbers, CVVs, expiry dates — never touches the merchant's server. Merchants work with secure tokens only.

**📊 Real-Time Payment Tracking**

Monitor payment statuses, success rates, and failed charge attempts in real time from the Account Billing dashboard. Always know which customers have been charged and which have not.

**⚡ High-Volume Batch Processing**

Process large volumes of recurring payments simultaneously via bulk file upload through SFTP or the DOKU Dashboard — ideal for businesses with thousands of active customers in a single billing run.

**💰 Steady and Predictable Cash Flow**

Automated charging removes payment friction — customers no longer need to remember to pay, reducing late payments and churn caused by missed invoices.

**🔁 Flexible Billing Cycles**

Supports daily, weekly, monthly, and annual billing cycles — configurable to match any subscription or service model.

## How It Works

{% stepper %}
{% step %}

### Activate Required Payment Channel

Activate required payment channels (Credit Card or Direct Debit) with SALE + RECURRING payment type on your account
{% endstep %}

{% step %}

### Activate Account Billing

Activate the Account Billing feature and configure preferences.
{% endstep %}

{% step %}

### Register Customer Payment Method

Customer registers their card or bank account once — credentials are securely tokenized by DOKU
{% endstep %}

{% step %}

### Charges Run Automatically

On each billing date, DOKU or your own scheduler executes the charge automatically — merchant and customer receive real-time notifications
{% endstep %}
{% endstepper %}

## How Billing Dates Work

Account Billing uses **calendar-based scheduling** — charges are anchored to a fixed day of the month (e.g., the 5th or the 20th), not a relative interval from when the customer registered. Every customer assigned to a billing date is charged on that specific calendar date each cycle.

This is a fundamental difference from Subscription and Billing's interval logic:

<table><thead><tr><th width="163.76953125"></th><th width="325.73828125">Account Billing</th><th>Subscription and Billing</th></tr></thead><tbody><tr><td><strong>Scheduling model</strong></td><td>Calendar-based — fixed day of the month</td><td>Interval-based — relative to subscription start date</td></tr><tr><td><strong>Example</strong></td><td>All customers on the 5th are charged on the 5th of every month</td><td>A subscription starting on the 18th renews on the 18th each month</td></tr><tr><td><strong>When customers are charged</strong></td><td>On the configured billing date, regardless of when they registered</td><td>On the anniversary of their own start date</td></tr><tr><td><strong>Proration</strong></td><td>Not supported — first and all subsequent charges are the full amount</td><td>Not applicable</td></tr><tr><td><strong>Best for</strong></td><td>Batch-oriented billing where all customers settle on the same date(s)</td><td>Individual billing tied to each customer's own start date</td></tr></tbody></table>

### Registration Mid-Cycle

When a customer registers on a date that is not their billing date — for example, they register on the 18th but the billing date is the 5th — the following happens:

{% stepper %}
{% step %}

#### On registration (18th)

A registration charge is attempted for card validation purposes. This charge is immediately **voided** — no actual payment is collected. It exists only to confirm the card is valid and active.
{% endstep %}

{% step %}

#### First real charge

On the **5th of the following month**. The full billing amount is charged with no proration for the days between registration and the first billing date.

```
Customer registers on 18 Jan
    ↓
Void charge on 18 Jan (card validation only — no money collected)
    ↓
First real charge on 5 Feb (full amount)
    ↓
Recurring charge on 5 Mar, 5 Apr, 5 May ...
```

{% endstep %}
{% endstepper %}

{% hint style="info" %}
The void charge on registration day is purely a card validation step. Customers will see a temporary authorization on their bank statement that disappears within a few business days — no money is actually deducted.
{% endhint %}

### Multiple Billing Dates and Retry Logic

Each customer can be assigned their own billing date — merchants are not limited to a single billing date across their entire customer base. This flexibility also enables **retry logic**: a merchant can configure multiple consecutive dates for a single customer's billing cycle (e.g., the 5th, 6th, and 7th), so that if the charge fails on the primary date the system automatically retries on the next configured date.

```
Billing dates configured: 5th, 6th, 7th

5 Feb — charge attempt → FAILED (insufficient funds)
6 Feb — retry attempt  → FAILED (card temporarily blocked)
7 Feb — retry attempt  → SUCCESS ✅
```

{% hint style="warning" %}
If **Send One Bill/Month** is enabled in Bill Execution Preferences, only the first **successful** charge within a calendar month counts. All subsequent charge attempts in the same month — including retry dates — are automatically skipped once a successful charge has been recorded for that customer. This prevents double-charging when a customer is successfully charged on a retry date.
{% endhint %}

### No Proration

Account Billing currently does not support proration. Customers who register mid-cycle are always charged the **full billing amount** on their first billing date, regardless of how many days remain between their registration date and that first charge. If your business model requires prorated first charges, this must be handled outside of Account Billing.

## Scheduler Comparison

<table><thead><tr><th width="188.515625">Aspect</th><th width="265.65625">DOKU Hosted Scheduler</th><th>Merchant Hosted Scheduler</th></tr></thead><tbody><tr><td><strong>Scheduling control</strong></td><td>Fully managed by DOKU</td><td>Merchant-defined, on-demand</td></tr><tr><td><strong>Token management</strong></td><td>DOKU stores and manages tokens</td><td>Merchant manages tokens internally</td></tr><tr><td><strong>Data flow</strong></td><td>One-time sync, DOKU handles the rest</td><td>Merchant uploads data per cycle</td></tr><tr><td><strong>Best for</strong></td><td>Real-time online registration flows</td><td>Bulk billing with internal data control</td></tr><tr><td><strong>Primary Value add</strong></td><td>Seamless ecosystem integration</td><td>Data-driven, internal execution control</td></tr><tr><td><strong>Touch points</strong></td><td>API, Back Office (no-code)</td><td>API, Back Office (no-code), SFTP</td></tr></tbody></table>

## Use Cases

{% tabs %}
{% tab title="SaaS" %}

<table><thead><tr><th width="151.66796875"></th><th>Details</th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>A SaaS platform needs to automatically charge customers a monthly or annual software subscription fee without requiring them to log in and pay each cycle.</td></tr><tr><td><strong>Solution</strong></td><td>Use <strong>DOKU Hosted Scheduler</strong> — customers register their card once during onboarding, and DOKU charges them automatically on the billing date each cycle. Combined with Subscription and Billing if an invoice record is required; used standalone if billing is managed in the SaaS platform itself.</td></tr><tr><td><strong>How It Works</strong></td><td>Customer registers card via API → DOKU tokenizes and stores credentials → charge executed automatically on schedule → success/failure notification sent to merchant.</td></tr><tr><td><strong>Features Used</strong></td><td>DOKU Hosted Scheduler, Credit Card Tokenization, Real-time Notification</td></tr></tbody></table>
{% endtab %}

{% tab title="Insurance" %}

<table><thead><tr><th width="148.72265625"></th><th>Details</th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>An insurance provider needs to collect quarterly or annual premium payments from thousands of policyholders on a specific calendar date.</td></tr><tr><td><strong>Solution</strong></td><td>Use <strong>Merchant Hosted Scheduler</strong> — the insurance system manages the billing schedule internally and triggers bulk payment execution via SFTP file upload on the designated date. Used standalone; no Subscription and Billing invoice is required.</td></tr><tr><td><strong>How It Works</strong></td><td>Merchant prepares billing file → uploads via SFTP → DOKU processes bulk charges on schedule → consolidated report generated for reconciliation.</td></tr><tr><td><strong>Features Used</strong></td><td>Merchant Hosted Scheduler, SFTP Batch Processing, Reporting</td></tr></tbody></table>
{% endtab %}

{% tab title="Fitness" %}

<table><thead><tr><th width="147.7734375"></th><th>Details</th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>A gym chain charges monthly membership dues for thousands of members automatically on the 1st of each month, and also issues an invoice for each member's records.</td></tr><tr><td><strong>Solution</strong></td><td>Use <strong>DOKU Hosted Scheduler</strong> layered on top of <strong>Subscription and Billing</strong> — Subscription and Billing manages the plan and invoice, and Account Billing executes the automatic charge so members are never required to pay manually.</td></tr><tr><td><strong>How It Works</strong></td><td>Member subscribes to plan (Subscription and Billing) → registers card at checkout → DOKU tokenizes card → on the 1st of each month, DOKU executes charge for all active members → invoice marked as paid automatically.</td></tr><tr><td><strong>Features Used</strong></td><td>DOKU Hosted Scheduler, Direct Debit, Subscription and Billing Integration</td></tr></tbody></table>
{% endtab %}

{% tab title="Education" %}

<table><thead><tr><th width="152.84765625"></th><th>Details</th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>A school wants to collect monthly tuition fees from hundreds of students via auto-debit, while also keeping invoice records for parents.</td></tr><tr><td><strong>Solution</strong></td><td>Use <strong>Merchant Hosted Scheduler</strong> combined with <strong>Subscription and Billing</strong> — the school manages the student roster and triggers charges each month via Dashboard file upload. Subscription and Billing generates the invoice record for each student.</td></tr><tr><td><strong>How It Works</strong></td><td>Students registered as members (Member Center) → subscription created per student (Subscription and Billing) → school uploads monthly charge file (Merchant Hosted Scheduler) → charges executed and invoices auto-marked as paid.</td></tr><tr><td><strong>Features Used</strong></td><td>Merchant Hosted Scheduler, Subscription and Billing, Member Center</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## Merchant & Customer Experience

### Merchant View

* Activate Account Billing and configure prerequisite payment channels (Credit Card RECURRING/MOTO or Direct Debit)
* Choose DOKU Hosted Scheduler or Merchant Hosted Scheduler based on operational model
* Register customer billing data via API, Dashboard (no-code), or SFTP file upload
* Monitor payment status, success rates, and failed charges from the Account Billing dashboard
* Configure Bill Execution Preferences — execution time window, duplicate charge protection, fraud filtering, and notification callback URLs

### Customer View

* Registers their card or bank account once during the initial checkout or onboarding flow
* Receives a confirmation notification when their payment method is successfully registered
* Is charged automatically on each billing date — no action required on subsequent cycles
* Receives a payment confirmation notification after each successful charge

## Terms & Conditions

* Account Billing requires at least one compatible payment channel to be active on your DOKU account:
  * **Credit Card** with payment type **SALE, RECURRING** or **MOTO**, **or**
  * **Direct Debit** for automated bank account deductions
* Contact your **DOKU Account Manager** to verify and activate the required payment channels before proceeding
* Must be registered with a **corporate business account** on DOKU Dashboard
* Business must be **KYB (Know Your Business) verified** on DOKU Dashboard
* Account Billing Merchant Hosted Scheduler is available for **Indonesian Business Accounts** only

## FAQ

<details>

<summary>What is the difference between Account Billing and Subscription and Billing?</summary>

**Subscription and Billing** is invoice-based — the system issues an invoice and the customer pays manually via a payment link each cycle. The customer is an active participant in every payment.

**Account Billing** is charge-based — the system charges the customer's registered card or bank account automatically on schedule. The customer registers once; all subsequent charges happen without their involvement.

<table><thead><tr><th width="152.796875"></th><th>Subscription and Billing</th><th>Account Billing</th></tr></thead><tbody><tr><td><strong>How customers pay</strong></td><td>Manually via payment link</td><td>Automatically charged — no action needed</td></tr><tr><td><strong>Billing trigger</strong></td><td>Invoice issued → customer pays</td><td>Card charged directly on schedule</td></tr><tr><td><strong>Payment methods</strong></td><td>Any DOKU-supported method</td><td>Credit Card (RECURRING/MOTO) or Direct Debit only</td></tr><tr><td><strong>Best for</strong></td><td>Invoice-based billing workflows</td><td>Seamless, invisible auto-debit</td></tr></tbody></table>

</details>

<details>

<summary>Can I use Account Billing without Subscription and Billing?</summary>

Yes. Account Billing works fully independently of Subscription and Billing. If your business manages billing logic in its own system and only needs DOKU to execute the actual charge against a stored card or bank account, you can use Account Billing standalone — without creating any collection, plan, or subscription in FlexiBill.

</details>

<details>

<summary>Can I use Account Billing together with Subscription and Billing?</summary>

Yes. This is the recommended approach when you need both invoice records and automatic payment collection. Subscription and Billing manages the plan, pricing, and invoice generation — Account Billing executes the automatic charge each cycle so the customer's invoice is settled without manual payment. The invoice is automatically marked as paid after a successful charge.

</details>

<details>

<summary>What is the difference between DOKU Hosted Scheduler and Merchant Hosted Scheduler?</summary>

**DOKU Hosted Scheduler** is a fully hands-off model — once customer data is registered, DOKU manages the schedule and executes all charges automatically. Best for real-time online onboarding flows where customers register directly.

**Merchant Hosted Scheduler** gives the merchant full control — the merchant manages customer token data internally and triggers charges on demand via API, Dashboard upload, or SFTP. Best for businesses with their own billing system that want to use DOKU only for charge execution.

</details>

<details>

<summary>What payment methods are supported for Account Billing?</summary>

Account Billing supports:

* **Credit Card** — with SALE + RECURRING payment type (for subsequent recurring charges after an initial customer-present transaction) or MOTO (Mail Order Telephone Order, for charges processed without the customer being present)
* **Direct Debit** — automated deductions from a customer's linked bank account after the initial mandate is established

Contact your DOKU Account Manager to verify which channels are available and active on your account.

</details>

<details>

<summary>What happens if a charge fails?</summary>

Failed charges are logged and the merchant receives a notification via the configured Payment Execution Notification URL (set in Bill Execution Preferences). The system supports retry logic and, if **Freeze the Card** is enabled, automatically bypasses cards previously flagged by the processor as Stolen, Frozen, or Restricted — avoiding unnecessary transaction fees on repeat failures.

</details>

<details>

<summary>Is customer card data stored on the merchant's server?</summary>

No. Customer card details are tokenized using PCI-DSS compliant vaulting managed entirely by DOKU. Sensitive data — card numbers, CVVs, expiry dates — never touches the merchant's server. Merchants work with secure tokens only, and DOKU handles all credential storage and security compliance.

</details>

<details>

<summary>What is the "Send One Bill/Month" setting?</summary>

When enabled in Bill Execution Preferences, this setting ensures that a customer is only successfully charged once per calendar month — even if multiple billing dates are configured. Any duplicate charge attempts within the same calendar month are automatically marked as `ALREADY_PAID` without hitting the bank, preventing accidental double-charges.

</details>

<details>

<summary>Does Account Billing support dynamic (usage-based) billing amounts?</summary>

Yes, via the **URL Amount** setting in Bill Execution Preferences. If the billing amount varies per cycle, you can configure an endpoint URL that the system queries just before each scheduled charge. The system uses the `billing_amount` returned by your endpoint for that transaction — enabling fully dynamic recurring billing without manual file uploads each cycle.

</details>

<details>

<summary>Why does Account Billing use a fixed calendar date instead of a relative interval?</summary>

Calendar-based billing is designed for batch-oriented operations where a merchant needs all charges for a given cycle to run on the same date — making reconciliation, reporting, and retry management predictable and operationally simple. It is particularly suited for businesses like insurance, utilities, and gym memberships where billing runs on a company-defined schedule rather than each customer's individual registration anniversary.

For billing that follows each customer's own start date (interval-based), use Subscription and Billing instead.

</details>

<details>

<summary>What happens to a customer who registers on the 18th when the billing date is the 5th?</summary>

On registration (18th), a void charge is executed purely to validate the card — no money is collected. The first real charge happens on the 5th of the following month at the full billing amount. There is no proration for the days between registration and the first billing date.

</details>

<details>

<summary>Can I configure retry dates if a charge fails on the primary billing date?</summary>

Yes. You can assign multiple consecutive billing dates to a single customer (e.g., the 5th, 6th, and 7th). If the charge fails on the 5th, the system automatically retries on the 6th, and again on the 7th if needed. If **Send One Bill/Month** is enabled, once a retry succeeds, all remaining dates for that month are skipped automatically to prevent double-charging.

</details>

<details>

<summary>Can different customers have different billing dates?</summary>

Yes. Each customer can be assigned their own billing date independently. There is no restriction to a single billing date per merchant account — you can have some customers on the 5th, others on the 15th, and others on the 20th simultaneously.

</details>

<details>

<summary>Does Account Billing support proration for customers who join mid-cycle?</summary>

No. Account Billing does not currently support proration. The first charge on the billing date is always the full billing amount, regardless of when the customer registered. If your business requires prorated charges for new customers, this calculation must be handled in your own system before registering the customer into Account Billing.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.doku.com/subscription-and-billing/flexibill/account-billing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
