Page MenuHomePhabricator

invalid_tax_identifier in Brazil
Open, MediumPublic

Description

Should convert this error to some frontend detection before send for auth:
(RawData) Create payment request params:

{
  "amount": 5616,
  "currency": "BRL",
  "country": "BR",
  "payment_method": {
    "method": "pix",
    "redirect_url": "https://payments.wikimedia.org/index.php?title=Special:GravyGatewayResult&order_id=249729737.1&wmf_token=408fefa82d91ad7e45a7353c4565c484%2B%5C&amount=56.16&currency=BRL&payment_method=cash&payment_submethod=pix&wmf_source=sp75590485.default%7Edefault%7EJimmyQuote%7Edefault%7Econtrol.cash.pix&wmf_campaign=C2627_Email1&wmf_medium=email",
    "country": "BR",
    "currency": "BRL"
  },
  "external_identifier": "249729737.1",
  "statement_descriptor": {
    "description": "Wikimedia Foundation"
  },
  "buyer": {
    "external_identifier": "xxxxx@gmail.com",
    "billing_details": {
      "first_name": "xx",
      "email_address": "xxxxx@gmail.com",
      "phone_number": null,
      "address": {
        "city": null,
        "country": "BR",
        "postal_code": null,
        "state": null,
        "line1": null,
        "line2": null,
        "organization": null
      },
      "last_name": "xx",
      "tax_id": {
        "value": "98615895815",
        "kind": "br.cpf"
      }
    }
  },
  "user_ip": "191.248.193.209",
  "intent": "capture"
}

2026-07-15T14:58:16+00:00 [INFO] (RawData) Create Payment Auth response: (249729737.1)

{
  "type": "transaction",
  "id": "552db925-c125-4ea7-be9f-9cc7893b228d",
  "reconciliation_id": "2ajF5VkiqAWJwXxw1H25hl",
  "merchant_account_id": "default",
  "currency": "BRL",
  "amount": 5616,
  "status": "authorization_failed",
  "authorized_amount": 0,
  "captured_amount": 0,
  "refunded_amount": 0,
  "settled_currency": null,
  "settled_amount": 0,
  "settled": false,
  "country": "BR",
  "external_identifier": "249729737.1",
  "intent": "capture",
  "payment_method": {
    "type": "payment-method",
    "approval_url": null,
    "country": "BR",
    "currency": "BRL",
    "details": null,
    "expiration_date": null,
    "fingerprint": null,
    "label": null,
    "last_replaced_at": null,
    "method": "pix",
    "mode": "redirect",
    "scheme": null,
    "id": null,
    "approval_target": null,
    "external_identifier": null,
    "payment_account_reference": null
  },
  "method": "pix",
  "instrument_type": "redirect",
  "error_code": "invalid_tax_identifier",
  "payment_service": {
    "type": "payment-service",
    "id": "ed3f243b-fe28-4f85-bece-3c870e59e539",
    "payment_service_definition_id": "dlocal-pix",
    "method": "pix",
    "display_name": "Pix"
  },
  "pending_review": false,
  "buyer": {
    "type": "buyer",
    "id": null,
    "display_name": null,
    "external_identifier": "xxxxx@gmail.com",
    "billing_details": {
      "first_name": "xx",
      "last_name": "xx",
      "email_address": "xxxxx@gmail.com",
      "phone_number": null,
      "address": {
        "city": null,
        "country": "BR",
        "postal_code": null,
        "state": null,
        "state_code": null,
        "house_number_or_name": null,
        "line1": null,
        "line2": null,
        "organization": null
      },
      "tax_id": {
        "value": "98615895815",
        "kind": "br.cpf"
      }
    },
    "account_number": null
  },
  "raw_response_code": "5001",
  "raw_response_description": "Invalid parameter: payer.document",
  "shipping_details": null,
  "checkout_session_id": null,
  "gift_card_redemptions": [],
  "gift_card_service": null,
  "created_at": "2026-07-15T14:58:15.609942+00:00",
  "updated_at": "2026-07-15T14:58:15.931472+00:00",
  "disputed": false,
  "reauthorized_from_transaction_id": null,
  "airline": null,
  "auth_response_code": null,
  "avs_response_code": null,
  "cvv_response_code": null,
  "anti_fraud_decision": null,
  "payment_source": "ecommerce",
  "merchant_initiated": false,
  "is_subsequent_payment": false,
  "cart_items": [],
  "statement_descriptor": {
    "name": null,
    "description": "Wikimedia Foundation",
    "city": null,
    "country": null,
    "phone_number": null,
    "url": null,
    "postal_code": null
  },
  "scheme_transaction_id": null,
  "transaction_link_id": null,
  "three_d_secure": null,
  "payment_service_transaction_id": null,
  "additional_identifiers": {
    "payment_service_authorization_id": null,
    "payment_service_capture_id": null,
    "payment_service_processor_id": null
  },
  "metadata": null,
  "authorized_at": null,
  "captured_at": null,
  "voided_at": null,
  "canceled_at": null,
  "approval_expires_at": null,
  "buyer_approval_timedout_at": null,
  "intent_outcome": "failed",
  "multi_tender": false,
  "account_funding_transaction": false,
  "recipient": null,
  "merchant_advice_code": null,
  "installment_count": null,
  "session_token": null,
  "tax_amount": null,
  "merchant_tax_id": null,
  "purchase_order_number": null,
  "customer_reference_number": null,
  "amount_includes_tax": null,
  "supplier_order_number": null,
  "duty_amount": null,
  "shipping_amount": null,
  "iso_response_code": null
}