> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wepayout.co/llms.txt
> Use this file to discover all available pages before exploring further.

# CPF Mismatch

> Prevent fraud by ensuring CPF verification on deposits and withdrawals

## What is CPF Mismatch?

**CPF Mismatch** is a feature that rejects transactions when the CPF of the user's making a deposit or receiving a prize does not match the CPF of the account holder.

This measure ensures that only the authorized holder can make payments and withdrawals, preventing fraud and ensuring compliance with local regulations, such as Ordinance 1330 of 26/10/2023, which prohibits third-party deposits in bettors' accounts.

## How does it work?

### Payin (Deposits)

When receiving a payment via a WE QR Code, the system checks whether the payer's CPF matches the CPF associated with the original request. If the information does not match, the transaction is rejected and the merchant receives a notification with the error code **RESTRICTION\_PAYER\_DIVERGENCE**.

<Note>
  **Optional Feature**: This functionality is configurable. It is required for specific segments—such as betting—but if you want it enabled for your business, please let us know.
</Note>

### Payout (Withdrawals)

This validation also applies to the withdrawal (payout) flow. Before completing the payment to the beneficiary, the system verifies whether the CPF matches the registered account holder. If it does not, the transaction is canceled with the reason **BENEFICIARY\_DIVERGENT**.

<Note>
  **Default Feature**: This is a default functionality and does not require any configuration.
</Note>

These controls ensure that only the legitimate account owner can perform financial transactions, increasing security for both the operator and the end user.

## Key Benefits

<CardGroup cols={2}>
  <Card title="Fraud Prevention" icon="shield-halved">
    Prevents unauthorized transactions by verifying CPF ownership
  </Card>

  <Card title="Regulatory Compliance" icon="scale-balanced">
    Complies with Ordinance 1330 of 26/10/2023
  </Card>

  <Card title="Real-time Validation" icon="bolt">
    Instant verification before transaction completion
  </Card>

  <Card title="Customer Protection" icon="user-shield">
    Protects both operators and end customers
  </Card>
</CardGroup>

## Transaction Flow

### Deposits (QR Code Payments)

<Steps>
  <Step title="QR Code Generation">
    WEPayments generates a QR code for the payment request
  </Step>

  <Step title="User Scans QR Code">
    User scans the QR code to make the payment
  </Step>

  <Step title="CPF Verification">
    System checks if payer's CPF matches the registered account holder's CPF
  </Step>

  <Step title="Transaction Result">
    If CPF matches: Payment is processed
    If CPF doesn't match: Transaction is rejected with error code
  </Step>
</Steps>

### Withdrawals (Payouts)

<Steps>
  <Step title="Withdrawal Request">
    User requests a withdrawal to their registered account
  </Step>

  <Step title="CPF Verification">
    System verifies if the beneficiary's CPF matches the registered holder
  </Step>

  <Step title="Transaction Result">
    If CPF matches: Payment is completed
    If CPF doesn't match: Transaction is canceled
  </Step>
</Steps>

## Error Codes

| Error Code                         | Type       | Description                                                      |
| ---------------------------------- | ---------- | ---------------------------------------------------------------- |
| **RESTRICTION\_PAYER\_DIVERGENCE** | Deposit    | The payer's CPF does not match the account holder's CPF          |
| **BENEFICIARY\_DIVERGENT**         | Withdrawal | The beneficiary's CPF does not match the registered holder's CPF |

## Use Cases

<AccordionGroup>
  <Accordion title="Betting Platforms">
    Ensures compliance with regulations that prohibit third-party deposits in bettors' accounts, as mandated by Ordinance 1330.
  </Accordion>

  <Accordion title="Financial Services">
    Prevents money laundering and fraud by ensuring only the account owner can perform transactions.
  </Accordion>

  <Accordion title="E-commerce">
    Protects merchants and customers by verifying the identity of the person making payments or receiving refunds.
  </Accordion>

  <Accordion title="Marketplaces">
    Ensures sellers receive payments only to their registered accounts, preventing fraud.
  </Accordion>
</AccordionGroup>

## Best Practices

<Note>
  **User Registration**: Ensure users register their correct CPF during account creation to avoid transaction rejections.
</Note>

<Warning>
  **Third-Party Payments**: Transactions from third-party accounts will be automatically rejected to comply with regulations.
</Warning>

<Tip>
  **Error Handling**: Implement proper error handling in your application to inform users when a CPF mismatch occurs.
</Tip>

## Regulatory Compliance

This feature helps you comply with:

* **Ordinance 1330 of 26/10/2023**: Prohibits third-party deposits in bettors' accounts
* **Anti-Money Laundering (AML)** regulations
* **Know Your Customer (KYC)** requirements

## Related Resources

<CardGroup cols={2}>
  <Card title="KYC Verification" icon="user-check" href="/api-reference/kyc/list-kyc">
    Know Your Customer verification
  </Card>

  <Card title="Create Charge" icon="plus" href="/api-reference/cash-in/payin/create-charge">
    Create payment charges
  </Card>

  <Card title="Create Payment" icon="money-bill-transfer" href="/api-reference/cash-out/payout/create-payment">
    Create payout payments
  </Card>
</CardGroup>
