DEBIN (Argentina)
Localpayment enables merchants to process instant bank transfers through Argentina's Debin (Débito Inmediato) system. This guide outlines the process for initiating Debin payments through Localpayment's API, detailing required parameters, handling responses, and interpreting status codes for seamless integration with Argentina's immediate debit network.
Debin payments expire 2 days after the creation date.
Before You Begin
Ensure you have:
- Valid API credentials(access token).
Step 1. Create Debin Payment
To generate a Debin payment request, send a POST request to the Create Payin endpoint with Debin-specific parameters.
The payment request can only be made to CBU accounts. These account numbers are distinguished by the fact that their first three digits do not begin with zero.
Key Request Parameters
The request requires several key objects specific to Debin payments:
| Object | Description | Required |
|---|---|---|
paymentMethod.type | Must be BankTransfer. | ✅ |
paymentMethod.code | Must be 1040 for Debin. | ✅ |
payer | Payer bank account information. | ✅ |
merchant | Merchant/business details | ✅ |
amount | Transaction amount | ✅ |
currency | Transaction currency code | ✅ |
country | Must be ARG | ✅ |
See all available parameters in the request.
Example Request
Below is an example using curl:
curl --request POST \
--url https://api.stage.localpayment.com/api/payin/ \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'Authorization: Bearer <your_access_token>' \
--data '
{
"paymentMethod": {
"type": "BankTransfer",
"code": "1040",
"flow": "DIRECT"
},
"currency": "ARS",
"merchant": {
"type": "COMPANY",
"name": "Company"
},
"payer": {
"type": "INDIVIDUAL",
"document": {
"type": "CUIL",
"id": "20963514871"
},
"bank": {
"account": {
"type": "C",
"number": "0070055930004044931234"
},
"name": "Galicia",
"code": "007"
},
"name": "John",
"lastName": "Doe",
"email": "[email protected]"
},
"externalId": "0fcd5d00-a734-46d9-95d7-246126989132",
"country": "ARG",
"amount": 1800,
"accountNumber": "{{yourAccountNumber}}",
"conceptCode": "0038",
"comment": "",
"transactionType": "PayIn",
"clientCode": "0028",
"requireAuth": false,
"file": false
}
'The payment will only be considered complete once the customer accepts it in their banking application. If the customer declines it, the payment will be rejected. Otherwise, the payment will move to an expired status.
Step 2. Handle the Response
Successful Response
A successful Debin payment creation includes the payment request details and authorization flow:
{
"transactionType": "PayIn",
"externalId": "bb905b2f-e412-493f-a0a0-c3c03444e0c8",
"internalId": "d05dab30-485f-473d-844c-041ed5355fc4",
"paymentMethod": {
"type": "BankTransfer",
"code": "1040",
"flow": "DIRECT"
},
"country": "ARG",
"currency": "ARS",
"amount": 2355,
"accountNumber": "{{yourAccountNumber}}",
"confirmed": {
"currency": "ARS",
"fxQuote": 1,
"amount": 1
},
"payment": {
"currency": "ARS",
"fxQuote": 1,
"financingFee": 0,
"amount": 1
},
"localTaxes": [],
"withHoldings": [],
"fees": {
"description": "Fee",
"currency": "ARS",
"fxSource": 1,
"fxQuote": 1,
"amount": 0,
"account": "{{yourAccountNumber}}"
},
"status": {
"code": "100",
"description": "INPROGRESS",
"detail": "The payin is pending the confirmation"
},
"merchant": {
"type": "INDIVIDUAL",
"name": "Company"
},
"payer": {
"type": "INDIVIDUAL",
"name": "John",
"lastName": "Doe",
"document": {
"type": "CUIL",
"id": "20045113651"
},
"email": "[email protected]",
"bank": {
"name": "QA TEST",
"code": "322",
"account": {
"type": "S",
"number": "3220001805117354710015"
}
}
},
"intermediaries": [],
"date": {
"creationDate": "2025-02-16T20:04:04.993",
"processedDate": "2025-02-16T20:04:10.969",
"expirationDate": "2025-02-23T20:04:05.553"
},
"errors": [],
"redirectUrl": "https://web-checkout.stage.localpayment.com/redirect/L3ZlcmlmaWNhdGlvbi8wMTM5P2ludGVybmFsSWQ9MGRlNmI5MmQtYjY0Yi00YThhLThjNGEtYjczNDk3ZWRhZDQx"
}Key Response Fields
| Parameter | Description | Use Case |
|---|---|---|
redirectUrl | URL to redirect payer for authorization. | Direct customer to complete Debin authorization process. |
externalId | Your original reference number. | Internal reconciliation and order matching. |
status.code | Current transaction state (100 = INPROGRESS) | Determine next steps in payment flow. |
date.creationDate | When transaction was created. | Analytics and performance tracking. |
date.expirationDate | ISO timestamp when Debin request becomes invalid. | Display countdown timer and handle expiration logic. |
Error Response
When Debin request creation fails, you'll receive detailed error information:
{
"externalId": "ce0aaa1a-4532-43b9-930a-26e780aba99b",
"status": {
"code": "812",
"description": "REJECTED"
},
"errors": [
{
"code": "812",
"detail": "External Id already used - duplication"
}
]
}Step 3. Handle Authorization Flow
-
Payment Initiation: Your application sends DEBIN request to Localpayment API.
-
Banking Network Processing: Localpayment routes payment through Argentine banking system.
-
Customer Notification: Customer receives real-time alert in their banking app.
-
Payment Authorization: Customer approves payment directly in banking interface.
-
Confirmation & Webhooks: Localpayment sends instant webhook with final payment status.
-
Order Fulfillment: Your application updates order status based on payment result.
Step 4. Track Transaction Status
Monitor Debin payment 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.
Dashboard 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 Debin payment.
| Code | Status | Description |
|---|---|---|
100 | INPROGRESS | The payin is pending the confirmation. |
825 | REJECTED | System error to generate payin. |
Note: For complete status code reference, see the Transaction Status Documentation.
Testing Your Integration
Sandbox Environment
Use the staging environment for testing:
https://api.stage.localpayment.com/api/payin/
Test Debin Scenarios
Verify your integration handles these scenarios:
- Successful Authorization: Complete Debin authorization flow.
- Authorization Expiration: Handle expired authorization requests.
- Status Updates: Webhook handling and status polling.
Next Steps
After implementing Debin payments, consider these additional capabilities:
Updated 3 days ago
