Make your first test payment

The Localpayment Sandbox is a testing environment designed to replicate the live production environment without affecting real data or transactions. It provides a secure space where you can initiate and monitor your application’s interactions with the Localpayment APIs, ensuring that your integration works seamlessly before going live.

With the sandbox, you can simulate transactions in multiple currencies and countries, test various payment methods (such as cash payments, bank transfers, credit/debit cards, and virtual accounts), and explore advanced scenarios like failed payments, refunds, cancellations, and currency conversions. Localpayment also supports webhooks for real-time notifications, allowing you to simulate events such as successful payments, failures, refunds, and cancellations.

You can generate detailed reports for test transactions to analyze and validate your integration. To streamline your testing process, Localpayment offers a Postman collection and comprehensive API documentation with examples for each payment method and use case.

Prerequisites

Before you begin, ensure you have:

  • Sandbox Credentials: If you haven't already, complete the onboarding process and obtain your test API credentials.
  • Sandbox Environment Access: Use the sandbox environment for testing purposes. The base URL for sandbox is https://api.stage.localpayment.com.
  • Whitelist IPs: Whitelist the IP addresses of the servers that will be making API requests.
  • Webhook: Set up an endpoint to receive payment notifications and set your webhook configuration in the Localpayment Panel.
  • Postman Collection: Download the Localpayment Postman collection to facilitate testing.

Create a card payin

Learn how to create a test payment using a credit or debit card with Localpayment’s API. You’ll start by making a request to the Payins endpoint to simulate a card payment, and then you’ll check the transaction status using the appropriate endpoints.

Additionally, you’ll explore how to configure and use webhooks to receive real-time notifications about the transaction status, to give you a complete understanding of how to manage card payments with Localpayment.

1. Generate an Access Token

To interact with Localpayment’s API, you’ll need to generate an access token for authentication. This token is required for all API requests and ensures secure communication between your application and Localpayment’s servers.

To generate an access token, you'll need to make a POST request to the Generate an Access Token endpoint with your Localpayment username and password included in the request body as a JSON object.

Request example

curl --request POST \
     --url https://api.stage.localpayment.com/api/token/ \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "username": "[email protected]",
  "password": "KD##ow^&Z2zD6^2FL29m"
}
'

Successful response

{
  "refresh": "eyJ0eXAiOiJKV1QiLCJhbGccM5kYO7o4iOiJIU18jaiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTczNTMxOTkyOSwianRpIjoiZWUxMDE3MTUwY2JhNGM1NTg0MjYyZmRkZTdiOThiNGQiLCJ1c2VyX2lkIjoxMDAwLCJzdXBlcnVzZXIiOnRydWUsImlzX3N0YWZmIjp0cnVlLCJybaCIsImV4cCI62xlcyI6WyJBTEwiXSwiY291bnRyaWVzIjpbIkFMTCJdLCJjb21wYW55IjoiQUxMIiwiY2xpZW50X2NvZGUiOiJBNzaW9uTEwiLCJwZXJtaXcyI6W119.6siymomkQ72yMvHGU9sMCO4h-cxpNgQXor",
  "access": "eyJ0eXAiOiJKV1QiLCJhJIUzI1NiJ9.eyJ0b2tlbl90eXBlIbGciOijoiYWNjZXNzIiwiZXhwIjoxNzM1MjMzODI5LCJqdGkiOiJiMDRmNzQ3YWEjOCIsIn4Mjg0YjM0YmMwN2Y4ZjVkOWM0NWFVzZXJfaWQiOjEwMDAsInN1cGVydXNlciI6dHJ1ZSwiaXNfc3RhZmYiOnRy3VudHJpZXMiOljpbIkFsiQUxMIl0sImNvbXBhbnkiOiJBTEwiLCJjbGllbnRfY29kZSI6IkFMTCIsInBlcm1pc3Npb25zIjpdWUsInJvbGVzIMTCJdLlqEnH7GrECJjbbXX0.sWOLKFxCcXQkUcPvTjYceXBp39hDF3-Snc"
}

