Cash

Create a cash payment

Create a cash payin

POST https://api.stage.localpayment.com /api/payin

Create a cash payin order

Headers

NameTypeDescription

Authorization*

string

Mandatory. JWT token in format Bearer eyJ0... . For more information about authentication, please refer to Authentication

Request Body

NameTypeDescription

paymentMethod*

OBJECT

Manatory. Payment method details

paymentMethod.type*

string

Mandatory. Cash

paymentMethod.code*

string

Mandatory. Select among the codes available in each country for a payin cash payment type. Each code is also related to the brand and country in which it operates. NOTE: payment method code might affect the collection currency in bimonetary countries. For more info, see the side note on currency field.

paymentMethod.flow*

string

Mandatory. The payment method data could be embeded in the API request (DIRECT)or collected via an aditional form or plugin (REDIRECT). Currently, only DIRECT flow is allowed.

externalId*

string

Mandatory. An ID that is meaningful to you and your system. Must be unique.

country*

string

Mandatory. Your end user's country (i.e. country in which the payment will be processed), in ISO format. Please refer to Country Codes for a full list of supported countries.

amount*

number

Mandatory. Amount to charge to your end user.

currency*

string

Mandatory. The currency in which the amount is expressed. It could be A) the local currency of the selected country or B) the account's currency. If A), the amount will be charged to the customer's cash payment method. If B) and it differs from the local currency, the amount specified will be credited to your account and Localpayment will perform a Foreign Exchange operation to collect the amount expressed in local currency. In bimonetary countries, paymentMethod.code resolves possible ambiguity: the payment will be executed in the currency of that specific payment method network. e.i.: SPID (USD); SPEI (MXN)

accountNumber*

string

Mandatory. Your Localpayment account number in which the amount will be credited.

conceptCode

string

Mandatory. Choose the suitable concept code from our Concept Code List. Based on our experience, the most usual are 0039 (remittances) and 0040 (corporate payments).

comment

string

Optional. A comment related to the transaction. It should be something meaningful to your business.

exchangeRateToken

string

Optional. Token provided by the Foreign Exchange service in order to use an upfront agreed exchange rate.

payer*

OBJECT

Mandatory. Party Object. Information related to the payer.

type*

string

Mandatory. Possible values: COMPANY, INDIVIDUAL

name*

string

Mandatory. COMPANY, INDIVIDUAL name

lastName

string

Mandatory only for INDIVIDUAL type / Ignored for COMPANY,

document*

OBJECT

Mandatory. Party Object. Valid identity document.

document.type*

string

document.id*

string

Mandatory. Identity document id. Usually numbers or combination of numbers and letters.

userReference

string

Optional. Username or Id in your platform.

email

string

Optional.

phone

OBJECT

Optional. Party Object. Contact phone number

phone.countryCode

string

Optional

phone.areaCode

string

Optional

phone.number

string

Optional

birthdate

string

Optional. Individual birthdate / company incorporation date. ISO 8601 format (YYYY-MM-DD)

nationality

string

Optional

address

OBJECT

Optional. Party Object. Contact address

address.street

string

Optional

address.number

string

Optional

address.city

string

Optional

address.state

string

Optional

address.country

string

Optional

address.zipCode

string

Optional. Zip code / Postal code

address.comment

string

Optional. Additional info, such as floor or apartment number.

merchant*

OBJECT

Mandatory. Party Object.

intermediaries

array

Optional. Array of Party objects. It represents others parties in the payment chain because of the end user is not your direct customer. Take into account the array sequence: your client should be the first element, the client of your client should be the second and so on, until there are no more intermediaries.

device

OBJECT

Optional. Party Object.

device.id

string

Optional. Android / iPhone device ID. Can be blank for other device types such as PC / Mac.

device.ip

string

Optional. Device IP address

device.browser

string

Optional. Browser

metaData

OBJECT

Optional. Party Object. Unstructured object to record any metadata meaningful to you.

commercialData

OBJECT

Optional. Party Object. Extra information related to the goods or services traded. See Commercial Party Object below.

invoce

string

Optional. Invoice reference

items.pictureUrl

string

Optional. URL pointing to an item picture

items.description

string

Optional. Item title

item

array

Optional. List of sold items

item.id

string

Optional. Item ID

shipments.number

String

Optional. Number address

shipments.city

string

Optional. City

items.quantity

number

Optional. Item description

items.categoryId

string

Optional. Item category

shipments

array

Optional. List of shipping addresses

items.unitPrice

number

Optional. Unit price

