# Start Transaction (Token)

## Start Transaction (Token)

To start a transaction with a token (ERC20 or ERC1155), the user must first make a transaction to authorize the Escrow smart contract to spend a certain amount of their tokens.&#x20;

In this example we have the following information :

* Marketplace id : `marketplaceId1`
* Ad id : `adId1`
* Price of the ad (excluding fees) : 1 token
* Seller's address : `0x70997970C51812dc3A010C7d01b50e0d17dc79C8`

The fee for this token is 1%, the user must first make a transaction to authorize the smart contact to spend the total amount (price+fees) :`1,01`&#x20;

```javascript
//Approve the escrow contract
await token.approve(escrow.address, ethers.utils.parseEther("1.01"));

//New transaction
await escrow.startTransaction(
    "marketplaceId1", //Marketplace id
    "adId1", //Ad id
    ethers.utils.parseEther("1"), //ad price
    token.address, //Token address
    "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" //Seller's address
);
```


---

# 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.smartlink.so/for-third-parties-eth/start-transaction-token.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.
