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 aPATCH request to the Update a Subscription endpoint.
Key Request Parameters
The request requires several key parameters:Example Request
Below is an example usingcurl:
curl
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:- Successful Plan Upgrade: Increasing subscription tier or amount.
- Successful Plan Downgrade: Decreasing subscription tier or amount.
- Payment Method Update: Changing card details.
- Customer Information Update: Modifying customer details.
- Validation Errors: Invalid amounts, missing required fields.
- 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.

