# Concepts

## The Payment flow

The IVPAY payment flow is **asynchronous,** your customer is redirected from your website to our payment widget and selects the cryptocurrency. After the customer sends a transaction, to an address provided by IVPAY, the customer is redirected back to your website upon payment completion.

Here’s a simple flow breakdown:

1. **Customer places an order on the merchant website**: The merchant sends payment details to IVPAY via [create payment API.](https://docs.ivpay.io/start/ivpay-api/api-reference/payments#create)&#x20;
2. **Redirect to the payment page**: the customer is redirected to IVPAY to complete the payment.&#x20;
3. **Customer completes payment**: the customer selects the cryptocurrency and initiates the transaction to the provided crypto address.
4. **Redirect back**: The customer is redirected to the merchant's website on success or failure page.&#x20;
5. **Asynchronous notification**: Once the payment is confirmed or failed (can take minutes to hours), IVPAY sends a notification to the merchant [via webhooks.](https://docs.ivpay.io/start/get-started/webhooks)

This is a process that commits to always provide a final state for the payment, regardless if it's a success or a failed final.

## The Payment statuses

The possible payment statuses are:

* **CREATED** -> it has just been created
* **PENDING** -> it is waiting for crypto to be transferred
* **PAID** -> it is successfully paid (it's a final state)
* **TIMEOUT** -> the customer didn't pay within the timeframe necessary so it failed (it's a final state)


---

# 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://docs.ivpay.io/start/get-started/concepts.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.
