Skip to main content
Localpayment allows you to modify existing subscription plans to accommodate changes in your pricing strategy, billing cycles, or service offerings. This guide details how to update a subscription plan through Localpayment’s API, ensuring existing subscriptions can continue under the new terms or according to your configured policies.

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: Update a Subscription Plan

To modify an existing subscription plan, send aPATCH request to the Update Subscription Plan endpoint.

Key Request Parameters

The request requires several key parameters:

Supported Billing Frequencies

Daily

Update to daily billing. Ideal for services transitioning to daily usage patterns.Send theautoRecurring.type property with value: day

Monthly

Update to monthly billing. Common for standardizing billing cycles across product lines.Send theautoRecurring.type property with value: month

Custom (On-demand)

Update to on-demand billing. Suitable for moving to usage-based pricing models.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 updated subscription plan returns confirmation with the current status:

Key Response Fields

Error Response

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

Step 3: Track Transaction Status

After updating 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 Amount Update: Modify plan pricing with valid amount values.
  2. Billing Frequency Change: Update from monthly to daily or custom billing.
  3. Partial Updates: Modify only specific fields without sending complete payload.
  4. Validation Errors: Test with invalid amounts, missing required fields, or unsupported frequencies.
  5. Nonexistent Plan: Attempt to update a plan that doesn’t exist.
  6. Authentication Failures: Test with invalid or expired access tokens.

Next Steps

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

Create a new subscription plan

Set up additional subscription plans for different pricing tiers or service levels.

Create subscription with updated plan

Create new subscriptions using your updated plan to test the changes.

Get subscription plan details

Retrieve the updated plan information to verify all changes were applied correctly.
Last modified on November 23, 2026