Error Codes International API

The PagSeguro International API uses standard HTTP status codes to indicate the success or failure of an API request. This page outlines the types of errors you may encounter, how to interpret them, and how to troubleshoot.

HTTP Status Codes

The possible HTTP status code return by the International API are listed and described in the following table.

Status CodeMeaningWhen it Happens
400Bad RequestOne or more validation errors occurred. Response includes detailed messages.
401UnauthorizedMissing or invalid authentication credentials. Response body is empty.
422Unprocessable EntityThe request is syntactically correct but cannot be processed semantically.

Response Formats

400 Bad Request

Returned when one or more fields are invalid. The API returns an array of error objects so you can validate all issues at once.

{
  "errors": [
    {
      "message": "Value is required and can't be empty",
      "location": "body.payer.email"
    },
    {
      "message": "Invalid type given. String expected",
      "location": "body.payer.email"
    }
  ]
}

401 Unauthorized

Returned when the request is not authenticated. The response body is empty:

{}

422 Unprocessable Entity

Returned for semantically incorrect requests such as business logic violations.

{
  "error": "charge_payment_method_not_enabled"
}

Error List

400 Bad Request

LocationMessage
header.authorizationValue is required and can't be empty
body.integration.referenceValue is required and can't be empty
body.integration.referenceThe input does not match against pattern '^([A-Za-z0-9-_])+$'
body.integration.referenceThe input is less than 4 characters long
body.integration.referenceThe input is more than 64 characters long
body.integration.referenceInvalid type given. String expected
body.integration.notification_urlThe input does not appear to be a valid Url
body.integration.notification_urlThe input is more than 200 characters long
body.integration.notification_urlValue is required and can't be empty
body.integration.notification_urlInvalid type given. String expected
body.integration.languageValue is required and can't be empty
body.integration.languageInvalid value. Options are: en_US, es_ES, pt_BR, pt_PT, tr_TR
body.order.currencyValue is required and can't be empty
body.order.currencyInvalid currency for charge country BR. Options are: BRL
body.order.currencyInvalid currency for charge country CL. Options are: CLP
body.order.currencyInvalid currency for charge country CO. Options are: COP
body.order.currencyInvalid currency for charge country MX. Options are: MXN
body.order.currencyInvalid currency for charge country PE. Options are: PEN
body.order.currencyInvalid value. Options are: BRL, CLP, COP, MXN, PEN
body.order.itemsValue is required and can't be empty
body.order.itemsThe items count must be less or equal than 100
body.order.items.0.quantityThe input is not strictly an integer
body.order.items.0.quantityThe input is not greater than or equal to 1
body.order.items.0.quantityValue is required and can't be empty
body.order.items.0.descriptionInvalid type given. String expected
body.order.items.0.descriptionValue is required and can't be empty
body.order.items.0.descriptionThe input is more than 180 characters long
body.order.items.0.unit_priceThe input is not strictly a float
body.order.items.0.unit_priceThe input is not greater than or equal to 0.01
body.order.items.0.unit_priceValue is required and can't be empty
body.charge.typeInvalid value. Options are: BR, CL, CO, MX, PE
body.charge.typeValue is required and can't be empty
body.charge.typeInvalid value. Options are: CREDIT_CARD
body.charge.typeValue is required and can't be empty
body.charge.credit_cardValue is required and can't be empty
body.charge.credit_cardInvalid value. Options are: raw or token
body.charge.credit_card.rawThe credit card is already expired
body.charge.credit_card.rawValue is required and can't be empty
body.charge.credit_card.raw.numberThe input is more than 19 characters long
body.charge.credit_card.raw.numberThe input is less than 12 characters long
body.charge.credit_card.raw.numberThe input must contain only digits
body.charge.credit_card.raw.numberValue is required and can't be empty
body.charge.credit_card.raw.numberInvalid type given. String expected
body.charge.credit_card.raw.cvcThe input is more than 4 characters long
body.charge.credit_card.raw.cvcThe input is less than 3 characters long
body.charge.credit_card.raw.cvcThe input must contain only digits
body.charge.credit_card.raw.cvcValue is required and can't be empty
body.charge.credit_card.raw.cvcInvalid type given. String expected
body.charge.credit_card.raw.expiration_monthInvalid value. Options are: 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12
body.charge.credit_card.raw.expiration_monthValue is required and can't be empty
body.charge.credit_card.raw.expiration_yearThe input does not appear to be a valid year
body.charge.credit_card.raw.expiration_yearValue is required and can't be empty
body.charge.credit_card.raw.expiration_yearInvalid type given. String expected
body.charge.credit_card.raw.holder_nameInvalid type given. String expected
body.charge.credit_card.raw.holder_nameThe input contains leading or trailing blanks
body.charge.credit_card.raw.holder_nameThe input is less than 2 characters long
body.charge.credit_card.raw.holder_nameThe input is more than 26 characters long
body.charge.credit_card.raw.holder_nameThe input contains more than one space between words
body.charge.credit_card.raw.holder_nameThe input contains invalid characters
body.charge.credit_card.raw.holder_nameValue is required and can't be empty
body.charge.credit_card.tokenValue is required and can't be empty
body.charge.credit_card.tokenInvalid value given
body.charge.credit_card.tokenInvalid type given. String expected
body.payer.emailInvalid type given. String expected
body.payer.emailThe input is not a valid email address. Use the basic format [email protected]
body.payer.emailThe input is more than 60 characters long
body.payer.emailValue is required and can't be empty
body.payer.ipInvalid type given. String expected
body.payer.ipThe input is not a valid ip address
body.payer.ipThe input is more than 39 characters long
body.payer.ipValue is required and can't be empty
body.payer.person.nameValue is required and can't be empty
body.payer.person.nameInvalid type given. String expected
body.payer.person.nameThe input is less than 4 characters long
body.payer.person.nameThe input is more than 50 characters long
body.payer.person.nameThe input contains leading or trailing blanks
body.payer.person.nameThe input contains invalid characters
body.payer.person.nameThe surnames words must be between 1 and 40 characters long
body.payer.person.nameThe input must have more than one word
body.payer.person.nameThe first name must be greater than or equal to 2 characters long
body.payer.person.nameThe input contains more than one space between words
body.payer.person.nameValue is required and can't be empty
body.payer.person.birth_dateInvalid type given. String expected
body.payer.person.birth_dateThe input does not appear to be a valid date
body.payer.person.birth_dateThe input does not fit the date format 'Y-m-d'
body.payer.person.birth_dateValue is required and can't be empty
body.payer.person.document.typeValue is required and can't be empty
body.payer.person.document.typeInvalid value. Options are: CC, CE, CPF, CURP, DNI, NIT, RFC, RUT, TI, RUC
body.payer.person.document.typeInvalid document for charge country CO. Options are: CC, CE, TI, NIT
body.payer.person.document.typeInvalid document for charge country MX. Options are: CURP, RFC
body.payer.person.document.typeInvalid document for charge country CL. Options are: RUT
body.payer.person.document.typeInvalid document for charge country PE. Options are: DNI, CE, RUC
body.payer.person.document.typeInvalid document for charge country BR. Options are: CPF
body.payer.person.document.numberInvalid type given. String expected
body.payer.person.document.numberValue is required and can't be empty
body.payer.person.document.numberThe input is invalid for document type CPF
body.payer.person.document.numberThe input is invalid for document type CC
body.payer.person.document.numberThe input is invalid for document type CE
body.payer.person.document.numberThe input is invalid for document type TI
body.payer.person.document.numberThe input is invalid for document type NIT
body.payer.person.document.numberThe input is invalid for document type CURP
body.payer.person.document.numberThe input is invalid for document type RFC
body.payer.person.document.numberThe input is invalid for document type RUT
body.payer.person.document.numberThe input is invalid for document type DNI
body.payer.person.document.numberThe input is invalid for document type RUC
body.payer.person.phone.country_codeThe input must contain only digits
body.payer.person.phone.country_codeThe input is more than 3 characters long
body.payer.person.phone.country_codeInvalid type given. String expected
body.payer.person.phone.country_codeValue is required and can't be empty
body.payer.person.phone.numberThe input must contain only digits
body.payer.person.phone.numberThe input is more than 11 characters long
body.payer.person.phone.numberInvalid type given. String expected
body.payer.person.phone.numberValue is required and can't be empty

422 Error List

When the server understands the request but cannot process it due to business rule violations, it returns a 422 Unprocessable Entity error with the following format:

{
  "error": "charge_payment_method_not_enabled"
}

Common 422 Errors

Error CodeMeaning
payer_buy_limit_exceedEnd-user has exceeded the monthly limit allowed
charge_payment_method_not_enabledThe payment method is not enabled for the merchant
integration_reference_already_existsThe merchant reference is already in use by another transaction