CODI (Mexico)
This payment solution is only available in México
Last updated
This payment solution is only available in México
Last updated
POST
https://api.stage.localpayment.com /api/payin
Post a CODI order
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
{
"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/Trp1ftgkFLS0tLS0tLS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hrKX6u0WZ3mcf3K8KCS9qOlpaWlpaWlpaWlpd1bO9w/5S0ScekRtZ4zHbsrJZ/9umdaWlpaWlpaWlpaWtqXaPvy9FpfNB6Z1mRO03nlLdXzc8uqS1paWlpaWlpaWlpa2v201xtSR5JUelnbjaTKyfxGjjA04OkkHS0tLS0tLS0tLS0t7Qu0bTGN+vqVyZm1YX9PAWQvg7K/FkXS0tLS0tLS0tLS0tJupE3X9DTcFLXoXDJsfN2csrUWajdpaWlpaWlpaWlpaWl31pYoroaNQ4SXdpXwOe3XS4OS1LTkOealpaWlpaWlpaWlpaXdR/uYzptm3p46/admkq3FFikfR5G0tLS0tLS0tLS0tLRbanPCLtVaplRgC5WTdZTadCpbDmEPWlpaWlpaWlpaWlraV2trG/+SjauPWESWRxm3Pc0MPmf3aGlpaWlpaWlpaWlpX6CtJ9oWg617Sc6V2PEs89nyGO0eJwfQ0tLS0tLS0tLS0tJury2o4RF1FPZASZnBReP/YeXbq3qOImlpaWlpaWlpaWlpaTfT1sLHFPXlELHlw2yLrQ1v6bzvoC5KS0tLS0tLS0tLS0u7u/b/f9HS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS/jbtX2Pf+2+J1zMMAAAAAElFTkSuQmCC",
"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": []
}
{
"errors": {
"merchant.document.type": [
"After parsing a value an unexpected character was encountered: \". Path 'merchant.document.type', line 20, position 12."
],
"merchant.document.type.document": [
"After parsing a value an unexpected character was encountered: \". Path 'merchant.document.type', line 20, position 12."
],
"merchant.document.type.merchant": [
"After parsing a value an unexpected character was encountered: \". Path 'merchant.document.type', line 20, position 12."
]
},
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-dd67fb049d96294ca19dca3819cfd190-88bec66e822ff245-00"
}
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"
}
}
}
{
"paymentMethod": {
"type": "BankTransfer",
"code": "1700",
"flow": "DIRECT"
},
"externalId": "32caa79a-b6cf-4b56-a39e-7cb7d2b54b32",
"country": "MEX",
"amount": 100,
"currency": "MXN",
"accountNumber": "484.484.00000011",
"conceptCode": "0001",
"comment": "Payin bank MEX - STP",
"merchant": {
"type": "INDIVIDUAL",
"name": "Kristofer ",
"lastname": "Wiza",
"document": {
"id": "20276209079",
"type": "CUIT"
},
"userReference": "Gilberto.Feil15"
},
"payer": {
"type": "INDIVIDUAL",
"name": "Keegan",
"lastname": "Renner",
"document": {
"id": "LEKF8104019Z5",
"type": "RFC"
}
}
}
{
"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}}",
"email": "{{$randomEmail}}",
"phone": {
"countryCode": "54",
"areaCode": "11",
"number": "98789632"
},
"birthdate": "2000-01-01",
"nationality": "Argentinian",
"address": {
"street": "Vuelta de Obligado",
"number": "2850",
"city": "Rio",
"state": "RJ",
"country": "BRA",
"zipCode": "27000000",
"comment": ""
}
},
"payer": {
"type": "INDIVIDUAL",
"name": "{{$randomFirstName}}",
"lastname": "{{$randomLastName}}",
"document": {
"id": "LEKF8104019Z5",
"type": "RFC"
},
"email": "{{$randomEmail}}",
"phone": {
"countryCode": "54",
"areaCode": "351",
"number": "2102892"
},
"birthdate": "17/09/1958",
"nationality": "Argentina",
"address": {
"street": "Vuelta de Obligado",
"number": "2850",
"city": "Ciudad de Mexico",
"state": "DF",
"country": "MEX",
"zipCode": "27000000",
"comment": ""
},
"bank": {
"name": "BankAccount",
"code": "646",
"account": {
"type": "C",
"number": "646010319800000031"
}
},
"userReference": "{{$randomUserName}}"
},
"transactionType": "PayIn",
"clientCode": "{{currency_client_code}}"
},
"intermediaries": [],
"commercialData": {
"invoice": "",
"items": [
{
"id": "",
"title": "",
"description": "",
"pictureUrl": "",
"categoryId": "",
"quantity": "",
"unitPrice": ""
}
],
"shipments": [
{
"street": "",
"number": "",
"city": "",
"state": "",
"contry": "",
"zipCode": "",
"comment": ""
}
]
}
},
"device": {
"deviceId": "",
"ip": "",
"browser": ""
},
"metaData": {}
}
}
}
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.
{
"transactionType": "PayIn",
"externalId": "d76456ba-5a68-473e-ac88-96f9067dca90",
"internalId": "570a33cd-a4b8-4fb8-b3ee-d23e648c47cf",
"paymentMethod": {
"type": "BankTransfer",
"code": "1700",
"flow": "DIRECT"
},
"country": "MEX",
"currency": "MXN",
"amount": 100.0,
"accountNumber": "484.484.00000011",
"confirmed": {
"currency": "MXN",
"amount": 100.0,
"fxQuote": 1.0
},
"payment": {
"currency": "MXN",
"fxQuote": 1.0,
"financingFee": 0.0,
"amount": 100.0
},
"localTaxes": [],
"withHoldings": [],
"fees": {
"description": "Fee",
"currency": "MXN",
"fxSource": 17.095697,
"fxQuote": 1.0,
"amount": 1.5,
"account": "484.484.00000011"
},
"status": {
"code": "100",
"description": "INPROGRESS",
"detail": "The payin is pending the confirmation"
},
"qr": {
"image": "https://web-checkout.stage.localpayment.com/api/og?internalId=570a33cd-a4b8-4fb8-b3ee-d23e648c47cf",
"code": "{\"TYP\":20,\"v\":{\"DEV\":\"00000161803561219721/2\"},\"ic\":{\"IDC\":\"30416eb753\",\"SER\":88214934,\"ENC\":\"IEgzdIvvDu/uregux7FMxD/xdmR9OxfROPugkV1V1xi55O9OlRC7ssZFVeTTXkhrcjGqtj76z8JxajriLik9+ozDadCQBPRm9G5dQtxpmHm47Hzg2kEBBgWAdIEpt7SSrU1RHYr+UUv++uv07mOrtoy0kVfv2MT2vYNvxHoWWNBEZd2lHR5w0iQpu1NQOfTXVNyX7Rb83EgvjVh+ydj3QlXWLiizpbPto0aDgUim8cVT47ySmMKGmBJC4MmKLJ8bf0RdqMCazuzzRV7ByMIKxfBeKNqeV5CMezpanYiO9KURo5u1b1Pvb0ZCzCVaAdgfSEkUb8+Mlz+JI7g59lLAg0cYC0pl9ZrtWN1H/gyBOCI=\"},\"CRY\":\"UyfKyF8JM3L4EUHevl2itJMJxMJwe2OdjFb3P1eKd1I=\"}",
"expirationDate": "2024-02-02T19:53:46.2179168"
},
"merchant": {
"type": "INDIVIDUAL",
"name": "Aracely ",
"lastname": "Breitenberg",
"document": {
"type": "CUIT",
"id": "20276209079"
},
"email": "Abel54@gmail.com",
"phone": {
"countryCode": "54",
"areaCode": "11",
"number": "98789632"
},
"address": {
"street": "Vuelta de Obligado",
"number": "2850",
"city": "Rio",
"state": "RJ",
"country": "BRA",
"zipCode": "27000000",
"comment": ""
},
"birthdate": "2000-01-01",
"nationality": "Argentinian",
"userReference": "Collin.Fisher"
},
"payer": {
"bank": {
"name": "BankAccount",
"code": "646",
"account": {
"type": "C",
"number": "646010319800000031"
}
},
"type": "INDIVIDUAL",
"name": "Emil",
"lastname": "Nitzsche",
"document": {
"type": "RFC",
"id": "LEKF8104019Z5"
},
"email": "Charlene61@yahoo.com",
"phone": {
"countryCode": "54",
"areaCode": "351",
"number": "2102892"
},
"address": {
"street": "Vuelta de Obligado",
"number": "2850",
"city": "Ciudad de Mexico",
"state": "DF",
"country": "MEX",
"zipCode": "27000000",
"comment": ""
},
"birthdate": "17/09/1958",
"nationality": "Argentina",
"userReference": "Dejuan61"
},
"intermediaries": [],
"date": {
"creationDate": "2024-02-01T19:53:45.977+00:00",
"processedDate": "2024-02-01T19:53:46.6065502",
"expirationDate": "2024-02-02T19:53:46.2179168"
},
"errors": []
}
This payment solution is only available in México