The following endpoints are use to create and retrieve transactions from the system.
The transaction
object
The transaction
object represents an operation (deposit or withdrawal) executed by it's identity owner.
Transaction entity model
Name | Type | Description | Constraints |
---|
| | | |
| | Application ID. Format: uuid . | |
| | | Enum:[deposit:stablecoin:usdc , deposit:wire:usd ] |
| | Transaction created at date. | |
| | | |
| | Transaction deleted at date. | |
| | Transaction destination address. | |
| | | |
| | Transaction external reference. | |
| | Transaction identifier. Format: uuid . | |
| | Transaction identity owner. Format: uuid | |
| | | |
| | Transaction origin address. | |
| | | Enum:[pending , approved , confirmed , failed , canceled , review ] |
| | | |
| | | Enum:[deposit , transfer , withdrawal ] |
| | Transaction updated at date. | |
Get the list of all transactions
GET /transactions
Get transactions list.
Available filters
Name | Type | Example |
---|
| | |
| | |
| | filter[currency]=nin:foobar
|
| | filter[destinationAddress]=foobar
|
| | filter[earnDistributionId]=foobar
|
| | |
| | filter[identityId]=foobar
|
| | filter[originAddress]=foobar
|
| | filter[originTransactionId]=foobar
|
| | |
| | filter[transactionHash]=in:foobar
|
| | |
Available sorts
Name | Example |
---|
| sort=createdAt
sort=-createdAt
|
| sort=updatedAt
sort=-updatedAt
|
Available includes
Paginate options
Name | Description | Example |
---|
| Defines the number of results per page. Default = 30. | |
| Defines the number of the page to retrieve. Default = 1 | |
| Return all identities without pagination | |
Response Options
200 OK
Request example:
GET <hostname>/transactions
Response example:
{
"data": [{
"addressId": null,
"amount": "10.00000000",
"appId": "e7941059-74c6-4b3f-b029-d3aa03d1ea44",
"code": "deposit:internal:usd",
"createdAt": "2020-10-28T17:40:55.501Z",
"currency": "USD",
"deletedAt": null,
"destinationAddress": "0x71c7656ec7ab88b098defb751b7401b5f6d8976f",
"earnDistributionId": null,
"externalReference": null,
"id": "e7941059-74c6-4b3f-b029-d3aa03d1ea44",
"identityId": "e7941059-74c6-4b3f-b029-d3aa03d1ea44",
"metadata": {},
"originAddress": null,
"status": "pending",
"transactionHash": "0xb5c8bd9430b6cc87a0e2fe110ece6bf527fa4f170a4bc8cd032f768fc5219838",
"type": "deposit",
"updatedAt": "2020-10-28T17:40:55.501Z"
}],
"total": 1
}
Get one specific transaction
GET /transactions/:id
Get transaction by id.
Available includes
Response Options
400 Bad Request
404 Not Found
200 OK
Request example:
GET <hostname>/transactions/e7941059-74c6-4b3f-b029-d3aa03d1ea44
Response example:
{
"data": {
"addressId": null,
"amount": "10.00000000",
"appId": "e7941059-74c6-4b3f-b029-d3aa03d1ea44",
"code": "deposit:internal:usd",
"createdAt": "2020-10-28T17:40:55.501Z",
"currency": "USD",
"deletedAt": null,
"destinationAddress": "0x71c7656ec7ab88b098defb751b7401b5f6d8976f",
"earnDistributionId": null,
"externalReference": null,
"id": "e7941059-74c6-4b3f-b029-d3aa03d1ea44",
"identityId": "e7941059-74c6-4b3f-b029-d3aa03d1ea44",
"metadata": {},
"originAddress": null,
"status": "pending",
"transactionHash": "0xb5c8bd9430b6cc87a0e2fe110ece6bf527fa4f170a4bc8cd032f768fc5219838",
"type": "deposit",
"updatedAt": "2020-10-28T17:40:55.501Z"
}
}
Create a new transaction
POST /transactions
Creates a transaction.
Request Parameters
Body parameters
Name | Type | Description | Constraints | Required |
---|
| | | | |
| | | [ALGO ,AVAX ,ETH ,SOL ,TRX ,XLM ]. Only for stablecoin transactions | |
| | | [deposit:stablecoin:usdc ,deposit:wire:usd ] | |
| | | | |
| | Transaction destination address. | | |
| | Transaction identity owner. Format: uuid | | |
| | Transaction origin address. | | |
| | Transaction payment method. | [wire ,internationalWire ]. Only for Wire transactions | |
Response Options
400 Bad Request
validation_failed
If the required parameters are not provided.
If additional parameters are provided.
If some of the parameters type is invalid.
If some of the parameters constraints is not respected.
422 Unprocessable Entity
chain_is_not_available
If the request chain is not active.
200 OK
Request example:
POST <hostname>/transactions
{
"amount": "10",
"chain": "XLM",
"code": "deposit:stablecoin:usdc",
"currency": "USD",
"destinationAddress": "0x71c7656ec7ab88b098defb751b7401b5f6d8976f",
"identityId": "e7941059-74c6-4b3f-b029-d3aa03d1ea44"
}
Response example:
{
"data": {
"addressId": "e7941059-74c6-4b3f-b029-d3aa03d1ea42",
"amount": "10.00000000",
"appId": "e7941059-74c6-4b3f-b029-d3aa03d1ea44",
"code": "deposit:stablecoin:usdc",
"createdAt": "2020-10-28T17:40:55.501Z",
"currency": "USD",
"deletedAt": null,
"destinationAddress": "0x71c7656ec7ab88b098defb751b7401b5f6d8976f",
"externalReference": null,
"id": "e7941059-74c6-4b3f-b029-d3aa03d1ea44",
"identityId": "e7941059-74c6-4b3f-b029-d3aa03d1ea44",
"metadata": {
"addressId": "e7941059-74c6-4b3f-b029-d3aa03d1ea42",
"transactionDetails": {
"address": "0x99c7656ec7ab88b098defb751b7401b5f6d8976f",
"addressTag": "xyyz"
}
},
"originAddress": null,
"status": "pending",
"transactionDetails": {
"address": "0x99c7656ec7ab88b098defb751b7401b5f6d8976f",
"addressTag": "xyyz"
},
"transactionHash": null,
"type": "deposit",
"updatedAt": "2020-10-28T17:40:55.501Z"
}
}
Request example:
POST <hostname>/transactions
{
"amount": "10",
"code": "deposit:wire:usd",
"currency": "USD",
"destinationAddress": "0x71c7656ec7ab88b098defb751b7401b5f6d8976f",
"identityId": "e7941059-74c6-4b3f-b029-d3aa03d1ea44",
"paymentMethod": "wire"
}
Response example:
{
"data": {
"addressId": "e7941059-74c6-4b3f-b029-d3aa03d1ea42",
"amount": "10.00000000",
"appId": "e7941059-74c6-4b3f-b029-d3aa03d1ea44",
"code": "deposit:wire:usd",
"createdAt": "2020-10-28T17:40:55.501Z",
"currency": "USD",
"deletedAt": null,
"destinationAddress": "0x71c7656ec7ab88b098defb751b7401b5f6d8976f",
"externalReference": "e7941059-74c6-4b3f-b029-d3aa03d1ea43",
"id": "e7941059-74c6-4b3f-b029-d3aa03d1ea44",
"identityId": "e7941059-74c6-4b3f-b029-d3aa03d1ea44",
"metadata": {
"paymentMethod": "wire",
"transactionDetails": {
"bankName": "ROYAL BUSINESS BANK",
"reference": "CUSCTW6GA",
"swiftCode": "RBBCUS6L",
"bankAccountName": "Prime Trust, LLC",
"bankAccountNumber": "2030136050"
}
},
"originAddress": null,
"status": "pending",
"transactionDetails": {
"bankName": "ROYAL BUSINESS BANK",
"reference": "CUSCTW6GA",
"swiftCode": "RBBCUS6L",
"bankAccountName": "Prime Trust, LLC",
"bankAccountNumber": "2030136050"
},
"transactionHash": null,
"type": "deposit",
"updatedAt": "2020-10-28T17:40:55.501Z"
}
}