Skip to main content
GET
/
api
/
v1
/
accounts
/
withdraw
/
transaction-data
Retrieve Transaction Data for Withdrawing from Safe
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.gnosispay.com/api/v1/accounts/withdraw/transaction-data', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "data": {
    "domain": {
      "verifyingContract": "0x3270bf32AB647e90eF94A026c70Aa1daaaDA2382",
      "chainId": 100
    },
    "primaryType": "ModuleTx",
    "types": {
      "ModuleTx": [
        {
          "type": "bytes",
          "name": "data"
        }
      ]
    },
    "message": {
      "data": "0xa9059cbb0000000000000000000000003270bf32ab647e90ef94a026c70aa1daaaada23820000000000000000000000000000000000000000000000000de0b6b3a7640000",
      "salt": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

tokenAddress
string
required

The address of the token to withdraw. Use "0x0000000000000000000000000000000000000000" for native token (xDAI) withdrawals.

Pattern: ^0x[a-fA-F0-9]{40}$
to
string
required

The address to withdraw to.

Pattern: ^0x[a-fA-F0-9]{40}$
amount
string
required

The amount to withdraw in the token's base units.

Pattern: ^[1-9][0-9]*$

Response

Successfully retrieved EIP-712 typed data for signing.

data
object
required