Withdrawals (deprecated)

The following endpoints are used to insert and retrieve entries representing withdrawals from the database.

POST /withdrawals
POST /withdrawals/:id/submit
GET /withdrawals/:id
GET /withdrawals

The withdrawal object

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

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

{
    "id": "2642dedd-4fa0-40bf-8b15-7c0513bcdb38",
    "identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
    "transactionReference": "0xf6cce2d20d2714fa7be8e1bb8b8cf0abbb12ca3d34d000073742a4da954c1be5",
    "blockchainAddress": "0x8ba13aB181E9F30e543C6376Cd408192E95bCD1C",
    "amount": null,
    "currency": "USD",
    "transactionHash": null,
    "transferInformation": {
        "transferType": "wire",
		    "bankAccountName": "Jonh do bank",
		    "bankAccountNumber": "1321312312321312",
		    "routingNumber": "123456789"
    },
    "status": "prepared",
    "createdAt": "2020-02-19T11:43:04.553Z",
    "updatedAt": "2020-02-19T11:43:04.553Z"
}

POST /withdrawals

POST [ENVIRONMENT HOSTNAME]/withdrawals

This endpoint allows you to add a new withdrawal to the database. If all the params are valid, a new record will be inserted in the database with the withdrawal information. This will return a transaction reference that needs to be provided to the transaction when performing the burn token action in the blockchain.

Request Body

Name
Type
Description

blockchainAddress

string

Address where the money will be withdrawn

currency

string

Currency of the funds to withdraw

identityId

string

Id of the identity associated to the request

transferInformation

object

Object containing the information of the transfer

Example Call

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

POST /withdrawals/:id/submit

POST [ENVIRONMENT HOSTNAME]/withdrawals/:id/submit

This method can be used to submit a withdrawal after the tokens were burned in the blockchain. This endpoint receives the transactionHash of the burn operation has a body parameter. This will be used to check if the transaction operation matches the data provided when creating the withdrawal request.

Path Parameters

Name
Type
Description

id

string

Withdrawal id to be submitted

Request Body

Name
Type
Description

transactionHash

string

Transaction hash of the burn operation

Example Call

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

GET /withdrawals/:id

GET [ENVIRONMENT HOSTNAME]/withdrawals/:id

This endpoint retrieves a single withdrawal that you've created by its specific id attribute.

Path Parameters

Name
Type
Description

id

string

Id of the withdrawal to be fetched

Example Call

GET /withdrawals

GET [ENVIRONMENT HOSTNAME]/withdrawals/

This endpoint returns a list of all withdrawals submitted by you. This endpoint supports pagination.

Example call

Last updated

Was this helpful?