withdraw

paid - writing to the blockchain costs Ether


withdraw decreases the balance of a user by a set value

Send Data

Calling withdraw takes the following variables:

  • api_key
  • api_secret
  • contract_address
  • from_user
  • value
curl -XPOST "https://api.happycha.in/withdraw" -d {
    api_key:          "YOUR_API_KEY",
    api_secret:       "YOUR_API_SECRET",
    contract_address: "YOUR_CONTRACT_ADDRESS",
    from_user:        "USER_ID",
    value:            10
  }

Return Data

In response you'll receive the transaction_hash of your deposit

  • transaction_hash

Be sure to hold onto your contract_address as you'll need it to call contract functions

{transaction_hash: "0x23632e32f3385b2a245c54905"}

results matching ""

    No results matching ""