Document Validation
Check if an ID is valid. Use this service before sending a request in order to avoid transaction rejection due to data mismatch.
Document Validation
POST https://api.stage.localpayment.com/api/validation/document
Request Body
Name
Type
Description
document*
Object
Required. Valid (e.g. government issued) identity document.
document.id*
String
Required. Identity document id. Usually a number.
document.type*
String
Required. Identity document type. Please take a look at our recognized document types per country list.
{
"code": "200",
"description": "Valid id and type document"
}
{
"code": "300",
"description": "Invalid param + Payer.document.[id or type] + [Is Invalid]"
}
Document Validation: Example request
{
"document": {
"id" :"52993635000130",
"type" :"CNPJ"
},
"country" : "BRA"
}curl --location --request POST 'https://api.stage.localpayment.com/api/validation/document' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjQ2NjgzNDk1LCJqdGkiOiIwNzkwZDhkYmJkNmI0ZGYwYWQxZDNkMjE3Y2I2NzVlMSIsInVzZXJfaWQiOjMwLCJzdXBlcnVzZXIiOnRydWUsImlzX3N0YWZmIjpmYWxzZSwicm9sZXMiOlsiQUxMIl0sImNvdW50cmllcyI6WyJBTEwiXSwiY29tcGFueSI6IjAwMDEiLCJjbGllbnRfY29kZSI6IjAwMDEifQ.bSaaZAHvLnxU-tfP2LsloZVUqTYuObRrKhB6VLzWyiY' \
--header 'Content-Type: application/json' \
--data-raw '{
"document": {
"id" :"52993635000130",
"type" :"CNPJ"
},
"country" : "BRA"
}'Please find all the possible error codes in this link
Validation Error CodesCheck the CountryISO Code3 in the following section:
Country CodesIn the following section, check the valid ID Types in every country that LP works with:
Document ValidationsLast updated
Was this helpful?