Skip to main content
Localpayment enables you to modify existing subscriptions to accommodate changes in customer needs, such as upgrading or downgrading plans, updating billing information, or changing subscription frequencies. This guide details the process for updating a subscription through Localpayment’s API.

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

To modify an existing subscription, send a PATCH request to the Update a Subscription endpoint.

Key Request Parameters

The request requires several key parameters:

Example Request

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

Step 2: Handle the Response

Successful Response

A successful update returns the modified subscription details:

Key Response Fields

Error Response

When a request fails, you’ll receive detailed error information:

Step 3: Track Transaction Status

After updating a subscription, 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

The Localpayment API provides various status codes to indicate the progress and outcome of the payment in the response.
Complete ReferenceView all status codes in our Transaction Status Documentation.

Testing Your Integration

Test Scenarios

Verify your integration handles these scenarios:
  1. Successful Plan Upgrade: Increasing subscription tier or amount.
  2. Successful Plan Downgrade: Decreasing subscription tier or amount.
  3. Payment Method Update: Changing card details.
  4. Customer Information Update: Modifying customer details.
  5. Validation Errors: Invalid amounts, missing required fields.
  6. Status Updates: Webhook handling and status polling

Next Steps

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

Cancel subscription

Terminate active subscriptions when updates aren’t sufficient.

Handle subscription webhooks

Set up webhooks to receive notifications for subscription update events.

Create subscription plans

Create new plans that can be used when updating subscriptions.
Last modified on November 10, 2026