> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mangopay.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server.

# 001031

<table>
  <tbody>
    <tr>
      <th class="header">
        Error message
      </th>

      <td class="table-content">
        User canceled the payment
      </td>
    </tr>

    <tr>
      <th class="header">
        Description
      </th>

      <td class="table-content">
        The pay-in failed because the user canceled the payment.
      </td>
    </tr>
  </tbody>
</table>

#### Causes

This error occurs when the user cancels the payment.

#### What to do

If the end user did not deliberately cancel the payment, they should retry.

#### Example

**`API Response`**

```json API Response
{
    "DirectDebitType":"SOFORT",
    "Id":"33394444",
    "Tag":"Custom",
    "CreationDate":1677852627,
    "ResultCode":"001031",
    "ResultMessage":"User canceled the payment",
    "AuthorId":"331725555",
    "CreditedUserId":"33175555",
    "DebitedFunds":{
        "Currency":"EUR",
        "Amount":1540
    },
    "CreditedFunds":{
        "Currency":"EUR",
        "Amount":1540
    },
    "Fees":{
        "Currency":"EUR",
        "Amount":0
    },
    "Status":"FAILED",
    "ExecutionDate":null,
    "Type":"PAYIN",
    "Nature":"REGULAR",
    "CreditedWalletId":"331766668",
    "DebitedWalletId":null,
    "PaymentType":"DIRECT_DEBIT",
    "ExecutionType":"WEB",
    "RedirectURL":"https://redirecturl",
    "ReturnURL":"https://returnurl",
    "TemplateURL":"https://template url",
    "Culture":"EN"
}
```