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: Request a Card Payment
To initiate a one-time card payment, you’ll need to send aPOST request to the Create Payin endpoint.
Key Request Parameters
The request requires several key objects:
The
paymentMethod.code depends on the country, the card brand, and the product (credit or debit). In Peru it also depends on the currency. See Card Payment Method Codes for the full list.
Example Request
Below is an example usingcurl:
curl
Payment with Tokenized Card
If you have previously tokenized a customer’s card, you can use the token instead of sending the full card details to process a one-time payment. This enhances security and simplifies the payment flow by eliminating the need to request card information again. For detailed information on card tokenization, please refer to the Tokenization documentation.Payment with 3D Secure
If the cardholder requires additional authentication, the flow will proceed through 3D Secure. In this case, Localpayment returns the issuer’s challenge URL in the API response, and it is the merchant’s responsibility to redirect the customer or display the challenge within the checkout flow. This allows the cardholder to complete the required verification. The exact 3D Secure experience may vary depending on the issuer and the customer’s country. For detailed information on 3D Secure payments, please refer to the 3D Secure documentation.Step 2: Handle the Response
Successful Response
A successful response includes detailed transaction information and tracking identifiers:Key Response Fields
Error Response
When a request fails, you’ll receive detailed error information:Step 3: Track Transaction Status
After initiating a one-time payment, 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 Status Codes
The Localpayment API provides various status codes to indicate the progress and outcome of the payment in the response.APPROVED is not the final status. It means the card payment was confirmed, but the funds are not credited to your balance yet. You can see the payment, but you can’t withdraw the funds until the status changes to Completed. This usually takes 1 to 2 days, depending on the provider.
Complete ReferenceView all status codes in our Transaction Status Documentation.
Testing Your Integration
Test Scenarios
Verify your integration handles these scenarios:- Successful Transaction: Standard payin flow
- Validation Errors: Invalid bank account, missing fields
- Processing Delays: Transactions that take time to process
- Failed Transactions: Insufficient funds, blocked beneficiaries
- Status Updates: Webhook handling and status polling
Next Steps
After a one-time payment is processed, you may need to perform additional actions, such as:Refund the transaction
If necessary, you can refund the payment to the customer. Refer to the documentation for details.
Handle chargebacks
In case of a dispute, you may need to handle chargebacks. Refer to the documentation for information on this process.
Review transaction details
You can retrieve transaction information using the Localpayment API for detailed insights.