Use the access token from the response to authenticate your subsequent API requests. Include the accesstoken in the Authorization header prefixed with Bearer.

If your access token expires, you can utilize the Refresh an Access Token endpoint to obtain a new one without re-authenticating.

2. Get Available Payment Methods

Before initiating a payment, it's essential to retrieve the available payment methods for your Localpayment account. This step ensures you can present the appropriate payment options to your customers and process transactions efficiently.

To get the available payment methods, send a GET request to the Get Available Payment Methods endpoint, including your accountNumber as a query parameter.

Request example

curl --request GET \
     --url 'https://api.stage.localpayment.com/api/resources/payment-methods?accountNumber=1234567890' \
     --header 'Authorization: Bearer <your_access_token>' \
     --header 'accept: application/json'

Successful response

[
  {
    "accountCode": "TESTARGUSD01",
    "accountNumber": "123.456.78900001",
    "countryISOCode3": "ARG",
    "moR": null,
    "mid": "0",
    "payinPaymentMethods": [
      {
        "id": 30,
        "code": "1005",
        "name": "Visa",
        "description": "Visa",
        "url": "https://cdn.localpayment.com/logos/visa-debit.png",
        "paymentMethodType": "DebitCard",
        "transactionType": 0,
        "country": {
          "id": 0,
          "code": "032",
          "name": "Argentina",
          "isoCode3": "ARG",
          "localCurrency": {
            "code": "032",
            "name": "Argentine peso",
            "isoCode3": "ARS",
            "decimals": 2,
            "isHard": false
          }
        }
      },
      {
        "id": 24,
        "code": "1023",
        "name": "ITAU",
        "description": "ITAU",
        "url": "https://cdn.localpayment.com/logos/itau.png",
        "paymentMethodType": "BankTransfer",
        "transactionType": 0,
        "country": {
          "id": 0,
          "code": "032",
          "name": "Argentina",
          "isoCode3": "ARG",
          "localCurrency": {
            "code": "032",
            "name": "Argentine peso",
            "isoCode3": "ARS",
            "decimals": 2,
            "isHard": false
          }
        }
      },
      {
        "id": 19,
        "code": "1000",
        "name": "Visa",
        "description": "Visa",
        "url": "https://cdn.localpayment.com/logos/visa.png",
        "paymentMethodType": "CreditCard",
        "transactionType": 0,
        "country": {
          "id": 0,
          "code": "032",
          "name": "Argentina",
          "isoCode3": "ARG",
          "localCurrency": {
            "code": "032",
            "name": "Argentine peso",
            "isoCode3": "ARS",
            "decimals": 2,
            "isHard": false
          }
        }
      },
      {
        "id": 23,
        "code": "1004",
        "name": "Santander",
        "description": "Santander",
        "url": "https://cdn.localpayment.com/logos/santander.png",
        "paymentMethodType": "BankTransfer",
        "transactionType": 0,
        "country": {
          "id": 0,
          "code": "032",
          "name": "Argentina",
          "isoCode3": "ARG",
          "localCurrency": {
            "code": "032",
            "name": "Argentine peso",
            "isoCode3": "ARS",
            "decimals": 2,
            "isHard": false
          }
        }
      },
      {
        "id": 21,
        "code": "1002",
        "name": "Pago facil",
        "description": "Pago Facil",
        "url": "https://cdn.localpayment.com/logos/pagoFacil.png",
        "paymentMethodType": "Cash",
        "transactionType": 0,
        "country": {
          "id": 0,
          "code": "032",
          "name": "Argentina",
          "isoCode3": "ARG",
          "localCurrency": {
            "code": "032",
            "name": "Argentine peso",
            "isoCode3": "ARS",
            "decimals": 2,
            "isHard": false
          }
        }
      }
    ],
    "payoutPaymentMethods": [
      {
        "id": 87,
        "code": "2000",
        "name": "BBVA",
        "description": "Banco Frances",
        "url": null,
        "paymentMethodType": "BankTransfer",
        "transactionType": 0,
        "country": {
          "id": 0,
          "code": "032",
          "name": "Argentina",
          "isoCode3": "ARG",
          "localCurrency": {
            "code": "032",
            "name": "Argentine peso",
            "isoCode3": "ARS",
            "decimals": 2,
            "isHard": false
          }
        }
      }
    ]
  }
]

