QR (Argentina)

Localpayment enables merchants to process instant payments through Argentina's standardized QR payment system. This guide outlines the process for initiating QR-based payments through Localpayment's API, detailing required parameters, handling responses, and interpreting status codes for seamless integration with Argentina's interoperable payment network.

Before You Begin

Ensure you have:


Step 1. Create QR Payment

To generate a QR code for payment collection, send a POST request to the Create Payin endpoint with QR-specific parameters.

Key Request Parameters

The request requires several key objects specific to QR payments:

ObjectDescriptionRequired
paymentMethod.typeMust be BankTransfer
senderSender information for compliance
merchantMerchant/business details
paymentMethodPayment method configuration
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": "1050",
    "flow": "REDIRECT"
  },
  "currency": "ARS",
  "merchant": {
    "type": "COMPANY",
    "name": "Company"
  },
  "payer": {
    "type": "INDIVIDUAL",
    "document": {
      "type": "CUIL",
      "id": "20961504870"
    },
    "bank": {
      "account": {
        "type": "C",
        "number": "0070055930004044931234"
      },
      "name": "Galicia",
      "code": "007"
    },
    "name": "John",
    "lastName": "Doe",
    "email": "[email protected]"
  },
  "externalId": "c8b89840-5d11-4e87-a0dc-86ad2d050492",
  "country": "ARG",
  "amount": 800,
  "accountNumber": "{{yourAccountNumber}}",
  "conceptCode": "0038",
  "comment": "",
  "transactionType": "PayIn",
  "clientCode": "clientCode",
  "requireAuth": false,
  "file": false
}
'

Step 2. Handle the Response

Successful Response

A successful QR payment creation includes the QR code data and payment details:

{
  "transactionType": "PayIn",
  "externalId": "4b242857-6c21-4d09-8a23-f868105f3f4a",
  "internalId": "cde8e3f5-0056-49e4-916e-61402c36a8f9",
  "paymentMethod": {
    "type": "BankTransfer",
    "code": "1050",
    "flow": "REDIRECT"
  },
  "country": "ARG",
  "currency": "ARS",
  "amount": 800,
  "accountNumber": "{{yourAccountNumber}}",
  "confirmed": {
    "currency": "ARS",
    "amount": 10,
    "fxQuote": 1
  },
  "payment": {
    "currency": "ARS",
    "fxQuote": 1,
    "financingFee": 0,
    "amount": 10
  },
  "localTaxes": [
    {
      "code": "0001",
      "percentage": 1.25,
      "description": "IDC",
      "currency": "ARS",
      "fxSource": 1,
      "fxQuote": 0,
      "amount": 10,
      "account": "{{YourAccountNumber}}"
    }
  ],
  "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"
  },
  "qr": {
    "code": "00020101021102080000000041370012com.TESTbind98113071613202899020143220018B00000500110ETA0125015001120322678275512600220000531905012067208748520457345802AR5912Localpayment6014CABA - Almagro6108C1006ACT530303262100706S1590981080004A01263047179",
    "expirationDate": "2024-09-30T16:18:50.322266+00:00"
  },
  "merchant": {
    "type": "COMPANY",
    "name": "Company"
  },
  "payer": {
    "bank": {
      "name": "bankName",
      "code": "322",
      "account": {
        "type": "C",
        "number": "3220001805117354710015"
      }
    },
    "type": "INDIVIDUAL",
    "name": "John",
    "lastname": "Doe",
    "document": {
      "type": "CUIL",
      "id": "20963504870"
    },
    "email": "[email protected]"
  },
  "intermediaries": [],
  "date": {
    "creationDate": "2024-09-23T17:38:47.667+00:00",
    "processedDate": "2024-09-23T17:38:50.4244067",
    "expirationDate": "2024-09-30T16:18:50.322266+00:00"
  },
  "errors": []
}

Key Response Fields

ParameterDescriptionUse Case
qr.codeRaw QR code payload in standardized formatRender scannable QR code using any QR generation library.
qr.expirationDateISO timestamp when QR becomes invalidDisplay countdown timer and handle expiration logic.
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.

Error Response

When QR generation 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. Display QR Code and Handle Payment

  1. QR Display: Present QR code to customer through chosen channel.
  2. Bank App Scan: Customer scans QR with their Argentine bank mobile app.
  3. Payment Authorization: Customer confirms payment in their banking environment.
  4. Real-time Confirmation: Localpayment receives instant payment notification.
  5. Status Update: Your system receives webhook with payment confirmation.

Best Practices for QR Display

  • Minimum display size: 250x250 pixels for mobile scanning.
  • Maintain 1:1 aspect ratio without distortion.
  • Ensure high contrast (dark on light background).
  • Add quiet zone (white border) around QR code.
  • Include alt text (e.g. "QR Code Payment").
  • Show Clear Payment Instructions.
  • Handle Time-to-Live (TTL) and Expiration.

Step 4. Track Transaction Status

Monitor QR payment progress through these methods:

Common Status Codes

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

CodeStatusDescription
103APPROVEDThe payin was confirmed but not credited yet.
200CompletedThe payin was completed.
811RejectedRequested amount is higher or lower than allowed max/min values.

📝

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 QR Scenarios

Verify your integration handles these scenarios:

  1. Successful Payment: Complete QR scan and payment flow.
  2. QR Expiration: Handle expired QR codes gracefully.
  3. Multiple Payment Attempts: Same QR scanned multiple times.
  4. Status Updates: Webhook handling and status polling.

Next Steps

After implementing QR payments, consider these additional capabilities: