This section contains the create, list, get and delete end-points of the bank accounts used when creating a trade and to make payouts:
Bank account object
Example of a bank account object:
{
"id": 1234,
"account": {
"name": "my account",
"type": "danish", // Type of bank account
"currency": "DKK", // Currency of the bank account
"bic": "HIASDMIASD", // Account bic/swift/reg number depending on the type
"number": "1234-34235-3324-2342" // Account number
},
"bank": {
"address": {
"country": "US"
}
},
"holder": {
"name": "John Doe", // Name of the account holder
"address": { // Address of the account holder
"street": "123 Example Street",
"zipcode": "12345",
"city": "Exampleville",
"state": "CA",
"country": "US"
}
},
"update_time": "2016-04-01T12:27:36Z",
"create_time": "2016-04-01T12:23:19Z"
}
Key | Type | Description |
---|---|---|
id | Integer | Identifier for the bank account |
account | Object | Object with additional information about the bank account. |
→name | String | Optional name for the trader to identify the account. |
→type | bank account type | Type of the bank account. |
→currency | String | Currency of the bank account |
→bic | String | For sepa and international its the SWIFT / BIC number and for danish accounts its the REG number. |
→number | String | For sepa and international it's the IBAN (International Bank Account Number). For danish accounts, it's the BBAN (Basic Bank Account Number). |
→ ffc | String | For further credit - only applicable for USD bankaccounts and if required by traders bank |
bank | Object | Object with additional information about the bank. |
→address | Object | Object with information about the address of the bank. |
→country | String | ISO 3166-1 alpha-2 country code |
→state | String | State (Required for country US). |
holder | Object | Object with additional information about the bank account holder. |
→name | String | Name of the bank account holder. |
→address | Object | Object with information about the address of the account holder. |
→street | String | Street address. |
→zipcode | String | Zip/Postal code. |
→city | String | City. |
→state | String | State. (Required for country US) |
→country | String | ISO 3166-1 alpha-2 country code |
updateTime | ISO 8601 time | The time when the bank account was last updated. |
createTime | ISO 8601 time | Timestamp for when this bank account was first created. |
Bank account types
The bank accounts have three different types depending on the account currency (account.currency
) and the bank country (bank.address.country
).
When creating a new bank account, you don't explicitly specify the type; instead Coinify decides the type for you, based on the requirements in the following table:
Type | Description | Requirements |
---|---|---|
danish | Danish national bank account | Country must be DK and currency DKK . |
sepa | SEPA bank account | Country must be in our list of SEPA countries, and currency must be EUR . |
international | International bank account | Everything else. |
Create bank account
Example request to
POST /bank-accounts
{
"account": {
"name": "my bank account",
"currency": "DKK", // Currency of the bank account
"bic": "6456", // Account REG number
"number": "12345435345345" // Account number
},
"bank": {
"address": { // Address of the bank
"country": "DK"
}
},
"holder": {
"name": "John Doe", // Name of the account holder
"address": { // Address of the account holder
"street": "123 Example Street",
"zipcode": "12345",
"city": "Exampleville",
"state": "CA",
"country": "US"
}
}
}
Example response for the above request
{
"id": 12345, // Identifier of the bank account
"account": {
"name": "my bank account",
"type": "danish", // Type of bank account
"currency": "DKK", // Currency of the bank account
"bic": "6456", // Account bic/swift/reg number depending on the type
"number": "12345435345345" // Account number
},
"bank": {
"address": { // Address of the bank
"country": "DK"
}
},
"holder": {
"name": "John Doe", // Name of the account holder
"address": { // Address of the account holder
"street": "123 Example Street",
"zipcode": "12345",
"city": "Exampleville",
"state": "CA",
"country": "US"
}
},
"update_time": "2016-04-01T12:27:36Z",
"create_time": "2016-04-01T12:23:19Z"
}
POST https://app-api.coinify.com/bank-accounts
On success, the endpoint returns the newly created bank-account object.
Some of the fields are only required if the bank account is of type international see account-types.
How to create a bank account in Sandbox
To create a bank account in Sandbox you can use the fake account details from the example request body on the right.
You can also create a fake bank account with your own preferred details. However, bank accounts in sandbox must follow the basic bank account rules from the real world for a particular country.
Follow these guidelines to create your own fake bank account in sandbox:
- The bank account currency must be supported by Coinify. You can retrieve this info by calling the Payment Methods endpoint.
- The Bank SWIFT/BIC code must contain a valid country code on the 5th and 6th character of the code itself, e.g
XXXXDKXX
and the valid length is 8 or 11 chars. - IBAN account number should start with a valid 2-letter country code. The IBAN country code must match the country code from which the bank’s SWIFT/BIC code originates. E.g. if the bank’s BIC code is from Denmark, the IBAN should start with “DK”.
- The IBAN must be from a Coinify supported country. See Supported Countries list.
- The IBAN account number must have a length which is valid for the specific country.
You can easily look up the SWIFT/BIC bank codes and IBAN basic structure for a specific country online.
Request object
The parameters in the request object are as follows:
Parameter | Type | Default | Description |
---|---|---|---|
account | Object | Required | Object with additional information about the bank account. |
→name | String | Optional | Optional name for the trader to identify the account. |
→currency | String | Required | Currency of the bank account. |
→bic | String | Required | For sepa and international it's the SWIFT / BIC number and for danish accounts it's the REG number. |
→number | String | Required | For sepa and international it's the IBAN (International Bank Account Number). For danish accounts, it's the BBAN (Basic Bank Account Number). |
→ffc | String | For further credit - only applicable for USD bankaccounts and if required by traders bank | |
bank | Object | Required for non-SEPA payments | Object with additional information about the bank. |
→address | Object | Required | Object with information about the address of bank. |
→country | String | Required | ISO 3166-1 alpha-2 country code |
→state | String | State (Required for country US). | |
holder | Object | Required | Object with additional information about the bank account holder. |
→name | String | Required | Name of the bank account holder. |
→address | Object | Required | Object with information about the address of the account holder. |
→street | String | Required | Street address. |
→zipcode | String | Optional | Zip/Postal code. |
→city | String | Required | City. |
→state | String | Required | State. Required for country US |
→country | String | Required | ISO 3166-1 alpha-2 country code. |
HTTP Response code | JSON data |
---|---|
201 Created | Success, response as shown to the right. |
400 Bad request | Error, interpreting the request (missing parameters). |
401 Unauthorized | Error, access token missing. |
HTTP status code | Error code | Description |
---|---|---|
400 | missing_argument | There was something wrong with the signup request. See the error_description argument for a specific, human-readable error message. |
400 | invalid_argument | There was something wrong with the signup request. See the error_description argument for a specific, human-readable error message. |
400 | invalid_iban | Provided account.number is an invalid IBAN. This is only for SEPA countries. |
List bank accounts
Example request for
GET /bank-accounts
[
{
"id": 12345, // Identifier of the bank account
"account": {
"type": "danish", // Type of bank account
"currency": "DKK", // Currency of the bank account
"bic": "6456", // Account bic/swift/reg number depending on the type
"number": "12345435345345" // Account number
},
"bank": {
"address": { // Address of the bank
"country": "DK"
}
},
"holder": {
"name": "John Doe", // Name of the account holder
"address": { // Address of the account holder
"street": "123 Example Street",
"zipcode": "12345",
"city": "Exampleville",
"state": "CA",
"country": "US"
}
},
"update_time": "2016-04-01T12:27:36Z",
"create_time": "2016-04-01T12:23:19Z"
},
{
// Next bank-account...
}
]
GET https://app-api.coinify.com/bank-accounts
On success, the endpoint returns a list of bank-account objects for the current trader.
The accounts are ordered by id
(highest first).
HTTP Response code | JSON data |
---|---|
200 OK | Success, response as shown to the right. |
401 Unauthorized | Error, access token missing. |
404 Not found | Error, no bank accounts found. |
Get bank account
Example request for
GET /bank-accounts/12345
{
"id": 12345, // Identifier of the bank account
"account": {
"type": "danish", // Type of bank account
"currency": "DKK", // Currency of the bank account
"bic": "6456", // Account bic/swift/reg number depending on the type
"number": "12345435345345" // Account number
},
"bank": {
"address": { // Address of the bank
"country": "DK"
}
},
"holder": {
"name": "John Doe", // Name of the account holder
"address": { // Address of the account holder
"street": "123 Example Street",
"zipcode": "12345",
"city": "Exampleville",
"state": "CA",
"country": "US"
}
},
"update_time": "2016-04-01T12:27:36Z",
"create_time": "2016-04-01T12:23:19Z"
}
GET https://app-api.coinify.com/bank-accounts/<id>
On success, the endpoint returns a bank-account object.
HTTP Response code | JSON data |
---|---|
200 OK | Success, response as shown to the right. |
401 Unauthorized | Error, access token missing. |
403 Forbidden | Error, the supplied access token doesn’t have the rights to delete this bank-account. |
404 Not found | Error, bank-account is not found. |
Delete bank account
DELETE https://app-api.coinify.com/bank-accounts/<id>
Deletes a bank account.
HTTP Response code | Description |
---|---|
204 No Content | Success, empty response. |
401 Unauthorized | access token missing. |
403 Forbidden | The supplied access token doesn’t have the rights to delete this bank-account. |
404 Not found | bank-account is not found. |