> For the complete documentation index, see [llms.txt](https://docs.fetcch.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fetcch.xyz/how-to-integrate/guides/transaction-requests/how-to-build-transaction.md).

# How to build transaction?

### Arrange Data

Arrange data in this format

```json
{
    "receiver": "string",
    "transactionRequestId": number, // either transactionRequestId or receiver
    "payerConfig": {
        "payer": "string",
        "address": "string",
        "token": "string",
        "chain": number,
        "amount": number
    }
}
```

### Call Build API

{% openapi src="/files/xHkDlRpIfj4yuAtwlvDR" path="/payment/build-transaction" method="post" %}
[openapi.yml](https://2219691098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxaHazojZlIts4pidXQC6%2Fuploads%2F7U1PRlaamdcCS67VTbzB%2Fopenapi.yml?alt=media\&token=b98daf06-4442-4ccf-8b08-76e32833a666)
{% endopenapi %}

## Dry Build Transaction

This API will not return the actual built transaction, but will return `from`, `to` addresses and respective blockchains, so developers can build their own transaction based on the resolved addresses

{% openapi src="/files/xHkDlRpIfj4yuAtwlvDR" path="/payment/build-transaction" method="post" %}
[openapi.yml](https://2219691098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxaHazojZlIts4pidXQC6%2Fuploads%2F7U1PRlaamdcCS67VTbzB%2Fopenapi.yml?alt=media\&token=b98daf06-4442-4ccf-8b08-76e32833a666)
{% endopenapi %}
