> For the complete documentation index, see [llms.txt](https://docs.tygapay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tygapay.com/payment-gateway/how-it-works.md).

# How It Works

We provide two distinct payment gateway order options: '**`payment`**' and '**`deposit`**'.

## :credit\_card: **Payment Orders (Fixed Amount):**

For payment orders, a specific, predetermined amount must be paid to complete the order.

{% hint style="info" %}
Use Case: Browse products on your website. Specify the exact amount and initiate the TygaPay order to be paid in full.
{% endhint %}

## :credit\_card: **Deposit Orders (Flexible Amount):**

In the case of deposit orders, there is no fixed amount requirement. Any payment made toward the order will be processed, and upon receipt, the order will be considered complete.

{% hint style="info" %}
Use Case: Accept donations of any amount for your organization or credit a user's account in your system upon successful payment.
{% endhint %}

## :map: Process Flow

1. :rocket: **CREATE:** Initiate Order Creation via API. See:[Orders](/api/apis/orders.md#create-order)
2. :computer: **PRESENT:** Present the Payment Gateway URL to the Customer.
3. :credit\_card: **PAY:** Customer proceeds with Payment for the Order.
4. :white\_check\_mark: **COMPLETE:** Automatically Redirect to the Specified **`returnUrl`**. See: [Orders](/api/apis/orders.md#order-redirect-url)
5. :loudspeaker: **NOTIFY:** Trigger Notification to the Specified **`notifyUrl`**. See: [Orders](/api/apis/orders.md#order-notify-url-webhook)

<figure><img src="/files/ihqm8raLA1DQs2YCtfJ6" alt=""><figcaption><p>Payment Gateway Process Flow</p></figcaption></figure>


---

# 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://docs.tygapay.com/payment-gateway/how-it-works.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.
