1 BTC = 904.00 EUR
1 BTC = 904.00 EUR

Cashila API

Create something amazing.

Private methods

Private methods

Common error codes
1004 Bad signature HMAC signature does not match
1011 Access token expired Client should request new token and repeat failed request
Request BitID uri for signup
When creating new user account, where account should be paired using bitid, this method should be used to generate bitid url. This nonce should be signed similarly to bitid/request-token and provided as input to account creating method.
POST https://www.cashila.com/api/v1/bitid/request-signup
{
  "result": {
    "uri": "bitid://cashila.com/api/v1/bitid/token?x=gfQW..."
  }
}
Create account/login
You can use this method for creating new account or to signin using existing account.
  • Creates user account: all parts except account are optional. Only user’s email is required. Verification, bitid and webhook parts will be used only if present. Operation is idempotent.
  • Login: beside email, password and second_factor fields (can be empty) must be provided.
Notes:
  • After account is created, a welcome email will be sent to user.
  • Verification documents should be submitted later using verification/{doc} method.
  • Bitid url can be obtained using bitid/request-signup.
  • Webhook url will be used to notify client about changes regarding user’s verification. A POST request will be made at this url with json payload containing: token and event.
PUT https://www.cashila.com/api/v1/account
{
  // required
  "account": {
    "email": "user@example.com"
  },

  // optional
  "verification": {
    "first_name": "Peter",
    "last_name": "Griffin",
    "address":"Spooner street",
    "postal_code":"1234",
    "city":"Quahog",
    "country_code":"US"
  },

  // optional
  "bitid": {
    "address": "mt...",
    "uri": "bitid://cashila.com/api/v1/account?x=...",
    "signature": "IG..."
  },

  // optional
  "webhook": "https://example.com/..."
}
{
  // required
  "account": {
    "email": "user@example.com"
  },

  // optional
  "verification": {
    "is_company": true,
    "company_name": "ACME",
    "organizational_form": "llc",
    "registration_number": "1234",
    "address": "One street 1",
    "postal_code": "123",
    "city": "Some city",
    "country_code": "US"
  },

  // optional
  "bitid": {
    "address": "mt...",
    "uri": "bitid://cashila.com/api/v1/account?x=...",
    "signature": "IG..."
  },

  // optional
  "webhook": "https://example.com/..."
}
PUT https://www.cashila.com/api/v1/account
{
  // required
  "account": {
    "email": "user@example.com",
    "password": "...",
    "second_factor": "123..."
  },

  // optional
  "bitid": {
    "address": "mt...",
    "uri": "bitid://cashila.com/api/v1/account?x=...",
    "signature": "IG..."
  }
}
Error codes
1012 Bad signup params Some signup params didn’t pass validation. user_message property holds additional information.
1013 User already exist User with specified email already exist.
1017 Another user already paired BTC address is already paired with some other account.
Account limits
Returns account spending limits. Max amount is dynamic and might change after each payment is made (based on current account limits, eg. per each payment, per month, …). In short, max value represent maximum amount for the next payment. If client is checking amount before making payment, it should call this method before validating.
GET https://www.cashila.com/api/v1/account/limits
{
  "result": {
    "EUR": {
      "min": 5,
      "max": 1000
    }
  }
}
Account balance
Returns account balance info. Available amount is always smaller or equal than balance. Available is amount that user can withdraw, balance is equal available + unconfirmed withdrawals. If client needs to show balance to the users it should show available amount, because this is the maximum amount that user can withdraw.
GET https://www.cashila.com/api/v1/account/balance
{
  "result": {
    "EUR": {
      "balance": 1200,
      "available": 1000
    }
  }
}
Create resource deep link
Returns url to resource which automatically logs user in. Each link can be used only once and is valid for 5 minutes. If (any) user is already logged in, the same user stays logged in.
POST https://www.cashila.com/api/v1/account/deep-link
Available resources for deep linking
dashboard User’s dashboard
recipients Recievers address book
recipients/add Form to enter new receiver
{
  "resource" : "recipients/add"
}
{
  "result": {
    "url": "https://www.cashila.com/recipients/add?jwt=...",
    "valid_until": "2015-05-15T11:56:48+0000"
  }
}
Verification details
Returns user’s verification details.
Status can be: pending (if verification has not been reviewed yet), rejected or verified.
If status is rejected there will be additional field rejected_reason containing human readable explanation why verification was rejected (eg. Back of government id is illegible).
There are three document needed to fully verify account:
  • gov-id-front: picture of government issued id (front side)
  • gov-id-back: picture of government issued id (back side, optional)
  • residence: picture of document which proves residence status
