# Atomic Transfer

All platform transactions are carried out through Atomic Transfer involving the various stakeholders.

Here is an example of the application:

```php
//Transaction 1 : payment to platform
    $transactions = array();
    $transactions[] = array(
        "txn" => array(
            "aamt" => $platformFee,
            "type" => "axfer", //Tx Type
            "fee" => 1000, //Fee
    ..............................
```

```php
//Transaction 2 : payment to hotspot owner
    $transactions[] = array(
        "txn" => array(
            "aamt" => $hotspotFee,
            "type" => "axfer", //Tx Type
            "fee" => 1000, //Fee
    ..............................
```

```php
//Transaction 3 : payment to reserve address
    $transactions[] = array(
        "txn" => array(
            "aamt" => $reserveFee,
            "type" => "axfer", //Tx Type
            "fee" => 1000, //Fee
    ...............................
```

```php
// 2) Group TRansactions
    $groupid = $algorand_kmd->groupid($transactions);
    #Assigns Group ID
    $transactions[0]['txn']['grp'] = $groupid;
    $transactions[1]['txn']['grp'] = $groupid;
    $transactions[2]['txn']['grp'] = $groupid;
    ................................
```

```php
//4) Send Transaction Group
    #Broadcasts a raw atomic transaction to the network.
    $params['transaction'] = $txn;
    $return = $algorand->post("v2", "transactions", $params);
    $txId = $return['response']->txId;
    ................................
```


---

# 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://doc.algowifi.com/technical-note/atomic-transfer.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.
