Shift API

Custodians (companies and developers) integrate with the Shift API to create and manage branded debit cards and cardholder data. We've tried to make this documentation user-friendly and example-filled, but please drop us a line with any questions. If you're planning to use our API in production, you should take a look at Metropolitan Commercial Bank's privacy policy.


View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
status code 401

  "error": {
    "type": "invalid_request_error",
    "message": "Authentication to the API occurs via HTTP Basic Auth"
import java.nio.charset.Charset;
private String getResponse(URL url){
try {
HttpURLConnection c = url.openConnection();
c.setReadTimeout(1000); // 1 second

Keybase proof

I hereby claim:

  • I am charleyhine on github.
  • I am charley ( on keybase.
  • I have a public key whose fingerprint is CB9F EC53 0F65 E580 BFE1 A27E F929 A025 4978 14B8

To claim this, I am signing this object:

View gist:36a7fe8a51ce305f5be6
btc_r_tx =
btc_r_key = Bitcoin::Key.from_base58(private_key)
hash = btc_r_tx.signature_hash_for_input(input_index, redeem_script)
View gist:9287933294d1f0f5cdb6
btc_key = Bitcoin::Key.from_base58(get_path_pk(sig))
hash = @btc_r_tx.signature_hash_for_input(input['input_index'], input['redeem_script'])
signat = btc_key.sign(hash)
View gist:5457d2d3a36b17f7f820
def result
tx = JSON.parse(request.raw_post)
type = tx['payload']['type']
confs = tx['payload']['confirmations']
amount_s = tx['payload']['received']
tx_id = tx['payload']['transaction_hash']
addr = tx['payload']['address']
render nothing: true, status: 200
View gist:5c9f9a374b9b893f760b
"address": {
"address": "1kf93kf...",
"transaction": {
"hash": "48d4425e68...",
"address_sent": 0,
"address_received": 4000,
"confirmations": 5
View gist:c8b4c25343766d2c4cc5
<!DOCTYPE html>
<title>Bitcoin API - Chain</title>
<link rel='shortcut icon' type='image/x-icon' href='/chain32x32.ico' />
<link rel='shortcut icon' type='image/x-icon' href='/chain16x16.ico' />
<meta name="description" content="Chain is a powerful block chain API that makes it easy to build Bitcoin applications.">
<!--facebook meta tags-->