Approved attribute indicate if document is ok - if it needs to be resubmited.
GET https://www.cashila.com/api/v1/verification
{
  "status": "verified",
  "is_company": false,
  "first_name" : "Peter",
  "last_name": "Griffin",
  "address": "Spooner street",
  "postal_code": "1234",
  "city": "Quahog",
  "country_code": "US",
  "gov-id-front": {
    "present": true,
    "approved": true
  },
  "gov-id-back": {
    "present": true,
    "approved": true
  },
  "residence": {
    "present": false
  }
}
{
  "status": "verified",
  "is_company": true,
  "company_name": "ACME",
  "organizational_form": "llc",
  "registration_number": "1234",
  "address": "One street 1",
  "postal_code": "123",
  "city": "Some city",
  "country_code": "US",
  "documents": [
    {
      "approved": true,
      "name": "doc1.jpg"
    },
    {
      "approved": false,
      "name": "doc2.jpg"
    }
  ]
}
Update verification details
Updates verification details. This method can only be used until verification is approved.
PUT https://www.cashila.com/api/v1/verification
{
  "first_name" : "Peter",
  "last_name": "Griffin",
  "address": "Spooner street",
  "postal_code": "1234",
  "city": "Quahog",
  "country_code": "US"
}
{
  "is_company": true,
  "company_name": "ACME",
  "organizational_form": "llc",
  "registration_number": "1234",
  "address": "One street 1",
  "postal_code": "123",
  "city": "Some city",
  "country_code": "US"
}
Error codes
1014 User already verified.
1015 Bad verification params Some verification params didn’t pass validation. user_message property holds additional information.
Upload verification document
Updates one of the verification document. {doc} must be one of gov-id-front, gov-id-back and residence.
Request body should contain document itself (eg. jpeg, pdf, …).

For legal entities set {doc} to 'company'. Multiple documents can be uploaded.
If available, include original filename as X-File-Name or as GET parameter filename, eg. .../api/v1/verification/company?filename=proof.jpg.
PUT https://www.cashila.com/api/v1/verification/{doc}
PUT /api/v1/verification/gov-id-front HTTP/1.1
Host: www.cashila.com
Content-Type: image/jpeg;
Content-Length: {payload length};
API-User: {user token}
API-Nonce: {nonce}
API-Sign: {signature}

