Getting Started

Integrate HandCash into your platform to stream money

Create your first app

  • Sign in to the developer dashboard.
  • Create your first organization.
  • Create your first app. Give it a cool name!

Get your app credentials

Once you have registered the app, be sure to copy down your App ID and App Secret. You will need them to authenticate your app in our APIs.

Choose your Integration

HandCash Connect

The most flexible way of integrating payments into your platform.

Users authorize your app and provide an authToken that you can use to trigger instant payments when and how you want.

const {HandCashConnect} = require('@handcash/handcash-connect');
const handCashConnect = new HandCashConnect({ 
   appId: '<app-id>', 
   appSecret: '<secret>',
}); 
const account = handCashConnect.getAccountFromAuthToken(token);
const paymentParameters = {
    description: "Hold my beer!🍺",
    payments: [
        { destination: 'nosetwo', currencyCode: 'BSV', sendAmount: 0.001 },
    ]
};
const paymentResult = await account.wallet.pay(paymentParameters);
console.log(paymentResult);

Find out more at HandCash Connect.

HandCash Pay

The quickest way of integrating payments into your platform.

Create a custom payment request and present it to your users. Get notified via webhook when the payment is completed.

const axios = require("axios").default;

const options = {
  method: 'POST',
  url: 'https://cloud.handcash.io/v2/paymentRequests',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
    'app-secret': 'your-app-secret',
    'app-id': 'your-app-id'
  },
  data: {
    product: {
      name: 'Jump · Micro',
      description: 'Play a game to Jump in the Micro division.',
      imageUrl: 'https://haste-developer-portal-production-game-art.s3.amazonaws.com/Jump/gameicon.png'
    },
    receivers: [
      {sendAmount: 0.08, currencyCode: 'USD', destination: 'imaWinner'},
      {sendAmount: 0.02, currencyCode: 'USD', destination: 'haste'}
    ],
    requestedUserData: ['paymail'],
    notifications: {
      webhook: {
        customParameters: {gameId: '199491921'},
        webhookUrl: 'https://app.hastearcade.com/wehbooks/handcash'
      },
      email: '[email protected]'
    },
    expirationType: 'never',
    redirectUrl: 'https://app.hastearcade.com/games/ec04e9ca-71b6-4fb2-abb0-b6a2da072fb9'
  }
};

axios.request(options).then(function (response) {
  console.log(response.data);
}).catch(function (error) {
  console.error(error);
});
import requests

url = "https://cloud.handcash.io/v2/paymentLinks"

payload = {
    "product": {
        "name": "Jump · Micro",
        "description": "Play a game to Jump in the Micro division.",
        "imageUrl": "https://haste-developer-portal-production-game-art.s3.amazonaws.com/Jump/gameicon.png"
    },
    "receivers": [
        {
            "sendAmount": 0.08,
            "currencyCode": "USD",
            "destination": "imaWinner"
        },
        {
            "sendAmount": 0.02,
            "currencyCode": "USD",
            "destination": "haste"
        }
    ],
    "requestedUserData": ["paymail"],
    "notifications": {
        "webhook": {
            "customParameters": {
                "gameId": "9ac9182acae19902"
            },
            "webhookUrl": "https://app.hastearcade.com/wehbooks/handcash"
        },
        "email": "[email protected]"
    },
    "expirationType": "never",
    "redirectUrl": "https://app.hastearcade.com/games/ec04e9ca-71b6-4fb2-abb0-b6a2da072fb9"
}
headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "app-secret": "your-app-secret",
    "app-id": "your-app-id"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://cloud.handcash.io/v2/paymentLinks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["app-secret"] = 'your-app-secret'
request["app-id"] = 'your-app-id'
request.body = "{\"product\":{\"name\":\"Jump · Micro\",\"description\":\"Play a game to Jump in the Micro division.\",\"imageUrl\":\"https://haste-developer-portal-production-game-art.s3.amazonaws.com/Jump/gameicon.png\"},\"receivers\":[{\"sendAmount\":0.08,\"currencyCode\":\"USD\",\"destination\":\"imaWinner\"},{\"sendAmount\":0.02,\"currencyCode\":\"USD\",\"destination\":\"haste\"}],\"requestedUserData\":[\"paymail\"],\"notifications\":{\"webhook\":{\"customParameters\":{\"gameId\":\"9ac9182acae19902\"},\"webhookUrl\":\"https://app.hastearcade.com/wehbooks/handcash\"},\"email\":\"[email protected]\"},\"expirationType\":\"never\",\"redirectUrl\":\"https://app.hastearcade.com/games/ec04e9ca-71b6-4fb2-abb0-b6a2da072fb9\"}"

response = http.request(request)
puts response.read_body
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://cloud.handcash.io/v2/paymentLinks', [
  'body' => '{"product":{"name":"Jump · Micro","description":"Play a game to Jump in the Micro division.","imageUrl":"https://haste-developer-portal-production-game-art.s3.amazonaws.com/Jump/gameicon.png"},"receivers":[{"sendAmount":0.08,"currencyCode":"USD","destination":"imaWinner"},{"sendAmount":0.02,"currencyCode":"USD","destination":"haste"}],"requestedUserData":["paymail"],"notifications":{"webhook":{"customParameters":{"gameId":"9ac9182acae19902"},"webhookUrl":"https://app.hastearcade.com/wehbooks/handcash"},"email":"[email protected]"},"expirationType":"never","redirectUrl":"https://app.hastearcade.com/games/ec04e9ca-71b6-4fb2-abb0-b6a2da072fb9"}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'app-id' => 'your-app-id',
    'app-secret' => 'your-app-secret',
  ],
]);

echo $response->getBody();
curl --request POST \
     --url https://cloud.handcash.io/v2/paymentLinks \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'app-id: your-app-id' \
     --header 'app-secret: your-app-secret' \
     --data '
{
     "product": {
          "name": "Jump · Micro",
          "description": "Play a game to Jump in the Micro division.",
          "imageUrl": "https://haste-developer-portal-production-game-art.s3.amazonaws.com/Jump/gameicon.png"
     },
     "receivers": [
          {
               "sendAmount": 0.08,
               "currencyCode": "USD",
               "destination": "imaWinner"
          },
          {
               "sendAmount": 0.02,
               "currencyCode": "USD",
               "destination": "haste"
          }
     ],
     "requestedUserData": [
          "paymail"
     ],
     "notifications": {
          "webhook": {
               "customParameters": {
                    "gameId": "9ac9182acae19902"
               },
               "webhookUrl": "https://app.hastearcade.com/wehbooks/handcash"
          },
          "email": "[email protected]"
     },
     "expirationType": "never",
     "redirectUrl": "https://app.hastearcade.com/games/ec04e9ca-71b6-4fb2-abb0-b6a2da072fb9"
}
'

Find out more at HandCash Pay.


What’s Next

See how to authenticate users.