Obtain CEP + PDF

Intro

This API lets you obtain the CEP (Comprobante Electrónico de Pago) for informational purposes to guarantee a payment has been done. The difference against the Obtain CEP service is that this endpoint gets you the PDF file corresponding to the CEP.

Important points

Required parameters

All the parameters in the example of the body request are required.

tipoCriterio
The type of the request, the possible values are:

  • T, for tracking key (Clave de rastreo).
  • R, for reference number (Referencia numérica).

fecha
Indicate the date on which the transaction was made in dd-MM-yyyy format.

criterio
In this field you must report the value for the "Tracking key" or the "Reference number".

  • Reference number: It is an identification number up to seven positions that the user provides when making his payment.
  • Tracking key: It is an identifier up to 30 alphanumeric positions that the institution provides to the user at the time the payment is made.

emisor
The bank issuing the payment, it must correspond to the following catalog of banks

receptor
The bank receiving the payment, it must correspond correspond to the following catalog of banks

cuenta
Indicate the beneficiary account number

receptorParticipante
Boolean field to validate if it is a payment to a bank

  • true, yes it's a payment to a bank, then indicate the "Cuenta Ordenante" of the bank in the field cuenta.
  • false, no it's not a payment for a bank, indicate the "Cuenta Beneficiaria" of the receptor in the field cuenta.

monto
Indicate the amount of the deposit, decimals can be included

In order to obtain the file, you must look in the JSON response the structure called apiData->files->path

"apiData": [
    {
      "files": [
        {
          "path": "8/63f000af4db0f5add8c4f488/cep/validate+pdf/sandbox/641e3e8095db97f04a4f9e39/CEP-20230325-SANDBOX",
          "name": "CEP-20230325-SANDBOX"
        }
      ]
    }
  ]

Once you have obtained the path, the Get File service must be called in order to generate the PDF file.

Test the service (test cases)

We included a query param in Sandbox, so you can query test cases that we created to run tests.
In order to obtain the response you shall fill the query param with:

  • success: it sends back a successful example of a request where tipoCriterio field is T.

  • successR: it sends back a successful example of a request where tipoCriterio field is R.

  • notFound: it sends back an response with the status "NOT FOUND" to indicate that the query was not found in the BANXICO DB.

Possible Errors

Required field

You will get a 400 bad request error when any of the parameters are not provided in the body request.

{
    "tipoCriterio": "REQUIRED_FIELD_ERROR; EMPTY_ERROR; can't be empty",
    "cuenta": "REQUIRED_FIELD_ERROR; EMPTY_ERROR; can't be empty",
    "emisor": "REQUIRED_FIELD_ERROR; EMPTY_ERROR; can't be empty",
    "fecha": "REQUIRED_FIELD_ERROR; EMPTY_ERROR; can't be empty",
    "receptor": "REQUIRED_FIELD_ERROR; EMPTY_ERROR; can't be empty",
    "tipoCriterio": "REQUIRED_FIELD_ERROR; EMPTY_ERROR; can't be empty"
}

Invalid format

You will get a 400 bad request error when at least one of the parameters does not conform to the format

{
	"tipoCriterio": "FORMAT_ERROR; should be T or R",
  "fecha": "FORMAT_ERROR; should be DD-MM-YYYY",
  "receptorParticipante": "FORMAT_ERROR; wrong type"
}

Test case not found

if a test case parameter is not sent or a value other than those mentioned above is sent, the service will return the following error 400 bad request

{
    "testCase": "EMPTY_ERROR; test case not found"
}
Language
Authorization
Header
Click Try It! to start a request and see the response here!