shipments.street

string

Optional. Street address

shipments.zipCode

string

Optional. Zip code

shipments.comment

string

Optional. Additional info

shipments.country

string

Optional. State/Province

shipments.country

string

Optional. Shipping country

item.title

string

Optional. Item title

document

OBJECT

Optional. . Party Object.

lastName

string

Optional only for INDIVIDUAL type / Ignored for COMPANY.

name*

string

Mandatory. COMPANY, INDIVIDUALname

type*

string

Mandatory. Possible values: COMPANY, INDIVIDUAL

birthdate

string

Optional. Individual birthdate / company incorporation date. ISO 8601 format (YYYY-MM-DD).

phone.number

string

Optional.

phone.areaCode

string

Optional.

phone.countryCode

string

Optional.

phone

OBJECT

Optional. Party Object. Contact phone number

email

string

Optional.

userReference

string

Optional. Username or id in your platform.

document.id

string

Optional. Identity document id. Usually numbers or combination of numbers and letters.

document.type

string

Optional. Document type (related to the merchant's residence)

address.state

string

Optional.

address.city

string

Optional.

address.number

String

Optional.

address.street

string

Optional.

address

OBJECT

Optional. Party Object. Contact address

nationality

string

Optional.

address.comment

string

Optional. Additional info, such as floor or apartment number.

address.zipCode

string

Optional. Zip code / Postal code

address.country

string

Optional.

beneficiary

OBJECT

Optional. Party Object.

type

string

Optional. Possible values: COMPANY, INDIVIDUAL

name

string

Optional.INDIVIDUAL/COMPANY name

lastName

string

Optional only for INDIVIDUAL type / Ignored for COMPANY.

document.id

string

Optional. Identity document id. Usually numbers or combination of numbers and letters.

document.type

string

Optional. Document type (related to the beneficiary's residence)

document

OBJECT

Optional. Party Object.

email

string

Optional.

{
    "transactionType": "PayIn",
    "externalId": "1648126185",
    "internalId": "cba93d21-0df3-4694-b219-9d6458c75b9a",
    "paymentMethod": {
        "type": "Cash",
        "code": "1008",
        "flow": "DIRECT"
    },
    "country": "ARG",
    "currency": "ARS",
    "amount": 1000.0,
    "accountNumber": "032.032.00000001",
    "confirmed": {
        "currency": "ARS",
        "fxQuote": 1.0,
        "amount": 1000.0
    },
    "payment": {
        "currency": "ARS",
        "fxQuote": 1.0,
        "financingFee": 0.0,
        "amount": 1000.0
    },
    "localTaxes": [],
    "withHoldings": [],
    "fees": {
        "description": "Fee",
        "currency": "ARS",
        "fxSource": 110.122017,
        "fxQuote": 1.0,
        "amount": 42.0,
        "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": "2022-03-31 12:49:46.298623"
    },
    "merchant": {
        "type": "INDIVIDUAL",
        "name": "Merchant's name",
        "lastname": "Merchant's last name",
        "document": {
            "id": "12345678",
            "type": "DNI"
        },
        "email": "payer@email.com",
        "phone": {
            "countryCode": "54",
            "areaCode": "11",
            "number": "98789632"
        },
        "address": {
            "street": "Street",
            "number": "938",
            "city": "city",
            "state": "state",
            "country": "country",
            "zipCode": "zipCode",
            "comment": "Add any usefull information"
        },
        "birthdate": "2000-01-01",
        "nationality": "Argentinian"
    },
    "payer": {
        "type": "INDIVIDUAL",
        "name": "Payer's name",
        "lastname": "Payer's last name",
        "document": {
            "id": "37993830",
            "type": "DNI"
        },
        "email": "payer@email.com",
        "phone": {
            "countryCode": "1",
            "areaCode": "11",
            "number": "98789632"
        },
        "address": {
            "street": "Street",
            "number": "1234",
            "city": "city",
            "state": "state",
            "country": "country",
            "zipCode": "zipCode",
            "comment": "Add any relevant information related to the payer"
        },
        "birthdate": "01/01/1990",
        "nationality": "Arge"
    },
    "intermediaries": [],
    "date": {
        "creationDate": "2022-03-24T12:49:45.465+00:00",
        "processedDate": "2022-03-24 12:49:46.298623",
        "expirationDate": "2022-03-31 12:49:46.298623"
    },
    "errors": []
}

Please refer to this article to learn more about the document type required for the different payment methods by country.

Examples: Cash payin request

To create a payin cash payment through LP api, the request body examples are detailed below.

A Cash payment order expires by default within 7 days iafter the creation date. However, through the LP API, you could cancel any "INPROGRESS" cash order.

Moreover, the cash payment order expiration date can be set according to our clients requirements between 1 to 7 days.

{
    "paymentMethod":{
        "type":"Cash",
        "code":"1003",
        "flow":"DIRECT"
    },
    "externalId":"test_03",
    "country":"ARG",
    "amount":100.0,
    "currency":"ARS",
    "accountNumber":"032.032.00000001",
    "conceptCode":"0003",
    "merchant":{
        "type":"COMPANY",
        "name":"Merchant's name",
        "lastname":"",
        "document":{
            "type":"",
            "id":""
        },
        "email":""
    },
    "payer":{
        "type":"INDIVIDUAL",
        "name":"Payer's Name",
        "lastname":"Payer's Last Name",
        "document":{
            "id":"99999999",
            "type":"DNI"
        },
        "email":"payer@mail.com"
    }
}

Examples: Cash payin response

{
    "transactionType": "PayIn",
    "externalId": "1111x11X-1111-11X1-111X-XX11X1XXX1XX",
    "internalId": "111bc11f-beb1-111f-11c1-11def11ef111",
    "paymentMethod": {
      "type": "Cash",
      "code": "1010",
      "flow": "DIRECT"
    },
    "country": "XXX",
    "currency": "XXX",
    "amount": 10,
    "accountNumber": "101.101.00000010",
    "confirmed": {
      "currency": "XXX",
      "fxQuote": 1,
      "amount": 10
    },
    "payment": {
      "currency": "XXX",
      "fxQuote": 1,
      "financingFee": 0,
      "amount": 10
    },
    "localTaxes": [],
    "withHoldings": [],
    "fees": {
      "description": "Fee",
      "currency": "XXX",
      "fxSource": 8.772999,
      "fxQuote": 1,
      "amount": 0.45,
      "account": "101.104.00000010"
    },
    "status": {
      "code": "100",
      "description": "INPROGRESS",
      "detail": "The payin is pending the confirmation"
    },
    "ticket": {
      "image": "https://api.v3.localpayment.com/api/images/Code128/7041681327498515",
      "barcode": "1011111011111111",
      "expirationDate": "2023-04-19T19:24:58.464299",
      "paymentInstructions": "<ol><li>Concurrir a alguno de los puntos del Metodo seleccionado.</li><li>Solicita al cajero realizar un pago PayCash. </li><li>Indica en caja la referencia o codigo de barras y monto del pago.</li></ol>"
    },
    "merchant": {
      "type": "COMPANY",
      "name": "HOLA"
    },
    "payer": {
      "type": "INDIVIDUAL",
      "name": "JULIANA",
      "lastname": "MONTOYA",
      "document": {
        "type": "DNI",
        "id": "11011100"
      },
      "email": "JULI@GMAIL.COM"
    },
    "intermediaries": [],
    "date": {
      "creationDate": "2023-04-12T19:24:57.338+00:00",
      "processedDate": "2023-04-12T19:24:58.543610",
      "expirationDate": "2023-04-19T19:24:58.464299"
    }

Note: The response depends on the payment method and the payment provider configured for this metod. For testing purposes in Stage environment, the responses are mockuped so they may include:

How to create a cash paymet ticket?

In most countries, to generate a cash payment ticket, the Payin response data that you must select and add to the ticket are: the "id", the "image", the "barcode" and the "expirationDate". However, take into account that in Peru, you will only need the "ticket id" element. Please, see the examples bellow.

Elements necessary to create a cash payment ticket in almost all countries:

"ticket": {
      "image": "https://api.v3.localpayment.com/api/images/Code128/7041681327498515",
      "barcode": "7041681327498515",
      "expirationDate": "2023-04-19T19:24:58.464299",
      "paymentInstructions": "<ol><li>Concurrir a alguno de los puntos del Metodo seleccionado.</li><li>Solicita al cajero realizar un pago PayCash. </li><li>Indica en caja la referencia o codigo de barras y monto del pago.</li></ol>"
    },

Note: The response depends on the payment method and the payment provider configured for this metod. For testing purposes in Stage environment, the responses are mockuped so they may include:

How to pay a cash payment ticket?

The payment of a cash ticket can be made by reading the "barcode image". Another possibility is to pay the cash ticket by informing the "ticket id". In Peru, the payer will only need to inform the "ticket id".

Check the Payin Status Codes

pagePayin

Last updated