Overview
The Localpayment Sandbox is a complete testing platform that mirrors our production environment without processing real transactions. It provides a secure space to test your integration across various payment methods, currencies, and countries before going live.Sandbox Environment
Use our dedicated sandbox API endpoint for all testing activities
Test Data
Access comprehensive test cards and accounts for all scenarios
Real-time Simulation
Receive instant webhook notifications for all test transactions
API Reference
Explore our complete API documentation with examples
Before You Begin
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: Generate Access Token
To interact with Localpayment’s API, you need an access token for authentication. This token is required for all API requests. To generate an access token, you’ll need to make aPOST request to the Generate an Access Token endpoint with your Localpayment username and password included in the request body as a JSON object.
Example Request
curl
Successful Response
Step 2: Retrieve Available Payment Methods
Before creating a payment, check which payment methods are available for your account and target country. To get the available payment methods, send aGET request to the Get Available Payment Methods endpoint, including your accountNumber as a query parameter.
Example Request
curl
Successful Response
For card payments, look for payment methods where
paymentMethodType is CreditCard or DebitCard. Note the code value (e.g., 1000 for Visa in Argentina) as you’ll need it for the payment request.Step 3: Create a Payment Request
Now you’re ready to create your first test payment. We’ll use a credit card payment for Argentina as an example. To create a credit card payment, send aPOST request to the Create Payin endpoint, including your access token in the Authorization header.
Key Request Fields
The request requires several key parameters:Example Request
Below is an example usingcurl:
curl
Successful Response
A successful response includes detailed transaction information and tracking identifiers:Key Response Fields
Step 4: Handle Webhook Notifications
Webhooks provide real-time notifications about transaction status changes. Configure your webhook URL in the Localpayment Business Portal to receive these notifications.Webhook Payload Example
Implementation Tip:Your webhook endpoint should return a
200 OK status immediately upon receiving the webhook, then process the notification asynchronously to avoid timeouts.Step 5: Track Transaction Status
You can proactively check transaction status using the Get Transaction Status endpoint. Send aGET request, replacing {externalId} with your unique transaction identifier to obtain the transaction status.
Example Request
curl
Successful Response
Common Status Codes
Testing Different Payment Methods
Localpayment supports various payment methods beyond credit cards. Each method has specific request parameters and response structures. Below are examples for bank transfers with key differences highlighted.- Bank Transfer Payments
Next Steps
Explore Payins Options
Discover all available payment methods including cards and APMs.
Explore Payouts Options
Learn about sending payments to bank accounts and digital wallets.
Discover Country Coverage
Check available payment methods, currencies, and specific requirements for each country.
API Reference
Access complete API documentation with endpoints, parameters, and code examples.

