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:


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:

ObjectDescriptionRequired
paymentMethod.typeMust be BankTransfer.
paymentMethod.codeMust be 1040 for Debin.
payerPayer bank account information.
merchantMerchant/business details
amountTransaction amount
currencyTransaction currency code
countryMust 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

ParameterDescriptionUse Case
redirectUrlURL to redirect payer for authorization.Direct customer to complete Debin authorization process.
externalIdYour original reference number.Internal reconciliation and order matching.
status.codeCurrent transaction state (100 = INPROGRESS)Determine next steps in payment flow.
date.creationDateWhen transaction was created.Analytics and performance tracking.
date.expirationDateISO 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

  1. Payment Initiation: Your application sends DEBIN request to Localpayment API.

  2. Banking Network Processing: Localpayment routes payment through Argentine banking system.

  3. Customer Notification: Customer receives real-time alert in their banking app.

  4. Payment Authorization: Customer approves payment directly in banking interface.

  5. Confirmation & Webhooks: Localpayment sends instant webhook with final payment status.

  6. Order Fulfillment: Your application updates order status based on payment result.


Step 4. Track Transaction Status

Monitor Debin payment progress through these methods:

Common Status Codes

The Localpayment API provides various status codes to indicate the progress and outcome of the Debin payment.

CodeStatusDescription
100INPROGRESSThe payin is pending the confirmation.
825REJECTEDSystem 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:

  1. Successful Authorization: Complete Debin authorization flow.
  2. Authorization Expiration: Handle expired authorization requests.
  3. Status Updates: Webhook handling and status polling.

Next Steps

After implementing Debin payments, consider these additional capabilities: