# POST /multiplans — Create Multiplan

> Product: **Pabbly Subscription Billing** (v1)
> Base URL: `https://payments.pabbly.com/api/v1`
> Auth: Basic via `Authorization` header
> Canonical: `/subscription-billing/multiplan/create-multiplan`

Post request API to create a new multiplan checkout page that bundles multiple plans together. In response a new multiplan is created with the provided plans, page title, and layout. A checkout_page URL is auto-generated for sharing with customers.

**Body parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| product_id | string | Yes | Id of the product the multiplan belongs to. Must belong to the authenticated user |
| page_title | string | Yes | Display name for the checkout page. Must be unique within the same product |
| plans | array | Yes | Array of plan Ids to include in the multiplan, e.g. ["5e5e2c...", "5e5e2d..."]. All plans must belong to the same product and user |
| multiplan_list | string | No | Layout style for the checkout page. Allowed values: radio, select. Default: radio |
| preferred_plan_id | string | No | Pre-selected plan Id shown on the checkout page. Must be one of the plan Ids in the plans array |

**Example request body:**

```json
{
    "product_id": "69b2aa3b2cbef17b2d0e783f",
    "page_title": "API Test Multiplan",
    "plans": [
        "69b2aae22cbef17b2d0e78d7",
        "69ca13434339a54d2b664343"
    ],
    "multiplan_list": "radio",
    "preferred_plan_id": "69b2aae22cbef17b2d0e78d7"
}
```

**Response (200)** — Create Multiplan:

```json
{
    "status": "success",
    "message": "Multiplan created",
    "data": {
        "product_id": "69b2aa3b2cbef17b2d0e783f",
        "page_title": "API Test Multiplan",
        "multiplan_list": "radio",
        "preferred_plan_id": "69b2aae22cbef17b2d0e78d7",
        "createdAt": "2026-05-14T05:56:40.182Z",
        "updatedAt": "2026-05-14T05:56:40.182Z",
        "id": "6a056418c3144e06f775874b",
        "plans": [
            {
                "plan_type": "per_unit",
                "plan_active": "true",
                "currency_code": "USD",
                "currency_symbol": "$",
                "custom_payment_term": 0,
                "failed_payment_gateway": "",
                "failed_payment_gateway_array": [],
                "funnel": [],
                "is_metered": false,
                "setup_fee_type": "",
                "trial_type": "day",
                "createdAt": "2026-03-12T12:00:34.668Z",
                "updatedAt": "2026-03-13T05:48:14.338Z",
                "id": "69b2aae22cbef17b2d0e78d7",
                "product_id": "69b2aa3b2cbef17b2d0e783f",
                "plan_name": "Plan A",
                "plan_code": "plan-a",
                "price": 1289,
                "billing_period": "m",
                "billing_period_num": "1",
                "billing_cycle": "lifetime",
                "billing_cycle_num": "",
                "trial_period": 0,
                "setup_fee": 0,
                "plan_description": "<p>This is the test plan description.</p><p><br></p><p><img src=\"https://s3psb.pabbly.com/product/images/2022/2/Y9fZRFgdHKIR-1643959680-PlandescriptionImage.png\" style=\"max-width: 100%; height: auto;\"></p><p><br></p><p>From the checkout customizer,</p><p><br></p><ul><li>You can change the bullet type.</li><li>You can change list style.</li><li>You can change text size</li><li>You can change the bullet color.</li><li>Image size should be 400W x 250H, Max Size - 100kb.</li></ul>"
            },
            {
                "plan_type": "flat_fee",
                "plan_active": "true",
                "currency_code": "USD",
                "currency_symbol": "$",
                "custom_payment_term": 0,
                "failed_payment_gateway": "",
                "failed_payment_gateway_array": [],
                "funnel": [],
                "is_metered": false,
                "setup_fee_type": "",
                "trial_type": "day",
                "createdAt": "2026-03-30T06:08:03.979Z",
                "updatedAt": "2026-03-30T06:50:52.358Z",
                "id": "69ca13434339a54d2b664343",
                "product_id": "69b2aa3b2cbef17b2d0e783f",
                "plan_name": "Free Plan",
                "plan_code": "free-plan",
                "price": 0,
                "billing_period": "m",
                "billing_period_num": "1",
                "billing_cycle": "lifetime",
                "billing_cycle_num": "",
                "trial_period": 0,
                "setup_fee": 0,
                "plan_description": "<p>This is the test plan description.</p><p><br></p><p><img src=\"https://s3psb.pabbly.com/product/images/2022/2/Y9fZRFgdHKIR-1643959680-PlandescriptionImage.png\" style=\"max-width: 100%; height: auto;\"></p><p><br></p><p>From the checkout customizer,</p><p><br></p><ul><li>You can change the bullet type.</li><li>You can change list style.</li><li>You can change text size</li><li>You can change the bullet color.</li><li>Image size should be 400W x 250H, Max Size - 100kb.</li></ul>"
            }
        ],
        "checkout_page": "https://payments.pabbly.com/checkout/6a056418c3144e06f775874b"
    }
}
```

**Code examples:**

_cURL_

```curl
curl -X POST https://payments.pabbly.com/api/v1/multiplans \
  -u {{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}} \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "69b2aa3b2cbef17b2d0e783f",
    "page_title": "API Test Multiplan",
    "plans": [
      "69b2aae22cbef17b2d0e78d7",
      "69ca13434339a54d2b664343"
    ],
    "multiplan_list": "radio",
    "preferred_plan_id": "69b2aae22cbef17b2d0e78d7"
  }'
```

