CODI (Mexico)

This payment solution is only available in México

CODI

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

Post a CODI 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

Mandatory. Payment method details

paymentMethod.type*

string

Mandatory. BankTransfer

paymentMethod.code*

string

Mandatory. Select among the codes available in each country for a payin BankTransfer payment type. 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. "BRA": Brazil in ISOCode3 format

amount*

number

Mandatory. Amount to charge to your end user. For MXN, use 2 decimal places separated by a dot.

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

Mandatory. Document types: CPF / CNPJ

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.

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.

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

Optional. Party Object. Payer account data.

bank.name

string

Optional. Bank name.

bank.branch.code

string

Optional. . Brach code.

bank.branch

OBJECT

Mandatory only if Bank Object was added. Branch information. Party Object.

bank.code

string

bank.account

OBJECT

Optional. Party Object. Payer account information.

bank.branch.name

string

Optional. . Branch name.

bank.account.type

string

bank.account.number

string

Optional. 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

{
    "transactionType": "PayIn",
    "externalId": "1652993870",
    "internalId": "7e57a8ed-7fa4-4264-bcf3-a44d3ff2c132",
    "paymentMethod": {
        "type": "BankTransfer",
        "code": "1314",
        "flow": "DIRECT"
    },
    "country": "BRA",
    "currency": "USD",
    "amount": 1000.0,
    "accountNumber": "076.840.00000004",
    "confirmed": {
        "currency": "USD",
        "amount": 1000.0,
        "fxQuote": 1.0,
        "exchangeRateToken": null
    },
    "payment": {
        "installment": null,
        "currency": "BRL",
        "fxQuote": 4.96637604,
        "financingFee": 0.0,
        "amount": 4966.38
    },
    "localTaxes": [],
    "withHoldings": [],
    "fees": {
        "description": "Fee",
        "currency": "USD",
        "fxSource": 1.0,
        "fxQuote": 1.0,
        "amount": 11.0,
        "account": "076.840.00000004"
    },
    "status": {
        "code": "100",
        "description": "INPROGRESS",
        "detail": "The payin is pending the confirmation"
    },
    "ticket": null,
    "qr": {
        "image": "https://api.stage.localpayment.com/api/images/1314/00020126580014br.gov.bcb.pix013627a44d0a-0736-4bbf-a4a4-6e11063973315204000053039865406150.005802BR5911Telequiet496008Campinas62230519mpqrinter12397252666304FA23",
        "code": "00020126580014br.gov.bcb.pix013627a44d0a-0736-4bbf-a4a4-6e11063973315204000053039865406150.005802BR5911Telequiet496008Campinas62230519mpqrinter12397252666304FA23",
        "codeBase64": "iVBORw0KGgoAAAANSUhEUgAABWQAAAVkAQAAAAB79iscAAAI/UlEQVR42u3dW47kNgwFUO3A+9+ld6Agg3nY4pVcnQyCjHz80ejuKstH/iNIka3/QdfZaGlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWl/v7aN13H/37c/f/z4+9b2/bYff367vn/w68/+88u/7mjXL18XODKDlpaWlpaWlpaWlpb2JdrjGrLdv3Z5WPHcFMMCw06vq/Trp1ftgkFLS0tLS0tLS0tLS7u9tqx+U1x/O37+eYv/Upw4hJzTe4dPC56WlpaWlpaWlpaWlval2vKV4x4xnjlOvG534LWAP8rytLS0tLS0tLS0tLS0tDfAWeohr8m+VLbZSmHmNRatiz69NFpaWlpaWlpaWlpa2hdoEz5l6K7POUINZS/pwenBuultX64RpaWlpaWlpaWlpaWl/dO16zX/sx//oqcKLS0tLS0tLS0tLS3tn6xdXyWo7LOjc8Nv6TTcrTfJkCNcXLS0tLS0tLS0tLS0tLtrU13lWfJ3w/G3KzmFobVfSSnlvHWPLI88aGlpaWlpaWlpaWlpX6O9ua9R36q9Y4kOp7x+33MvslTU+UnMS0tLS0tLS0tLS0tLu4t22tlx0m5k2pQ/D1UbDtadoanJpGElLS0tLS0tLS0tLS3tK7Q5/hsCvrZIzl0j0LOcqUvRZglcz4WblpaWlpaWlpaWlpZ2f21as85Jy1WSLe8l/cjb7WWQwENPFVpaWlpaWlpaWlpa2v20Na4b/pfTdJPnlMYjdSpb6k2SlqelpaWlpaWlpaWlpX2JNs2qTu7pYyedIqdNIhfNJJ+rLmlpaWlpaWlpaWlpaXfTpoBvGicucnq1hjKffGuzAQFtHobS0tLS0tLS0tLS0tLurB1Or5X7p/WXfTZZra5Xkoe1CcowQ+ChSwktLS0tLS0tLS0t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zMMAAAAAElFTkSuQmCC",
        "expirationDate": "2022-08-13T12:28:09.695-04:00"
    },
    "beneficiary": null,
    "merchant": {
        "type": "INDIVIDUAL",
        "name": "Merchant's name",
        "lastname": "Merchant's last name",
        "document": {
            "id": "22603427873",
            "type": "CPF"
        },
        "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": "nationality"
    },
    "payer": {
        "type": "INDIVIDUAL",
        "name": "Payer's name",
        "lastname": "Payer's last name",
        "document": {
            "id": "75.518.609/0001-56",
            "type": "CNPJ"
        },
        "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": "nationality"
    },
    "intermediaries": null,
    "wireInstructions": null,
    "date": {
        "creationDate": "2022-05-19T20:57:50.253+00:00",
        "processedDate": "2022-05-19T20:57:50.507088",
        "expirationDate": "2022-05-21T20:57:50.507088"
    },
    "card": null,
    "errors": []
}

Examples: CODI request

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

A CODI Bank Transfer payment order expires by default within 24 hs iafter the creation date. However, the expiration date can be set according to our clients requirements between 1 to 7 days.

{
  "paymentMethod": {
    "type": "BankTransfer",
    "code": "1700",
    "flow": "DIRECT"
  },
  "externalId": "{{$guid}}",
  "country": "MEX",
  "amount": 100,
  "currency": "MXN",
  "accountNumber": "484.484.00000011",
  "conceptCode": "0001",
  "comment": "Payin bank MEX - STP",
  "merchant": {
    "type": "INDIVIDUAL",
    "name": "{{$randomFirstName}} ",
    "lastname": "{{$randomLastName}}",
    "document": {
      "id": "20276209079",
      "type": "CUIT"
    },
    "userReference": "{{$randomUserName}}"
  },
  "payer": {
    "type": "INDIVIDUAL",
    "name": "{{$randomFirstName}}",
    "lastname": "{{$randomLastName}}",
    "document": {
      "id": "LEKF8104019Z5",
      "type": "RFC"
    }
  }
}

CODI QR image

CODI payment order response will return, among others, an OBJECT named "qr". The elements that compose the "qr" object are: "image", code"and "expirationDate".

In order to generate a CODI payment ticket, please, select the "qr.image". Clicking on that item will redirect you to a QR code. That QR has the data related to the previously payment created.

Example: CODI response

This payment solution is only available in México

Check the Payin Status Codes

Payin

Last updated