githubEdit

POST /disperseNFT

Once you have a Smart Payout Account, you can initiate a batch transfer of ERC-721 NFTs using the /payout/disperseNFT endpoint.

Path

// Path Structure
//    /{chain}/account/{address} +
//    /payout/disperseNFT

const disperseNFTPath = `https://api.paymagic.xyz/v1` +
    `/eth/account/0xe9e284277648fcdb09b8efc1832c73c09b5ecf59` + 
    `/payout/disperseNFT`

Request Body

Pass in three arrays corresponding to the payouts to make with this call:

  • assets - array of ERC-721 addresses

  • tokenIds - array of token IDs as strings, corresponding to assets array

  • recipients - array of recipient addresses, corresponding to assets+amounts

var data = JSON.stringify({
  "assets": [
    "0xf52f827f0826959c173b34e8a2a63cb4c38c67c8",
    "0x375b18ec234e7801e79e49c76c468d86c331f22d"
  ],
  "tokenIds": [
    "1",
    "2"
  ],
  "recipients": [
    "0x869eC00FA1DC112917c781942Cc01c68521c415e",
    "0x0D79AfBF97a401968836b9D906F3f87b20d45A72"
  ]
});

Response

The response from payout endpoints is an ethers.jsarrow-up-right TransactionReponsearrow-up-right with a meta field that has additional information. By default, the meta field comes back with a value of {status: 'pending'}.

For more information on the meta field, see the Transactions page.

Last updated