GET
/
api
/
v1
/
accounts
/
withdraw
/
transaction-data
Get typed data for withdrawing from the user's Safe account
const url = 'https://api.gnosispay.com/api/v1/accounts/withdraw/transaction-data';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}, body: undefined};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "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.

to
string
required

The address to withdraw to.

amount
string
required

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

Response

200
application/json

Successfully retrieved EIP-712 typed data for signing.

The response is of type object.