Skip to main content
Localpayment enables you to process refunds for virtual account payments, allowing you to return funds to customers through both API integration and the Business Portal interface. This guide covers the complete refund workflow for virtual account transactions using the direct refund method.

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.

Additional Refund Requirements:

  • Sufficient balance in your Localpayment account to cover the refund amount.
  • User role with refund permissions (see User Roles documentation).
  • The original transaction must be in Completed status.
  • The externalId of the original payment transaction.

Implementation Guide

Localpayment provides two methods for processing virtual account refunds: API integration for automated processing and Business Portal for manual operations.

API Refund Processing

Programmatically process refunds through REST API for automated workflows and integration with your systems.

Business Portal Refund Processing

Manually process refunds through the Localpayment Business Portal with a user-friendly interface.

Direct Refunds for Virtual Accounts

All virtual account refunds are processed as Direct Refunds, meaning you only need the original transaction’s externalId. The system automatically routes funds back to the original payer’s account without requiring additional beneficiary information.
ImportantOnly full refunds are permitted for virtual account transactions. Partial refunds are not supported.

Country-Specific Requirements

Virtual account refunds have specific requirements and limitations depending on the country and banking method. Below are the key country-specific considerations:
  • Banco Azteca: Refunds are not currently available for payments processed through Banco Azteca in Mexico.
  • SPEI/TEF: All refunds for payments made via SPEI or TEF are processed through the SPEI network.

Step 1: Process Refund via API

To refund a virtual account payment through API, send a PATCH request to the Refund 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 successfully processed refund returns confirmation details:

Key Response Fields

Error Response

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

Common Error Scenarios


Business Portal Refunds

Virtual account refunds can also be processed through the Localpayment Business Portal interface. This method provides a visual workflow for managing refunds and is particularly useful for:
  • Occasional refunds that don’t require API automation.
  • Administrative oversight where approval workflows are needed.
  • Quick refund processing without development resources.
For detailed instructions on processing refunds through the Business Portal, including step-by-step guidance and interface walkthroughs, please refer to the Business Portal Refunds Guide .
Approval RequiredAll refunds initiated through the Localpayment Business Portal require approval through the designated authorization workflow. Ensure you have the necessary user permissions before attempting Business Portal refunds.

Step 3: Track Refund Status

After initiating a refund, monitor its progress 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 Refund 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 Refund: Process refund with valid externalId and sufficient funds.
  2. Insufficient Funds: Attempt refund with inadequate account balance.
  3. Invalid Transaction: Try to refund non-existent externalId.
  4. Duplicate Refund: Attempt to refund already refunded transaction.
  5. Permission Validation: Test with users having different permission levels.

Next Steps

View transaction status

Check the current status of transactions and refunds using the Transaction Status API.

Configure webhooks

Set up webhooks to receive real-time notifications for refund status changes.

Review user roles

Manage user permissions and roles for refund processing capabilities.
Last modified on November 10, 2026