Transactions

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

amount

String

Transaction amount.

Not Null

appId

String

Application ID. Format: uuid.

code

String

Transaction code.

Enum:[deposit:stablecoin:usdc, deposit:wire:usd]

createdAt

DateTime

Transaction created at date.

Not Null

currency

String

Transaction currency.

Enum:[USD]

deletedAt

DateTime

Transaction deleted at date.

destinationAddress

String

Transaction destination address.

addressId

String

Transaction address id.

externalReference

String

Transaction external reference.

id

String

Transaction identifier. Format: uuid.

Not Null

identityId

String

Transaction identity owner. Format: uuid

metadata

Object

Transaction metadata.

originAddress

String

Transaction origin address.

status

String

Transaction status.

Enum:[pending, approved, confirmed, failed, canceled, review]

transactionHash

String

Transaction hash.

type

String

Transaction type.

Enum:[deposit, transfer, withdrawal]

updatedAt

DateTime

Transaction updated at date.

Not Null

Get the list of all transactions

GET /transactions

Get transactions list.

Available filters

Name
Type
Example

addressId

default

filter[addressId]=foobar

code

default,in,nin

filter[code]=in:foobar

currency

default,in,nin

filter[currency]=nin:foobar

destinationAddress

default,in,nin

filter[destinationAddress]=foobar

earnDistributionId

default

filter[earnDistributionId]=foobar

id

default,in,nin

filter[id]=foobar

identityId

default,in,nin

filter[identityId]=foobar

originAddress

default,in,nin

filter[originAddress]=foobar

originTransactionId

default

filter[originTransactionId]=foobar

status

default,in,nin

filter[status]=in:foobar

transactionHash

default,in,nin

filter[transactionHash]=in:foobar

type

default,in,nin

filter[type]=in:foobar

Available sorts

Name
Example

createdAt

sort=createdAt sort=-createdAt

updatedAt

sort=updatedAt sort=-updatedAt

Available includes

Name
Example

address

include=address

Paginate options

Name
Description
Example

size

Defines the number of results per page. Default = 30.

page[size]=2

number

Defines the number of the page to retrieve. Default = 1

page[number]=2

all

Return all identities without pagination

all=true

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

Name
Example

address

include=address

Response Options

400 Bad Request

  • validation_failed

    • If id is invalid.

404 Not Found

  • transaction_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

amount

String

Transaction amount.

Not null

true

chain

String

Transaction chain.

[ALGO,AVAX,ETH,SOL,TRX,XLM]. Only for stablecoin transactions

code

String

Transaction code.

[deposit:stablecoin:usdc,deposit:wire:usd]

true

currency

String

Transaction currency

[USD]

true

destinationAddress

String

Transaction destination address.

true

identityId

String

Transaction identity owner. Format: uuid

true

originAddress

String

Transaction origin address.

paymentMethod

String

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"
  }
}

Last updated