JPEG data
List saved recipients
Returns list of saved recipients.
GET https://www.cashila.com/api/v1/recipients
{
  "result": [
    {
      "id": "nananana-n...",
      "name": "Bruce Wayne",
      "address": "1007 Mountain Drive",
      "postal_code": "123",
      "city": "Gotham",
      "country_code": "US",
      "country_name": "United States",
      "last_used": "2015-03-06T15:37:49+0000",
      "label": "Batman" // returned if set
    },
    ...
  ]
}
Get saved recipient details
Returns recipient details.
GET https://www.cashila.com/api/v1/recipients/{id}
{
  "name": "Bruce Wayne",
  "address": "1007 Mountain Drive",
  "postal_code": "123",
  "city": "Gotham",
  "country_code": "US",
  "country_name": "United states"
  "iban": "AT...",
  "bic": "B...",
  "last_used": "2015-03-06T15:37:49+0000", // returned if used
  "label": "Batman" // returned if set
}
Save recipient
Creates or updates recipient. If {id} is present, it must be valid UUID v4. Otherwise one is generated by this method.
PUT https://www.cashila.com/api/v1/recipients/{id}
{
  "name": "Bruce Wayne",
  "address": "1007 Mountain Drive",
  "postal_code": "123",
  "city": "Gotham",
  "country_code": "US",
  "iban": "AT...",
  "bic": "B..."
}
Error codes
1016 Bad recipient params Some recipient params didn’t pass validation. user_message property holds additional information.
Delete recipient
Deletes saved recipient.
DELETE https://www.cashila.com/api/v1/recipients/{id}
List billpays
Returns billpays for last 3 months.
GET https://www.cashila.com/api/v1/billpays
Query parameters (filters), all mutually exclusive
status Returns payments based status. Multiple statuses can specified, separated by comma.
id Returns payments by id. Multiple payments can be specified, separated by comma.
exclude_status Returns payments not having status. Multiple statuses can specified, separated by comma.
Get billpay
Returns billpay details.
GET https://www.cashila.com/api/v1/billpays/{id}
Field explanation
exchange_rate BTC/fiat exchange rate
fee Total fee in fiat currency
valid_until Until when is Cashila receiving coins for payment - after that time billpay is marked as expired. This is only available for pending payments.
details.address Bitcoin address to send BTC to. This is only available for pending payments.
amount_deposited Amount user already deposited in BTC
amount_to_deposit How much more user needs to deposit in BTC
total_amount Total amount in BTC user needs to deposit
recipient Recipient details, this section is not provided for payments with status uploaded
payment Payment details, this section is not provided for payments with status uploaded
attachment Only provided for uploaded payments
attachment.name Provided if known
Payment statuses
pending Waiting for payment, has assigned deposit address and exchange rate
received Payment received
chained First confirmation
confirmed Payment confirmed (enough confirmations were made)
completed Fiat funds sent
expired Payment were not made in time
uploaded Payment from document/picture.
transcribed Payment from document/picture ready for being paid, deposit address and exchange rate not set yet
{
  "result": {
    "id": "A23...",
    "status": "pending",
    "recipient": {
      "name": "Bruce Wayne",
      "address": "1007 Mountain Drive",
      "postal_code": "123",
      "city": "Gotham",
      "country_code": "US",
      "country_name": "United States",
      "label": "Batman" // returned if set
    },
    "payment": {
      "iban": "IBAN account number",
      "bic": "Bank BIC code",
      "reference": "Payment reference",
      "currency": "EUR",
      "amount": 41.9
    },
    "details": {
      "exchange_rate": 230.34,
      "fee": 0.41,
      "created_at": "2015-03-06T15:37:49+0000",
      "valid_until": "2015-03-06T16:07:49+0000",
      "address": "maA2...",
      "amount_deposited": "0.1000",
      "amount_to_deposit": "0.6788",
      "total_amount": "0.7788"
    },
    "attachment": {
      "name": "bill.pdf",
      "mime_type": "application/pdf",
      "url": "https://www.cashila.com/..."
    }
  }
}
Create billpay
Creates billpay. If {id} is present, it must be valid UUID v4. Otherwise one is generated by this method.
You can:
  • specify all parameters
  • just payment details and saved recipient
  • upload photographed bill, will be available for payment after it is processed. Payment initial status will be uploaded.
PUT https://www.cashila.com/api/v1/billpays/create/{id}
{
  "name": "Recipient name",
  "address": "Recipient address",
  "city": "Recipient city",
  "postal_code": "Recipient postal code",
  "country_code": "Recipient country code",
  "iban": "AT...",
  "bic": "B...",
  "amount": 35.3,
  "currency": "EUR",
  "reference": "RF00",    // optional
  "refund": "1abcedf…?"  // optional
}
{
  "based_on" : "{recipient id}",
  "amount": 35.5,
  "currency": "EUR",
  "reference": "RF00",    // optional
  "refund": "1abcedf..."  // optional
}
PUT /api/v1/billpays/create HTTP/1.1
Host: www.cashila.com
Content-Type: image/jpeg;
Content-Length: {payload length};
API-User: {user token}
API-Nonce: {nonce}
API-Sign: {signature}
X-File-Name: {filename} // optional