To proceed with creating a card payin, you'll need the code of a payment method where paymentMethodType is CreditCard (e.g. 1000 for Visa payments in Argentina).

3. Create a Card Payment

Once you’ve retrieved the available payment methods and identified the code for credit card payments, you can proceed to create a card payment.

Request example

To create a credit card payment, send a POST request to the Create Payin endpoint, including your access token in the Authorization header.

curl --request POST \
  --url https://api.stage.localpayment.com/api/payin/ \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_access_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "paymentMethod": {
    "type": "CreditCard",
    "code": "1000",
    "flow": "DIRECT"
  },
  "externalId": "40bac59a-0381-4cc0-a6a5-33418d84c2e4",
  "country": "ARG",
  "currency": "ARS",
  "amount": 1000,
  "accountNumber": "032.032.00000000",
  "conceptCode": "0001",
  "merchant": {
    "type": "COMPANY",
    "name": "Company",
    "document": {
      "type": "CUIT",
      "id": "3000091105",
    },
    "email": "[email protected]",
    "phone": {
      "countryCode": "54",
      "areaCode": "351",
      "number": "1234567"
    }
  },
  "payer": {
    "type": "INDIVIDUAL",
    "name": "John",
    "lastname": "Doe",
    "document": {
      "type": "DNI",
      "id": "37993123"
    },
    "email": "[email protected]",
    "phone": {
      "countryCode": "1",
      "areaCode": "11",
      "number": "98189123"
    },
    "bank": {
      "name": "BANCO BBVA ARGENTINA S.A.",
      "code": "017",
      "account": {
        "type": "S",
        "number": "19101196551119123456789"
      }
    }
  },
  "commercialData": {
    "items": [
      "id": "12345",
      "quantity": "1",
      "description": "Test product",
      "title": "Test",
      "unitPrice": "1000"
    ]
  },
  "card": {
    "name": "John Doe",
    "number": "4000000000000002",
    "cvv": "123",
    "expirationMonth": "12",
    "expirationYear": "2029"
  }
}'

Parameters

