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
Completedstatus. - The
externalIdof the original payment transaction. - Complete beneficiary information for data-required refunds.
Implementation Guide
Localpayment provides two methods for processing APM 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.Note: All Business Portal refunds require approval.
Data-Required Refunds for APMs
APM refunds are processed as Data-Required Refunds, meaning you need both the original transaction’sexternalId and complete beneficiary information. Unlike direct refunds, this flow requires additional payer and bank details since QR payments involve specific beneficiary information that must be verified.
Country-Specific Requirements
APM refunds have specific requirements and limitations depending on the country and payment method. Below are the key country-specific considerations:- QR (Argentina)
- Refund Flow: Data-required refunds with full beneficiary information.
- Document Types: Supported Argentine document types (CUIL, DNI, etc.).
- Processing: Refunds processed through local Argentine banking networks.
Step 1: Process Refund via API
To refund a APM payment through API, send aPATCH request to the Refund 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 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
APM 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.
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:- Successful Refund: Process refund with valid
externalIdand sufficient funds. - Insufficient Funds: Attempt refund with inadequate account balance.
- Invalid Transaction: Try to refund non-existent
externalId. - Duplicate Refund: Attempt to refund an already refunded transaction.
- 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.