_Ruby_

```ruby
require 'net/http'
require 'json'

uri = URI('https://payments.pabbly.com/api/v1/multiplans')
request = Net::HTTP::Post.new(uri)
request.basic_auth '{{YOUR_API_KEY}}', '{{YOUR_SECRET_KEY}}'
request['Content-Type'] = 'application/json'
request.body = "{\"product_id\":\"69b2aa3b2cbef17b2d0e783f\",\"page_title\":\"API Test Multiplan\",\"plans\":[\"69b2aae22cbef17b2d0e78d7\",\"69ca13434339a54d2b664343\"],\"multiplan_list\":\"radio\",\"preferred_plan_id\":\"69b2aae22cbef17b2d0e78d7\"}"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(request)
end

data = JSON.parse(response.body)
```

_Python_

```python
import requests
from requests.auth import HTTPBasicAuth

response = requests.post(
    'https://payments.pabbly.com/api/v1/multiplans',
    auth=HTTPBasicAuth('{{YOUR_API_KEY}}', '{{YOUR_SECRET_KEY}}'),
    json={
    'product_id': '69b2aa3b2cbef17b2d0e783f',
    'page_title': 'API Test Multiplan',
    'plans': [
        '69b2aae22cbef17b2d0e78d7',
        '69ca13434339a54d2b664343'
    ],
    'multiplan_list': 'radio',
    'preferred_plan_id': '69b2aae22cbef17b2d0e78d7'
},
)

data = response.json()
```

_PHP_

```php
<?php
$ch = curl_init('https://payments.pabbly.com/api/v1/multiplans');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_USERPWD, '{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"product_id":"69b2aa3b2cbef17b2d0e783f","page_title":"API Test Multiplan","plans":["69b2aae22cbef17b2d0e78d7","69ca13434339a54d2b664343"],"multiplan_list":"radio","preferred_plan_id":"69b2aae22cbef17b2d0e78d7"}');

$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
```

_Java_

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.Base64;

String credentials = Base64.getEncoder().encodeToString("{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}".getBytes());

HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder()
    .uri(URI.create("https://payments.pabbly.com/api/v1/multiplans"))
    .header("Authorization", "Basic " + credentials)
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\"product_id\":\"69b2aa3b2cbef17b2d0e783f\",\"page_title\":\"API Test Multiplan\",\"plans\":[\"69b2aae22cbef17b2d0e78d7\",\"69ca13434339a54d2b664343\"],\"multiplan_list\":\"radio\",\"preferred_plan_id\":\"69b2aae22cbef17b2d0e78d7\"}"));

HttpRequest request = builder.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

_Node.js_

```node
const credentials = Buffer.from('{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}').toString('base64');

const response = await fetch('https://payments.pabbly.com/api/v1/multiplans', {
  method: 'POST',
  headers: {
    'Authorization': `Basic ${credentials}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "product_id": "69b2aa3b2cbef17b2d0e783f",
    "page_title": "API Test Multiplan",
    "plans": [
      "69b2aae22cbef17b2d0e78d7",
      "69ca13434339a54d2b664343"
    ],
    "multiplan_list": "radio",
    "preferred_plan_id": "69b2aae22cbef17b2d0e78d7"
  }),
});

const data = await response.json();
```

_Go_

```go
package main

import (
    "fmt"
    "io"
    "net/http"
    "strings"
)

func main() {
    payload := strings.NewReader("{\"product_id\":\"69b2aa3b2cbef17b2d0e783f\",\"page_title\":\"API Test Multiplan\",\"plans\":[\"69b2aae22cbef17b2d0e78d7\",\"69ca13434339a54d2b664343\"],\"multiplan_list\":\"radio\",\"preferred_plan_id\":\"69b2aae22cbef17b2d0e78d7\"}")
    req, _ := http.NewRequest("POST", "https://payments.pabbly.com/api/v1/multiplans", payload)
    req.Header.Set("Content-Type", "application/json")
    req.SetBasicAuth("{{YOUR_API_KEY}}", "{{YOUR_SECRET_KEY}}")

    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)
    fmt.Println(string(body))
}
```

_.NET_

```dotnet
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;

var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes("{{YOUR_API_KEY}}:{{YOUR_SECRET_KEY}}"));

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://payments.pabbly.com/api/v1/multiplans");
request.Headers.TryAddWithoutValidation("Authorization", $"Basic {credentials}");
request.Content = new StringContent("{\"product_id\":\"69b2aa3b2cbef17b2d0e783f\",\"page_title\":\"API Test Multiplan\",\"plans\":[\"69b2aae22cbef17b2d0e78d7\",\"69ca13434339a54d2b664343\"],\"multiplan_list\":\"radio\",\"preferred_plan_id\":\"69b2aae22cbef17b2d0e78d7\"}");
request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json");

var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();
Console.WriteLine(data);
```

---

**Other endpoints in Multiplan:**

- [GET /multiplans/{{multiplan_id}} — Get Multiplan Details](/subscription-billing/multiplan/get-multiplan-details)
- [GET /multiplans — List All Multiplans](/subscription-billing/multiplan/list-all-multiplans)
- [PUT /multiplans/{{id}} — Update Multiplan](/subscription-billing/multiplan/update-multiplan)
- [DELETE /multiplans/{{id}} — Delete Multiplan](/subscription-billing/multiplan/delete-multiplan)

