> For the complete documentation index, see [llms.txt](https://developer.flash-payments.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.flash-payments.com/~/revisions/9LlT1HXk7YEwcubW18VI/compliance/confirmation-of-payee/testing-cop-integration.md).

# Testing CoP integration

In the UAT environment, you can simulate different CoP responses by using specific substring keywords in the `accountName` field and any valid `bsb` and `accountNo` values.

{% hint style="info" %}
The pattern matching on the  `accountName` field is **substring-based** and **case-insensitive,** e.g. using `"Test Copimatch"`, `"John copimatch Smith"`, or `"COPIMATCH"` will all trigger the same scenario.
{% endhint %}

Here is a current list of most common testing keywords and [response codes](https://developer.flash-payments.com/~/revisions/9LlT1HXk7YEwcubW18VI/compliance/confirmation-of-payee/cop-response-codes). Please note this list **can be changed over time.**

| Account Name Keyword | Response Code        | Simulated Account Type     |
| -------------------- | -------------------- | -------------------------- |
| `copimatch`          | `MATCH`              | Individual                 |
| `copijmatch`         | `MATCH`              | Individual (joint account) |
| `copcmatch`          | `MATCH`              | Company                    |
| `copiclosematch`     | `CLOSE_MATCH`        | Individual                 |
| `copijclosematch`    | `CLOSE_MATCH`        | Individual (joint account) |
| `copcclosematch`     | `CLOSE_MATCH`        | Company                    |
| `copinotmatch`       | `NOT_MATCH`          | Individual                 |
| `copcnotmatch`       | `NOT_MATCH`          | Company                    |
| `copclosed`          | `ACCOUNT_CLOSED`     | -                          |
| `copnotfound`        | `ACCOUNT_NOT_FOUND`  | -                          |
| `coperror`           | `COP_PLATFORM_ERROR` | -                          |

{% hint style="info" %}
You can start with testing CoP requests in the [API Playground](https://api.uat.flash-payments.com.au/). Log in with your UAT credentials and use the [`confirmationOfPayee` mutation](https://app.gitbook.com/o/-LJHY9ByTtazrULEMNbl/s/-LJHY9Bz6vzZaIWDYj9o/~/edit/~/changes/500/other/confirmation-of-payee#making-a-cop-request).
{% endhint %}

### Integration Example

A typical integration flow looks like this:

1. Before submitting a payment or withdrawal, call `confirmationOfPayee` with the recipient's account details.
2. Inspect the `code` in the response.
3. If `MATCH` then proceed with the payment.
4. If `CLOSE_MATCH` then display a warning to your user and let them decide whether to proceed.
5. If `NOT_MATCH` then alert the user and recommend they verify the account details.
6. If `ACCOUNT_CLOSED` or `ACCOUNT_NOT_FOUND` — block the payment and ask the user to provide correct details.
7. If `COP_PLATFORM_ERROR` then optionally proceed, as the account may have opted out of CoP.
8.

{% hint style="info" %}
**CoP is advisory**. The response does not block payments automatically. It is **your responsibilit**y to act on the result codes appropriately for your use case.
{% endhint %}

#### Error Handling&#x20;

If your account does not have CoP enabled, the API will return:

```jsonl
{
  "data": {
    "confirmationOfPayee": {
      "success": false,
      "code": "COP_API_DISABLED",
      "message": "Confirmation Of Payee API is disabled. Please contact support.",
      "billable": false
    }
  }
}
```

Standard [rate limiting](https://developer.flash-payments.com/~/revisions/VVAbKd5tNL6a2Thg7Hh6/other/rate-limiting) applies to CoP requests. Additionally, CoP has its own usage limits. If you exceed them, you will receive the `COP_LIMIT_EXCEEDED` code.

{% hint style="info" %}
When the [response code](https://developer.flash-payments.com/~/revisions/cMEPQHA2kkPOWBiWhppd/compliance/confirmation-of-payee/cop-response-codes) is `COP_PLATFORM_ERROR`, it may indicate that the account holder has opted out of CoP verification. The general recommendation is to proceed with the payment.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.flash-payments.com/~/revisions/9LlT1HXk7YEwcubW18VI/compliance/confirmation-of-payee/testing-cop-integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
