Mexico

Reference Code Payments in Mexico is used only to process automated mass TEF wires.

If you want to process via SPEI please redirect to Virtual CLABE Accounts

Reference code payments

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

Create a bank transfer payment 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. BankTransfer

paymentMethod.code*

string

Mandatory. Select among the codes available in each country for a Payin limits-Sla 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. It must be unique and alphanumeric, no characters allowed.

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. Individual first name / company name

lastName

string

Mandatory for individuals / Ignored for companies.

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

Mandatory.

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.

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.

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. Unstructured object to record any metadata meaningful to you.

commercialData

OBJECT

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

lastName

string

Mandatory only for INDIVIDUAL type / Ignored for COMPANY.

name*

string

Mandatory. Individual first name / company name

merchant*

OBJECT

Mandatory. Party Object.

type*

string

Mandatory. Possible values: COMPANY, INDIVIDUAL

document.type

string

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

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

OBJECT

Optional. Party Object.

address

OBJECT

Optional. Party Object. Contact address

nationality

string

Optional.

birthdate

string

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

phone.number

string

Optional.

phone.areaCode

string

Optional.

address.comment

string

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

address.city

string

Optional.

address.number

string

Optional.

address.street

string

Optional.

address.zipCode

string

Optional. Zip code / Postal code

address.country

string

Optional.

address.state

string

Optional.

bank*

OBJECT

Mandatory. Party Object. Payer account data.

bank.name*

string

Mandatory. Bank name.

bank.branch.code

string

Branch code. Only Brazil.

bank.branch

OBJECT

Only mandatory for Brazilian bank accounts. Branch information. Party Object.

bank.code*

string

bank.account

OBJECT

Mandatory. Party Object. Payer account information.

bank.branch.name

string

Branch name. Only Brazil.

bank.account.type*

string

bank.account.number*

string

Mandatory. Payer account number

item.id

string

Optional. Item ID

invoice

string

Optional. Invoice reference

item

array

Optional. List of sold items

items.quantity

number

Optional. Item quantity

items.categoryId

string

Optional. Item category

items.pictureUrl

string

Optional. URL pointing to an item picture

items.description

string

Optional. Item description

item.title

string

Optional. Item title

items.unitPrice

number

Optional. Unit price

shipments.city

string

Optional. City

shipments.number

string

Optional. Number address

shipments.street

string

Optional. Street address

shipments

array

Optional. List of shipping addresses

shipments.country

string

Optional. State/Province

shipments.state

string

Optional. State/ProvinceShipping country

shipments.comment

string

Optional. Additional info

shipments.zipCode

string

Optional. Zip code

beneficiary

OBJECT

Optional. Party Object

type

string

Optional. Possible values: COMPANY, INDIVIDUAL

name

string

Optional. Individual / company name

lastName

string

Only for INDIVIDUAL type / Ignored for COMPANY.

document

OBJECT

Optional. Party Object.

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)

email

string

Optional.

{
    "transactionType": "PayIn",
    "externalId": "1652994419",
    "internalId": "7717d940-327f-4e46-acb8-383ad229333a",
    "paymentMethod": {
        "type": "BankTransfer",
        "code": "1313",
        "flow": "DIRECT"
    },
    "country": "BRA",
    "currency": "BRL",
    "amount": 1000.0,
    "accountNumber": "076.986.00000001",
    "confirmed": {
        "currency": "BRL",
        "amount": 1000.0,
        "fxQuote": 1.0,
        "exchangeRateToken": null
    },
    "payment": {
        "installment": null,
        "currency": "BRL",
        "fxQuote": 1.0,
        "financingFee": 0.0,
        "amount": 1000.0
    },
    "localTaxes": [],
    "withHoldings": [],
    "fees": {
        "description": "Fee",
        "currency": "BRL",
        "fxSource": 4.936304,
        "fxQuote": 1.0,
        "amount": 11.0,
        "account": "076.986.00000001"
    },
    "status": {
        "code": "100",
        "description": "INPROGRESS",
        "detail": "The payin is pending the confirmation"
    },
    "ticket": null,
    "qr": null,
    "beneficiary": null,
    "merchant": {
        "type": "INDIVIDUAL",
        "name": "Merchant's name",
        "lastname": "Merchant's last name",
        "document": {
            "id": "",
            "type": ""
        },
        "email": "",
        "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": "nationality"
    },
    "payer": {
        "type": "COMPANY",
        "name": "Payer's name",
        "lastname": "",
        "document": {
            "id": "75.518.609/0001-56",
            "type": "CNPJ"
        },
        "email": "payer@mail.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": "nationality"
    },
    "intermediaries": null,
    "wireInstructions": {
        "bank": {
            "name": "Banco Itaú",
            "code": null,
            "branch": null,
            "account": {
                "type": "Checking",
                "number": "21730-9"
            }
        },
        "beneficiary": {
            "name": "LP DO BRASIL",
            "document": {
                "id": "CNPJ",
                "type": "34669130000133"
            }
        },
        "referenceCode": "1313001012"
    },
    "date": {
        "creationDate": "2022-05-19T21:06:59.651+00:00",
        "processedDate": "2022-05-19T21:06:59.928308",
        "expirationDate": "2022-05-26T21:06:59.928308"
    },
    "card": null,
    "errors": []
}

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

