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

# Troubleshooting Payments

> Troubleshoot payment status issues and understand CPA005 error codes in Flinks Pay.

When a payment fails or encounters an issue, use the following steps to diagnose the problem.

## Checking payment status in the Dashboard

1. Log in to the [Flinks Dashboard](/guides/dashboard/getting-started).
2. Navigate to **Payments**.
3. Click the **Error** tab to view failed payments.
4. Select a payment to view its details, including the `paymentStatus` and `statusDetails` fields.

## Checking payment status via API

Use the [/PaymentRequests GET](/api/pay/endpoints/e-transfer/get-payment-requests) endpoint to check the status of a payment:

```bash theme={null}
curl -X GET \
  https://{baseurl}/api/v1/paymentrequests/{requestId} \
  -H 'Authorization: Bearer {access_token}' \
  -H 'BaseURI: {instance}'
```

## Payment status reference

| Status       | Description                                                          |
| :----------- | :------------------------------------------------------------------- |
| `Initiated`  | Payment request received and ready for processing                    |
| `Processing` | User is completing the transaction                                   |
| `Accepted`   | User accepted the payment; funds flow has started (funds guaranteed) |
| `Processed`  | Transaction processed; awaiting settlement                           |
| `Settled`    | Funds transfer completed to your account                             |
| `Cancelled`  | Payment cancelled before being initiated                             |
| `Expired`    | User did not action the request in time                              |
| `Declined`   | User declined the payment at their financial institution             |
| `Failed`     | Payment request failed (check `statusDetails` for reason)            |

## Debugging with browser DevTools

For advanced debugging of payment flow issues:

1. Open your browser's Developer Tools (F12 or Ctrl+Shift+I).
2. Go to the **Network** tab.
3. Search for `SearchLiveTransactionHistories` in the network requests.
4. Inspect the response to find the `paymentStatus` and `statusDetails` fields.

## CPA005 error codes

CPA005 errors are Canadian Payments Association return codes that indicate why an EFT transaction was rejected by the receiving financial institution.

| Code  | Description                    |
| :---- | :----------------------------- |
| `900` | Account closed                 |
| `901` | No account / account not found |
| `902` | Account frozen                 |
| `903` | Invalid account number         |
| `905` | No debit allowed               |
| `907` | Payment refused by customer    |
| `908` | Funds not cleared              |
| `910` | Payor / payee deceased         |
| `911` | Account currency mismatch      |
| `912` | Incorrect payor / payee name   |
| `914` | Payment stopped                |
| `990` | Institution in default         |

<Note>
  CPA005 errors are specific to Canadian EFT transactions. If you encounter a CPA005 error, the payment will need to be re-initiated after resolving the underlying issue with the customer's bank account.
</Note>

## Common issues

| Problem                              | Possible cause                            | Solution                                                    |
| :----------------------------------- | :---------------------------------------- | :---------------------------------------------------------- |
| Payment stuck in `Processing`        | User hasn't completed the flow            | Follow up with the customer or check if the session expired |
| `Failed` with `failed_name_matching` | Name mismatch between session and bank    | Create a new session with the correct name                  |
| Payment `Expired`                    | User didn't action the e-transfer request | Initiate a new payment request                              |
| CPA005 rejection                     | Bank rejected the EFT transaction         | Check the specific CPA005 code and work with the customer   |