The following parameters are required in the request body:

  • paymentMethod: Object with payment method information.
  • paymentMethod.type: Payment method type (e.g. CreditCard).
  • paymentMethod.code: Payment method code (e.g. 1000).
  • paymentMethod.flow: Set as DIRECT.
  • externalId: A unique identifier generated by your system to track the transaction (alphanumeric and hyphens). We recommend using UUID4 to ensure uniqueness (e.g. 40bac59a-0381-4cc0-a6a5-33418d84c2e4).
  • country: Set the country from which the operation is made. ISO 3166-1 alpha-3 (e.g. ARG).
  • currency: The currency of the amount can be the local currency (charged directly) or the account's currency (triggering a Foreign Exchange operation), with paymentMethod.code resolving ambiguity in bicurrency countries. E.g. ARS.
  • amount: Transaction amount (e.g. 1000).
  • accountNumber: The LocalPayment account number where the specified amount will be credited.
  • conceptCode: Operation concept code (e.g. 0001 for Corporate Payments).
  • merchant: Information about the merchant initiating the transaction.
  • merchant.type: Merchant type (e.g. COMPANY).
  • merchant.name: Merchant name.
  • merchant.document: Merchant documentation information.
  • merchant.document.type: The type of identity document, such as a National Identity Number, Social Security Number, or Driver's License, depending on the country of issuance.
  • merchant.document.id: Identity document number (usually a number). This must be a valid number according to the rules for the specific document type.
  • merchant.email: Merchant email.
  • merchant.phone: Object with merchant phone number information.
  • merchant.phone.countryCode: International country code (e.g. 54).
  • merchant.phone.areaCode: Area code (e.g. 351).
  • merchant.phone.number: Phone number (e.g. 1234567).
  • payer: Object with information about the payer making the transaction.
  • payer.type: Payer type (e.g. INDIVIDUAL).
  • payer.name: Payer name.
  • payer.lastname: Payer last name.
  • payer.document: Payer documentation information.
  • payer.document.type: The type of identity document, such as a National Identity Number, Social Security Number, or Driver's License, depending on the country of issuance.
  • payer.document.id: Identity document number (usually a number). This must be a valid number according to the rules for the specific document type.
  • payer.email: Payer email.
  • payer.phone: Payer phone number.
  • payer.phone.countryCode: International country code.
  • payer.phone.areaCode: Area code.
  • payer.phone.number: Phone number.
  • payer.bank: Payer's banking information.
  • payer.bank.name: Bank name.
  • payer.bank.code: Bank code.
  • payer.bank.account: Bank account information.
  • payer.bank.account.type: Payer account type (e.g. S for Saving account).
  • payer.bank.account.number: Payer account number.
  • commercialData: Object with commercial details about the transaction.
  • commercialData.items: Array of items included in the transaction.
  • commercialData.items.id: A unique identifier for the item.
  • commercialData.items.quantity: The quantity of this item purchased.
  • commercialData.items.description: A description of the item.
  • commercialData.items.title: The title or name of the item.
  • commercialData.items.unitPrice: The price per unit of the item.
  • card: Object with card payment information.
  • card.name: Cardholder name.
  • card.number: Card number (PAN).
  • card.cvv: Card Verification Value.
  • card.expirationMonth: Card expiration month. Format MM.
  • card.expirationYear: Card expiration year. Format YYYY.

Successful response

{
  "transactionType": "PayIn",
  "externalId": "40bac59a-0381-4cc0-a6a5-33418d84c2e4",
  "internalId": "22b29c98-92af-44bd-a164-1863ae2f1bb3",
  "paymentMethod": {
    "type": "CreditCard",
    "code": "1000",
    "flow": "DIRECT"
  },
  "country": "ARG",
  "currency": "ARS",
  "amount": 1000,
  "accountNumber": "032.032.00000000",
  "confirmed": {
    "currency": "ARS",
    "amount": 1000,
    "fxQuote": 1,
    "exchangeRateToken": null
  },
  "payment": {
    "installment": null,
    "currency": "ARS",
    "fxQuote": 1,
    "financingFee": 0,
    "amount": 1000
  },
  "localTaxes": [],
  "withHoldings": [],
  "fees": {
    "description": "Fee",
    "currency": "ARS",
    "fxSource": 210.8,
    "fxQuote": 1,
    "amount": 13.02,
    "account": "032.032.00000001"
  },
  "status": {
    "code": "103",
    "description": "APPROVED",
    "detail": "The payin was confirmed but not credited yet"
  },
  "ticket": null,
  "qr": null,
  "beneficiary": null,
  "merchant": {
    "type": "COMPANY",
    "name": "Company"
  },
  "payer": {
    "type": "INDIVIDUAL",
    "name": "John",
    "lastname": "Doe",
    "document": {
      "id": "37895247",
      "type": "DNI"
    },
    "email": "[email protected]",
    "phone": {
      "countryCode": "1",
      "areaCode": "11",
      "number": "98789632"
    },
    "address": null,
    "birthdate": null,
    "nationality": null
  },
  "intermediaries": [],
  "wireInstructions": null,
  "date": {
    "creationDate": "2024-05-19T19:02:44.018+00:00",
    "processedDate": "2024-05-19T19:02:44.799618",
    "expirationDate": "0001-01-01T00:00:00"
  },
  "card": {
    "bin": "402670",
    "brand": "VISA",
    "country": "RS",
    "name": "John Doe",
    "last4": "3263",
    "expirationYear": 2029,
    "expirationMonth": 9
  },
  "errors": []
}

