Deposits

To initiate a deposit, create a deposit object via the /deposits endpoint. If you want to create an ACH type deposit, you need to have created at least one transfer method in order to make a deposit.

ENDPOINTS
ENDPOINTS
POST /deposits
GET /deposits/:id
GET /deposits

The deposit object

The deposit object represents a request for depositing fiat into the blockchain. You can create or retrieve an identityId's deposits via request to the API. Or, if you manage multiple identities in the network, you can also retrieve a list of deposits for all of them.

Deposits are identified by a unique, random id, and relate to a user's identityId

DEPOSITS OBJECT
DEPOSITS OBJECT
{
"id": "ea5894d2-2657-424a-906e-0f9c345ab48b",
"identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
"amount": "11",
"currency": "USD",
"blockchainAddress": "0xF2A511240E0D6b7E9683Ff979b4C4Afb9d3fE2E9",
"message": null,
"status": "waiting",
"fundsTransferDetails": null,
"reference": null,
"transferInformation": {
"transferType": "wire",
},
"createdAt": "2020-02-19T11:15:08.144Z",
"updatedAt": "2020-02-19T11:15:08.144Z"
}

post
POST /deposits

[ENVIRONMENT HOSTNAME]/deposits
This endpoint allows you to add a new deposit to the database. If all the params are valid, a new record will be inserted in the database with the deposit information.
Request
Response
Request
Body Parameters
amount
required
string
Amount of the deposit
currency
required
string
Currency associated to the deposit funds
identityId
required
string
Id of the identity associated to the deposit
blockchainAddress
required
string
Blockchain address to where the funds will be minted
transferInformation
required
object
Deposit transfer information
Response
200: OK
Deposit successfully inserted in the database.
{
"id": "ea5894d2-2657-424a-906e-0f9c345ab48b",
"identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
"transferMethodId": null,
"amount": "11",
"currency": "USD",
"blockchainAddress": "0xF2A511240E0D6b7E9683Ff979b4C4Afb9d3fE2E9",
"message": null,
"status": "waiting",
"fundsTransferDetails": null,
"reference": null,
"transferType": "wire",
"createdAt": "2020-02-19T11:15:08.144Z",
"updatedAt": "2020-02-19T11:15:08.144Z"
}
400: Bad Request
Response given when any of the parameters is invalid.
{
"code": "invalid_data_format",
"status": "400"
}
500: Internal Server Error
Error when calling the API.
{
"code": "internal_server_error",
"status": "500"

Example Call

Request
Curl
Response
Request
POST [ENVIRONMENT HOSTNAME]/deposits
// BODY for Wire deposits
{
"amount": "11",
"currency": "USD",
"identityId": "{{identityId}}",
"blockchainAddress": "0xF2A511240E0D6b7E9683Ff979b4C4Afb9d3fE2E9",
"transferInformation": {
"transferType": "wire"
}
}
Curl
curl -X POST \
[ENVIRONMENT HOSTNAME]/deposits \
-H 'Content-Type: application/json' \
-H 'apikey: {INSERT API KEY HERE}' \
-d '{
"amount": "12",
"currency": "USD",
"identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
"blockchainAddress": "0xA4597E696a55fD76430945e0940DA17c72337ccC",
"transferInformation": {
"transferType": "wire"
}
}'
Response
{
"id": "ee1ce972-0dfc-45fc-98bf-0fc90a7f86db",
"identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
"amount": "12",
"currency": "USD",
"blockchainAddress": "0x6257EaCbB030ed1B33d11Aa841B2511B1B444937",
"message": null,
"status": "waiting",
"fundsTransferDetails": null,
"reference": null,
"transferInformation": {
"transferType": "wire"
},
"createdAt": "2020-02-19T11:17:20.567Z",
"updatedAt": "2020-02-19T11:17:20.567Z"
}

On the Sandbox environment, you can use the settle deposit endpoint to simulate and settle the deposit request you created.

On the Sandbox environment, you can use the approve KYC endpoint to simulate and approve the identity you created.

get
GET /deposits/:id

[ENVIRONMENT HOSTNAME]/deposits/:id
This endpoint retrieves a single deposit that you've created by its specific id attribute.
Request
Response
Request
Response
200: OK
{
"id": "ee1ce972-0dfc-45fc-98bf-0fc90a7f86db",
"identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
"amount": "12",
"currency": "USD",
"blockchainAddress": "0x6257EaCbB030ed1B33d11Aa841B2511B1B444937",
"message": null,
"status": "pending",
"fundsTransferDetails": null,
"reference": null,
"transferInformation": {
"transferType": "wire"
},
"createdAt": "2020-02-19T11:17:20.567Z",
"updatedAt": "2020-02-19T11:17:21.241Z"
}

Example Call

Request
Curl
Response
Request
GET [ENVIRONMENT HOSTNAME]/deposits/b22d80d9-0e14-4e4f-8101-881dd7138bc5
Curl
curl -X GET \
[ENVIRONMENT HOSTNAME]/deposits/7b6bbb41-b0e0-4058-b59e-ea3181f854ec \
Response
{
"id": "ee1ce972-0dfc-45fc-98bf-0fc90a7f86db",
"identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
"amount": "12",
"currency": "USD",
"blockchainAddress": "0x6257EaCbB030ed1B33d11Aa841B2511B1B444937",
"message": null,
"status": "pending",
"fundsTransferDetails": null,
"reference": null,
"transferInformation": {
"transferType": "wire"
},
"createdAt": "2020-02-19T11:17:20.567Z",
"updatedAt": "2020-02-19T11:17:21.241Z"
}

get
GET /deposits

[ENVIRONMENT HOSTNAME]/deposits
This endpoint returns a list of all your deposits.
Request
Response
Request
Response
200: OK
{
"total": 1,
"data": [
{
"id": "a1132d6d-adfc-4ba9-b1ca-e82eaac8199d",
"identityId": "e0564926-96e0-42e2-a544-68bc18598e40",
"amount": "12.12",
"currency": "USD",
"blockchainAddress": "0x6257EaCbB030ed1B33d11Aa841B2511B1B444937",
"message": null,
"status": "waiting",
"fundsTransferDetails": null,
"reference": null,
"transferInformation": {
"transferType": "wire"
},
"createdAt": "2020-01-24T18:02:22.870Z",
"updatedAt": "2020-01-24T18:02:22.870Z"
}
]
}

Example Call

Request
Curl
Response
Request
GET [ENVIRONMENT HOSTNAME]/deposits
// PAGINATED
GET [ENVIRONMENT HOSTNAME]/deposits?page[number]=1&page[size]=1
Curl
curl -X GET \
[ENVIRONMENT HOSTNAME]/deposits/7b6bbb41-b0e0-4058-b59e-ea3181f854ec \
-H 'apikey: {INSERT API KEY HERE}'
Response
{
"total": 1,
"data": [
{
"id": "a1132d6d-adfc-4ba9-b1ca-e82eaac8199d",
"identityId": "e0564926-96e0-42e2-a544-68bc18598e40",
"amount": "12.12",
"currency": "USD",
"blockchainAddress": "0x6257EaCbB030ed1B33d11Aa841B2511B1B444937",
"message": null,
"status": "waiting",
"fundsTransferDetails": null,
"reference": null,
"transferInformation": {
"transferType": "wire"
},
"createdAt": "2020-01-24T18:02:22.870Z",
"updatedAt": "2020-01-24T18:02:22.870Z"
}
]
}