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