Key fields in the response

  • transactionType: Indicates the type of transaction (PayIn for payments).
  • externalId: A unique identifier for the transaction in your system. It will be used to perform other operations such as obtaining transaction information or making a refund.
  • internalId: A unique identifier for the transaction in Localpayment’s system.
  • paymentMethod: Details about the payment method used.
  • status: Object with information about the status of the transaction.
  • status.code: The status code (e.g., 103 for approved, 100 for pending, 701 for failed).
  • date: Timestamps for when the transaction was created and processed.

Identifying a successful transaction

To determine if the transaction was successful, check the status.code field in the response. A code of 103 indicates that the payment was approved. Other codes, such as 100 (pending) or 701 (failed), indicate different states that may require further action.

Review the complete list of statuses for a transaction.

4. Receiving Webhooks

Webhooks allow you to receive real-time notifications about the status of your transactions. When a payment is processed, Localpayment sends a POST request to your configured webhook URL with detailed information about the transaction.

ℹ️

Note

The webhook payload is the same for the response when creating a successful payin.

Webhook configuration

To receive webhooks, you need to configure your webhook URL in the Localpayment Panel. Ensure that your endpoint is secure (HTTPS) and can handle POST requests with JSON payloads.

Webhook payload example (Successful PayIn)

{
  "transactionType": "PayIn",
  "externalId": "40bac59a-0381-4cc0-a6a5-33418d84c2e4",
  "internalId": "22b29c98-92af-44bd-a164-1863ae2f1bb3",
  "paymentMethod": {
    "type": "CreditCard",
    "code": "1000",
    "flow": "DIRECT"
  },
  "country": "ARG",
  "currency": "ARS",
  "amount": 1000,
  "accountNumber": "032.032.00000000",
  "confirmed": {
    "currency": "ARS",
    "amount": 1000,
    "fxQuote": 1,
    "exchangeRateToken": null
  },
  "payment": {
    "installment": null,
    "currency": "ARS",
    "fxQuote": 1,
    "financingFee": 0,
    "amount": 1000
  },
  "localTaxes": [],
  "withHoldings": [],
  "fees": {
    "description": "Fee",
    "currency": "ARS",
    "fxSource": 210.8,
    "fxQuote": 1,
    "amount": 13.02,
    "account": "032.032.00000001"
  },
  "status": {
    "code": "103",
    "description": "APPROVED",
    "detail": "The payin was confirmed but not credited yet"
  },
  "ticket": null,
  "qr": null,
  "beneficiary": null,
  "merchant": {
    "type": "COMPANY",
    "name": "Company"
  },
  "payer": {
    "type": "INDIVIDUAL",
    "name": "John",
    "lastname": "Doe",
    "document": {
      "id": "37895247",
      "type": "DNI"
    },
    "email": "[email protected]",
    "phone": {
      "countryCode": "1",
      "areaCode": "11",
      "number": "98789632"
    },
    "address": null,
    "birthdate": null,
    "nationality": null
  },
  "intermediaries": [],
  "wireInstructions": null,
  "date": {
    "creationDate": "2024-05-19T19:02:44.018+00:00",
    "processedDate": "2024-05-19T19:02:44.799618",
    "expirationDate": "0001-01-01T00:00:00"
  },
  "card": {
    "bin": "402670",
    "brand": "VISA",
    "country": "RS",
    "name": "John Doe",
    "last4": "3263",
    "expirationYear": 2029,
    "expirationMonth": 9
  },
  "errors": []
}

See full information about webhooks.

5. Check Transaction Status

After creating a payment, you may need to check its status to confirm whether it was successful, pending, or failed. Localpayment provides an endpoint to retrieve the status and details of a specific transaction.

Send a GET request to the Get Transaction Status endpoint, replacing {externalId} with your unique transaction identifier to obtain the transaction status.

Request example

curl --request GET \
     --url https://api.stage.localpayment.com/api/transactions/{externalId}/status \
     --header 'Authorization: Bearer <your_access_token>' \
     --header 'accept: application/json'

Successful response

