How to build transaction?
Build Same or Cross chain transactions
Arrange Data
Arrange data in this format
{
"receiver": "string",
"transactionRequestId": number, // either transactionRequestId or receiver
"payerConfig": {
"payer": "string",
"address": "string",
"token": "string",
"chain": number,
"amount": number
}
}Call Build API
post
/payment/build-transaction
Generate Transaction for Transaction Request
Authorizations
Bodyobject[]
transactionstringOptional
typestringOptional
Responses
200Success
application/json
400Error
application/json
500Error
application/json
post
/payment/build-transactionPOST /v1/payment/build-transaction HTTP/1.1
Host: staging-api.fetcch.xyz
secret-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 2
[]{
"status": 1,
"data": [],
"timestamp": "text"
}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
post
/payment/build-transaction
Generate Transaction for Transaction Request
Authorizations
Bodyobject[]
transactionstringOptional
typestringOptional
Responses
200Success
application/json
400Error
application/json
500Error
application/json
post
/payment/build-transactionPOST /v1/payment/build-transaction HTTP/1.1
Host: staging-api.fetcch.xyz
secret-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 2
[]{
"status": 1,
"data": [],
"timestamp": "text"
}Last updated