> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.runpayments.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.runpayments.io/_mcp/server.

# Billing Plans

## Overview

Billing plans eliminate the need to manage your own cron job scheduler. Simply configure the payment frequency, and our system automatically processes payments on schedule by initiating authorization requests to the gateway using tokenized payment data stored in your Vault.

This gives you complete control over recurring payments through a simple API integration.

> **Important Security & Compliance Notes**
>
> ### PCI DSS Compliance
>
> Never store Card Verification Value (CVV) data. Storing CVV data violates PCI DSS standards and is prohibited for both gateways and merchants, including for recurring billing purposes.
>
> ### Cardholder Consent Required
>
> Before establishing recurring billing or storing payment information for future use, you must:
>
> * Obtain explicit cardholder consent
> * Comply with all requirements in [Card on File processing](/docs/guides/payments/card-on-file)

## How It Works

Setting up a billing plan involves three key steps: tokenizing payment data, configuring your plan details, and creating the plan via API.

**Before you begin:** Ensure you comply with card brand requirements for obtaining consent to store and reuse cardholder data. See the [Card on File section](/docs/guides/payments/card-on-file) for detailed information.

### Step 1: Tokenize and Store Payment Data

First, securely tokenize the customer's payment data and store it in a Vault using one of these methods:

**Option A: Using runner.js**

Render a hosted iFrame tokenizer with runner.js, retrieve the generated token, and store it as a Vault by including `vault: "Y"` in your subsequent charge request.

**Option B: Using the API directly**

Call the [Create Vault Payment Account endpoint](/reference/payments-api/create-vault-payment-account) to create a new Vaulted Payment Method.

### Step 2: Configure Your Billing Plan

You'll need the following information to create your billing plan:

| Field                    | Type    | Required | Description                                                                                                                             |
| ------------------------ | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**                 | String  | Yes      | Billing plan name for identification                                                                                                    |
| **Description**          | String  | Yes      | Detailed description of the billing plan                                                                                                |
| **MID**                  | String  | Yes      | Merchant ID                                                                                                                             |
| **Payment Account UUID** | UUID    | Yes      | Reference to the vaulted payment method                                                                                                 |
| **Amount**               | Decimal | Yes      | Recurring payment amount                                                                                                                |
| **RRule Pattern**        | String  | Yes      | Recurrence rule defining payment frequency. Resource: [RFC 5545](https://icalendar.org/iCalendar-RFC-5545/3-8-5-3-recurrence-rule.html) |

### Step 3: Create the Billing Plan

Make a POST request to the Create Billing Plan endpoint with your configuration:

**Request**

```json
{
  "name": "Testing Payment Plan",
  "description": "Rental Payments",
  "mid": "800000001780",
  "payment_account_uuid": "1f0bb43e-a184-6f30-a618-7784b6d018bc",
  "amount": "120.00",
  "rrule_pattern": "DTSTART:20270101T090000Z\nRRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20270110T235959Z"
}
```

**Response**

```json
{
  "id": 6549
}
```