Examples: Bank Transfer payin request

To create a bank transfer payment order through LP api, the request body examples are detailed below.

To review how the Master account flow works please go to this link.

A Bank Transfer payment order expires by default within 7 days iafter the creation date.

However, the expiration date can be set according to our clients requirements between 1 to 7 days.

Branch party object ONLY has to be completed for Brazilian accounts. In other cases, leave the branch party object empty or remove it from the body request.

{
  "paymentMethod": {
    "type": "BankTransfer",
    "code": "1313",
    "flow": "DIRECT"
  },
  "externalId": "test_01",
  "country": "BRA",
  "amount": 1000,
  "currency": "BRL",
  "exchangeRateToken": "76b54005-01a4-4b0c-8cd8-c51d31828b43"
  "accountNumber": "076.986.00000001",
  "conceptCode": "0003",
  "comment": "Add any relevant information related to the transaction",
  "merchant": {
    "type": "INDIVIDUAL",
    "name": "Merchant's name",
    "lastname": "Merchant's last name",
    "document": {
      "type": "",
      "id": ""
    },
    "email": ""
  },
  "payer": {
    "type": "INDIVIDUAL",
    "name": "Payer's name",
    "lastname": "Payer's last name",
    "document": {
      "id": "11.111.111/0001-56",
      "type": "CNPJ"
    },
    "email": "payer@email.com",
    "bank": {
      "name": "Account holder name",
      "code": "341",
      "branch": {
        "code": "1234",
        "name": "ITAU"
      },
      "account": {
        "type": "s",
        "number": "123456"
      }
    }
  }
}

Example: Bank transfer responses

{
  "transactionType": "PayIn",
  "externalId": "1652994419",
  "internalId": "7717d940-327f-4e46-acb8-383ad229333a",
  "paymentMethod": {
    "type": "BankTransfer",
    "code": "1313",
    "flow": "DIRECT"
  },
  "country": "BRA",
  "currency": "BRL",
  "amount": 1000,
  "accountNumber": "076.986.00000001",
  "confirmed": {
    "currency": "BRL",
    "amount": 1000,
    "fxQuote": 1,
    "exchangeRateToken": null
  },
  "payment": {
    "installment": null,
    "currency": "BRL",
    "fxQuote": 1,
    "financingFee": 0,
    "amount": 1000
  },
  "localTaxes": [],
  "withHoldings": [],
  "fees": {
    "description": "Fee",
    "currency": "BRL",
    "fxSource": 4.936304,
    "fxQuote": 1,
    "amount": 11,
    "account": "076.986.00000001"
  },
  "status": {
    "code": "100",
    "description": "INPROGRESS",
    "detail": "The payin is pending the confirmation"
  },
  "ticket": null,
  "qr": null,
  "beneficiary": null,
  "merchant": {
    "type": "INDIVIDUAL",
    "name": "Merchant's name",
    "lastname": "Merchant's last name",
    "document": {
      "id": "",
      "type": ""
    },
    "email": "",
    "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": "nationality"
  },
  "payer": {
    "type": "INDIVIDUAL",
    "name": "Payer's name",
    "lastname": "Payer's last name",
    "document": {
      "id": "11.111.111/0001-56",
      "type": "CNPJ"
    },
    "email": "payer@email.com",
    "bank": {
      "name": "Account holder name",
      "code": "341",
      "branch": {
        "code": "1234",
        "name": "ITAU"
      },
      "account": {
        "type": "s",
        "number": "123456"
      }
    }
  },
  "intermediaries": null,
  "wireInstructions": {
    "beneficiary": {
      "name": "BRASIL",
      "document": {
        "id": "34111130000133",
        "type": "CNPJ"
      },
      "bank": {
        "name": "Banco Itaú",
        "code": null,
        "branch": {
          "code": "1234",
          "name": "ITAU"
        },
        "account": {
          "type": "Checking",
          "number": "11111-9"
        }
      }
    },
    "referenceCode": "1313001012"
  },
  "date": {
    "creationDate": "2022-05-19T21:06:59.651+00:00",
    "processedDate": "2022-05-19T21:06:59.928308",
    "expirationDate": "2022-05-26T21:06:59.928308"
  },
  "card": null,
  "errors": []
}

Check the Payin Status Codes

Payin

Master Account flows

Direct API - Method Type = Bank transfer

Last updated