Skip to main content
Localpayment enables you to create fixed subscription plans for standardized recurring billing scenarios. This guide details how to set up subscription plans through Localpayment’s API, which can then be associated with customer subscriptions for consistent, automated billing.

Before You Begin

Ensure you have:

API Credentials

Valid API credentials and access token for authentication.

Account Setup

Proper account setup for your target country and business verification.

IP Whitelisting

Whitelist your server IP addresses for API access.

Webhook Endpoint

Set up a webhook URL to receive payment notifications.

Step 1: Create a Subscription Plan

To create a new subscription plan, send a POST request to the Create Subscription Plan endpoint.

Key Request Parameters

The request requires several key objects:

Supported Billing Frequencies

Daily

Bill customers every day. Ideal for services with daily usage or short-term subscriptions.Send theautoRecurring.type property with value: day

Monthly

Monthly recurring billing for most SaaS products, membership services, and subscription boxes.Send theautoRecurring.type property with value: month

Custom (On-demand)

On-demand billing for variable usage scenarios. Perfect for pay-as-you-go or usage-based services.Send theautoRecurring.type property with value: custom

Example Request

Below is an example using curl:
curl
See all available parameters in the request.

Step 2: Handle the Response

Successful Response

A successfully created subscription plan returns complete plan details:

Key Response Fields

Error Response

When subscription plan creation fails, you’ll receive detailed error information:

Step 3: Track Transaction Status

After creating a subscription plan, monitor its status through these methods:

Webhooks (Recommended)

Receive real-time notifications when transaction status changes. Most efficient for production environments.

Status API Endpoint

Query transaction status programmatically. Useful for polling or recovering lost webhook notifications.

Business Portal View

Visual interface for monitoring transactions. Great for manual oversight and detailed transaction analysis.

Common Status Codes

Complete ReferenceView all status codes in our Transaction Status Documentation.

Testing Your Integration

Test Scenarios

Verify your integration handles these scenarios:
  1. Successful Plan Creation: Standard plan creation with valid parameters.
  2. Tiered Pricing Structure: Creating multiple plans at different price points.
  3. Various Billing Frequencies: Testing daily, monthly, and custom on-demand plans.
  4. Validation Errors: Missing required fields, invalid amounts, unsupported countries.
  5. Subscription Association: Testing that plans can be successfully linked to subscriptions

Next Steps

After creating a subscription plan, you may need to perform additional actions::

Create subscription with plan

Use the plan internalId as planId parameter to create customer subscriptions with your new plan.

Update subscription plan

Modify existing plan details while maintaining associations with active subscriptions.
Last modified on November 10, 2026