{
  "internalId": "22b29c98-92af-44bd-a164-1863ae2f1bb3",
  "externalId": "40bac59a-0381-4cc0-a6a5-33418d84c2e4",
  "status": {
    "code": "200",
    "description": "COMPLETED",
    "detail": "The payin was credited"
  }
}

Testing with different payment methods

Localpayment supports a variety of payment methods, including bank transfers, and cash payments, in addition to credit and debit cards. Each payment method follows a similar structure to card payments, but with specific parameters tailored to the method.

Below, you’ll find examples for each payment method, including the required fields and how to interpret the responses. Explore these options to ensure your integration works seamlessly across all supported payment types.

Bank Transfer

Bank transfer payments allow users to pay directly from their bank accounts. The process is similar to card payments, but with a few key differences in the request structure.

Request example

curl --request POST \
     --url https://api.stage.localpayment.com/api/payin/ \
     --header 'accept: application/json' \
     --header 'Authorization: Bearer <your_access_token>' \
     --header 'content-type: application/json' \
     --data '
{
  "paymentMethod": {
    "type": "BankTransfer",
    "code": "1040",
    "flow": "DIRECT"
  },
  "currency": "ARS",
  "merchant": {
    "type": "COMPANY",
    "name": "Company",
    "document": {
      "type": "CUIT",
      "id": "3000091105",
    },
    "email": "[email protected]",
    "phone": {
      "countryCode": "54",
      "areaCode": "351",
      "number": "1234567"
    }
  },
  "payer": {
    "type": "INDIVIDUAL",
    "name": "John",
    "lastname": "Doe",
    "document": {
      "type": "DNI",
      "id": "37993123"
    },
    "email": "[email protected]",
    "phone": {
      "countryCode": "1",
      "areaCode": "11",
      "number": "98189123"
    },
    "bank": {
      "name": "BANCO BBVA ARGENTINA S.A.",
      "code": "017",
      "account": {
        "type": "S",
        "number": "19101196551119123456789"
      }
    }
  },
  "externalId": "0fcd5d00-a734-46d9-95d7-246126989132",
  "country": "ARG",
  "amount": 1000,
  "accountNumber": "032.032.00000000",
  "conceptCode": "0001"
}
'

Key differences in the request

  • Payment method type: Set the paymentMethodType to BankTransfer.
  • Payment Method Code: Use the code for bank transfers (e.g., 1040 for Debin in Argentina).
  • Bank Account Details: Include the payer’s bank account information instead of card details.

Successful response

{
  "transactionType": "PayIn",
  "externalId": "0fcd5d00-a734-46d9-95d7-246126989132",
  "internalId": "d05dab30-485f-473d-844c-041ed5355fc4",
  "paymentMethod": {
    "type": "BankTransfer",
    "code": "1040",
    "flow": "DIRECT"
  },
  "country": "ARG",
  "currency": "ARS",
  "amount": 1000,
  "accountNumber": "032.032.00000000",
  "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": "032.032.00000000"
  },
  "status": {
    "code": "100",
    "description": "INPROGRESS",
    "detail": "The payin is pending the confirmation"
  },
  "merchant": {
    "type": "COMPANY",
    "name": "Company",
    "document": {
      "type": "CUIT",
      "id": "3000091105",
    },
    "email": "[email protected]",
    "phone": {
      "countryCode": "54",
      "areaCode": "351",
      "number": "1234567"
    }
  },
  "payer": {
    "type": "INDIVIDUAL",
    "name": "John",
    "lastname": "Doe",
    "document": {
      "type": "DNI",
      "id": "37993123"
    },
    "email": "[email protected]",
    "phone": {
      "countryCode": "1",
      "areaCode": "11",
      "number": "98189123"
    },
    "bank": {
      "name": "BANCO BBVA ARGENTINA S.A.",
      "code": "017",
      "account": {
        "type": "S",
        "number": "19101196551119123456789"
      }
    }
  },
  "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 differences in the response

  • Payment Method Type: The paymentMethod.type will be BankTransfer.
  • redirectUrl: A URL will be returned where the payment process must be completed.

