# Safe Testing & Environments

We want you to feel confident when building your integration. That's why Hyp provides dedicated environments for development and testing. You can use these to play around and verify your payment flows without ever touching a real credit card or processing an actual transaction.

## Test vs. production environments

Before you go live, it's a great idea to make sure everything works exactly as you expect. You can do this by using a **test terminal**. These terminals are easy to spot because their numbers always start with `00100`.

On the other hand, **production terminals** are the real deal. They're used for processing actual transactions from your customers, so you'll want to switch to them only once you're fully ready.

## Simulating success and failure

When you're testing your integration, you should check how your application handles both smooth payments and the ones that don't quite go through.

To see what a **successful transaction** looks like, you can use the following Hyp Pay test card:

| Card number         | Expiry date | CVV | Israeli ID |
| ------------------- | ----------- | --- | ---------- |
| 5326 1073 0002 0772 | 05/31       | 033 | 890108558  |

Since many developers use this same card for testing, we recommend keeping your test amounts low — around 10 ILS or USD should do the trick. A successful payment will return the `CCode` parameter set to `0` in the redirect URL.

It's just as important to test **failure scenarios**. You want to make sure your application handles errors gracefully — for example, by keeping the customer's shopping cart full if their payment fails. To simulate a failure that redirects to your error page, you can use this test card:

| Card number         | Expiry date    | CVV | Israeli ID |
| ------------------- | -------------- | --- | ---------- |
| 4580 4580 4580 4580 | Any valid date | 123 | Any ID     |

Failed transactions can return different `CCode` values in the redirect URL. If you want to see a full list of what these codes mean, take a look at our [Status Codes](/pay/reference/response-status-codes.md) page.

## Switching between environments

Once you've finished testing and are ready to start accepting real payments, you'll need to update a few things in your application:

* Update your terminal number (`Masof`) to the production terminal number Hyp gave you.
* Switch your `KEY` and `PassP` to your production credentials.

The URL stays the same (`https://pay.hyp.co.il/p/`), but it will only process real transactions when you use your production credentials. This also means that the test credit card will no longer work.

If you need a refresher on where to find these details, check out our [Prerequisites & Initial Setup](/pay/getting-started/prerequisites-and-initial-setup.md) guide.


---

# Agent Instructions: 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:

```
GET https://developers.hyp.co.il/pay/getting-started/testing-environments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