JPEG data
Error codes
1009 Identifier taken Trying to create resource using identifier which is already in use. Client should generate new UUID and try again.
1001 Resource not found If based_on is specified and no such payment is found on the server, payment will fail.
1005 Bad payment params Some payment params didn’t pass validation. user_message property holds additional information.
Create euro withdraw
Creates billpay. Instead of bitcoins deposit, funds from user balance will be used. If {id} is present, it must be valid UUID v4. Otherwise one is generated by this method.
You can:
  • specify all parameters
  • just payment details and saved recipient
PUT https://www.cashila.com/api/v1/billpays/withdraw/{id}
{
  "name": "Recipient name",
  "address": "Recipient address",
  "city": "Recipient city",
  "postal_code": "Recipient postal code",
  "country_code": "Recipient country code",
  "iban": "AT...",
  "bic": "B...",
  "amount": 35.3,
  "currency": "EUR",
  "reference": "RF00"    // optional
}
{
  "based_on" : "{recipient id}",
  "amount": 35.5,
  "currency": "EUR",
  "reference": "RF00"    // optional
}
Error codes
1009 Identifier taken Trying to create resource using identifier which is already in use. Client should generate new UUID and try again.
1001 Resource not found If based_on is specified and no such payment is found on the server, payment will fail.
1005 Bad payment params Some payment params didn’t pass validation. user_message property holds additional information.
1018 Insufficient euro balance User does not have enough funds on his euro balance.
Delete billpay
Cancel payment. Only uploaded, transcribed, pending and expired (without no amount deposited yet) payments can be canceled.
DELETE https://www.cashila.com/api/v1/billpays/{id}
Error codes
1010 Action forbidden
Revive billpay
Revives payment. If payment is expired, payment becomes pending again. Exchange rate is refreshed and expires time is prolonged.
POST https://www.cashila.com/api/v1/billpays/{id}/revive
Error codes
1010 Payment is not expired or pending
Get webhook details
Returns user’s webhook url.
GET https://www.cashila.com/api/v1/account/web-hook
{
  "result": {
    "url": "http://example.com/..."
  }
}
Update webhook
Updates user’s webhook url.
POST https://www.cashila.com/api/v1/account/web-hook
{
  "result": {
    "url": "http://example.com/..."
  }
}
Delete webhook
Removes user’s webhook url.
DELETE https://www.cashila.com/api/v1/account/web-hook
List deposits
Returns deposits for last 3 months.
GET https://www.cashila.com/api/v1/deposits
Query parameters (filters), all mutually exclusive
status Returns payments based status. Multiple statuses can specified, separated by comma.
id Returns payments by id. Multiple payments can be specified, separated by comma.
exclude_status Returns payments not having status. Multiple statuses can specified, separated by comma.
Get deposit
Get deposit details.
GET https://www.cashila.com/api/v1/deposits/{id}
Field explanation
exchange_rate BTC/fiat exchange rate
valid_until Until when is Cashila receiving coins for payment - after that time billpay is marked as expired. This is only available for pending payments.
details.address Bitcoin address to send BTC to. This is only available for pending payments.
amount_deposited Amount user already deposited in BTC
amount_to_deposit How much more user needs to deposit in BTC
total_amount Total amount in BTC user needs to deposit
deposit Euro amount to be deposited
Deposit statuses
pending Waiting for deposit, has assigned deposit address and exchange rate
received Deposit received
chained First confirmation
confirmed Deposit confirmed (enough confirmations were made)
completed User's account was credited for requested amount
expired Deposit was not made in time
{
  "result": {
    "id": "A23...",
    "status": "pending",
    "deposit": {
      "amount": 41.9,
      "currency": "EUR"
    },
    "details": {
      "created_at": "2015-03-06T15:37:49+0000",
      "updated_at": "2015-03-06T15:37:49+0000",
      "exchange_rate": 230.34,
      "amount_deposited": "0.1000",
      "amount_to_deposit": "0.6788",
      "total_amount": "0.7788"
      "valid_until": "2015-03-06T16:07:49+0000",
      "address": "maA2...",
      "wallet_url": "bitcoin:maA2...?amount=0.6788"
    }
  }
}
Create deposit
Creates deposit. If {id} is present, it must be valid UUID v4. Otherwise one is generated by this method. Amount can only be specified in euros.
PUT https://www.cashila.com/api/v1/deposits/create/{id}
{
  "amount": 35.3,
  "currency": "EUR"
}
Error codes
1009 Identifier taken Trying to create resource using identifier which is already in use. Client should generate new UUID and try again.
1001 Resource not found If based_on is specified and no such payment is found on the server, payment will fail.
1019 Bad deposit params Some deposit params didn’t pass validation. user_message property holds additional information.
Revive deposit
Revives deposit. If deposit is expired, deposit becomes pending again. Exchange rate is refreshed and expires time is prolonged.
POST https://www.cashila.com/api/v1/deposits/{id}/revive
Delete deposit
Cancel deposit. Only pending and expired (without no amount deposited yet) deposits can be canceled.
DELETE https://www.cashila.com/api/v1/deposits/{id}
Error codes
1010 Action forbidden
Create sepa to btc
Creates sepa to btc request. This is direct flow from sepa deposit to btc withdraw. If {id} is present, it must be valid UUID v4. Otherwise one is generated by this method. Amount can be specified in euros.
PUT https://www.cashila.com/api/v1/sepa-to-btc/{id}
{
  "amount": 35.3,
  "currency": "EUR",
  "address": "mt..."
}
Error codes
1009 Identifier taken Trying to create resource using identifier which is already in use. Client should generate new UUID and try again.
1001 Resource not found If based_on is specified and no such payment is found on the server, payment will fail.
1020 Bad params Some params didn’t pass validation. user_message property holds additional information.
Get sepa to btc
Returns information about sepa to btc request.
GET https://www.cashila.com/api/v1/sepa-to-btc/{id}
{
  "result": {
    "id": "A23...",
    "status": "pending",
    "request": {
      "amount": 41.9,
      "currency": "EUR"
    },
    "details": {
      "created_at": "2015-03-06T15:37:49+0000",
      "exchange_rate": 230.34,
      "address": "maA2...",
      "base_amount": "0.18190501",
      "quote_amount": 42.32,
    },
    "recipient": {
      "name": "CASHILA OOD S.R.O.",
      "address": "Jaselska 10",
      "postal_code": "602 00",
      "city": "Brno",
      "country": "Czech Republic"
      "iban": "SI56 6100 0001 0567 139",
      "bic": "CEKOSKBX",
      "reference": "1223..",
      "bank_name": "CSOB Bank a.s.",
      "amount": 42.32,
      "currency": "EUR"
    }
  }
}
Field explanation
exchange_rate BTC/fiat exchange rate
address BTC address where coins will be sent to
base_amount Amount in BTC.
quote_amount Amount in EUR.
Statuses
initial Waiting for sepa deposit
confirming Confirming btc transaction
completed Request completed
Error codes
1009 Identifier taken Trying to create resource using identifier which is already in use. Client should generate new UUID and try again.
1001 Resource not found If based_on is specified and no such payment is found on the server, payment will fail.
1020 Bad params Some params didn’t pass validation. user_message property holds additional information.

Error codes

1001 Requested resource not found.
1002 Bad request
1003 No user specified by API-User header found
1004 HMAC signature invalid/incorrect
1005 Bad invoice params
1006 No user found paired with specified btc address
1007 Server error
1008 Resource exists, but does not support requested method (eg. POST instead of PUT)
1009 Identifier taken
1010 Resource found, but does not (temporary) allow requested action
1011 Access token expired
1012 Bad signup params
1013 User already exist
1014 User already verified.
1015 Bad verification params
1016 Bad recipient params
1017 Another user already paired