Cash Payments

Cash payments provide a convenient option for customers who prefer to pay in person. To process a cash payment, you'll need to generate a payment reference or barcode that the customer can use to make the payment at a supported cash payment location.

Request example

curl --request POST \
  --url https://api.stage.localpayment.com/api/payin/ \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <your_access_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "paymentMethod": {
    "type": "Cash",
    "code": "1003",
    "flow": "DIRECT"
  },
  "externalId": "a5e017c6-0503-4e65-8911-db30f116c8e5",
  "country": "ARG",
  "amount": 1000,
  "currency": "ARS",
  "accountNumber": "032.032.00000001",
  "merchant": {
    "type": "COMPANY",
    "name": "Company",
    "document": {
      "type": "CUIT",
      "id": "3000091105",
    },
    "email": "[email protected]",
    "phone": {
      "countryCode": "54",
      "areaCode": "351",
      "number": "1234567"
    }
  },
  "payer": {
    "type": "INDIVIDUAL",
    "name": "John",
    "lastname": "Doe",
    "document": {
      "type": "DNI",
      "id": "37993123"
    },
    "email": "[email protected]",
    "phone": {
      "countryCode": "1",
      "areaCode": "11",
      "number": "98189123"
    }
  }
}'

Key differences in the request

  • Payment method type: Set the paymentMethodType to Cash.
  • Payment Method Code: Use the code for bank transfers (e.g., 1003).
  • No Payer Bank Details: Cash payments do not require bank or card details.

Successful response

{
  "transactionType": "PayIn",
  "externalId": "a5e017c6-0503-4e65-8911-db30f116c8e5",
  "internalId": "cba93d11-0df3-4694-b219-9d6458c75b9a",
  "paymentMethod": {
    "type": "Cash",
    "code": "1003",
    "flow": "DIRECT"
  },
  "country": "ARG",
  "currency": "ARS",
  "amount": 1000,
  "accountNumber": "032.032.00000001",
  "confirmed": {
    "currency": "ARS",
    "fxQuote": 1,
    "amount": 1000
  },
  "payment": {
    "currency": "ARS",
    "fxQuote": 1,
    "financingFee": 0,
    "amount": 1000
  },
  "localTaxes": [],
  "withHoldings": [],
  "fees": {
    "description": "Fee",
    "currency": "ARS",
    "fxSource": 110.122017,
    "fxQuote": 1,
    "amount": 42,
    "account": "032.032.00000001"
  },
  "status": {
    "code": "100",
    "description": "INPROGRESS",
    "detail": "The payin is pending the confirmation"
  },
  "ticket": {
    "id": "1111111111",
    "image": "https://api.stage.localpayment.com/api/images/1003/6002203236005007849112630060030590730000050007",
    "barcode": "3335008800000000006001885552100005200211740749",
    "expirationDate": "2024-03-31 12:49:46.298623"
  },
  "merchant": {
    "type": "COMPANY",
    "name": "Company",
    "document": {
      "type": "CUIT",
      "id": "3000091105",
    },
    "email": "[email protected]",
    "phone": {
      "countryCode": "54",
      "areaCode": "351",
      "number": "1234567"
    }
  },
  "payer": {
    "type": "INDIVIDUAL",
    "name": "John",
    "lastname": "Doe",
    "document": {
      "type": "DNI",
      "id": "37993123"
    },
    "email": "[email protected]",
    "phone": {
      "countryCode": "1",
      "areaCode": "11",
      "number": "98189123"
    }
  },
  "intermediaries": [],
  "date": {
    "creationDate": "2024-03-24T12:49:45.465+00:00",
    "processedDate": "2024-03-24 12:49:46.298623",
    "expirationDate": "2024-03-31 12:49:46.298623"
  },
  "errors": []
}

Key differences in the response

  • Payment Method Type: The paymentMethod.type will be Cash.
  • Ticket object: The ticket object is returned for cash payments, containing the payment reference or barcode that the customer needs to use.