Asset Activities

Asset Activities are actions that have been taken in relation to an asset. These range from transactions, to status changes, to redemption of an asset.

Asset Activity Model

All Asset Activities extend this base model. This contains all properties that are shared between the activities

Attributes

  • assetId

    string

    ID of the Asset the activity is for

  • activityNumber

    string

    Unique sequential Asset activity number

  • createdAt

    timestamp

    When the Activity was created.

  • createdBy

    string

    The service that created the activity

  • activityType

    string
  • accountId

    string

    The account that owns the asset

Asset Transaction Activity Model

The destParty and srcParty are optionally provided only on transactions of type transfer. Values may include a merchant name, user handle, masked user email, masked user phone, or bank account.

The otherParty is optionally provided only on transactions of type increment-balance and decrement-balance. Values may include bank account number.

This extends the asset activity model

Attributes

  • ref

    string

    ID of the Centrapay resource that initiated the transaction.

  • refType

    string

    Name of the Centrapay resource that initiated the transaction.

  • type

    string

    Type of the Asset Transaction. Supported values are increment-balance, decrement-balance and transfer.

  • kind

    string

    Human readable value indicating the reason for the transaction.

  • srcAssetId

    string

    ID of the source asset.

  • destAssetId

    string

    ID of the destination asset.

  • srcParty

    string

    Display value for party providing funds.

  • destParty

    string

    Display value for party receiving funds.

  • otherParty

    string

    Display value for party providing or receiving funds.

  • amount

    string

    Amount of transaction in cents.

Token Refunded Activity Model

This records the refunding of a token. Used when activityType is token. This extends the Asset Activity Model

Attributes

  • idempotencyKey

    string

    Client-supplied identifier that prevents double creation

  • action

    string

    type of action for token activities. Will be refund for all new activities

Token Redeemed Activity Model

This records the redeeming of a token. Used when activityType is token-redeemed. This extends the Asset Activity Model

Attributes

  • idempotencyKey

    string

    Client-supplied identifier that prevents double creation.

  • lineItems

    array

    The Line Items being paid for

Asset Created Activity Model

This records the creation of an asset. Used when activityType is created. This extends the Asset Activity Model

Attributes

  • status

    string

    The current status of the asset

Asset Received Activity Model

This records the receiving of an asset. Used when activityType is received. This extends the Asset Activity Model

Attributes

  • recipientAlias

    string

    The alias of the user who received the asset

  • recipientAccountId

    string

    The accountId of the user who received the asset

  • senderAccountId

    string

    The accountId of the user who sent the asset

  • sender

    string

    The name of the user who sent the asset

  • status

    string

    The current status of the asset

Asset Sent Activity Model

This records the sending of an asset. Used when activityType is sent. This extends the Asset Activity Model

Attributes

  • recipientAlias

    string

    The alias of the user who received the asset

  • senderAccountId

    string

    The accountId of the user who sent the asset

  • sender

    string

    The name of the user who sent the asset

  • status

    string

    The current status of the asset

Asset Activity Types

NameDescription
token Token was refunded. Uses Token refunded Model
value-in Asset value has been increased. Uses Asset Transaction Model
value-out Asset value has been decreased. Uses Asset Transaction Model
archive-asset Asset was archived. Uses Asset Activity Model
activate-asset Asset was activated. Uses Asset Activity Model
disable-asset Asset was activated. Uses Asset Activity Model
token-redeemed Token was redeemed. Uses Token Redeemed Model
created Asset was created. Uses Asset Created Model
received Asset was received. Uses Asset Received Model
sent Asset was sent. Uses Asset Sent Model

List Asset Transactions experimental

Returns a paginated list of Asset Transactions . This endpoint is currently only supported for quartz asset types.

Request
curl -X GET \
https://service.centrapay.com/api/assets/WRhAxxWpTKb5U7pXyxQjjY/transactions \
-H 'x-api-key: <TOKEN>'
Response
{
"items": [
{
"ref": "adRGJqMyMhmGfnDXasRZ",
"type": "transfer",
"kind": "refund",
"refType": "payment-request",
"assetId": "WRhAxxWpTKb5U7pXyxQjjY",
"srcParty": "Coffee Ltd",
"destParty": "crn::user:5a3b1ba7-d01k-409f-ld0a-jd81k0ald",
"createdAt": "2022-03-31T20:36:08.562Z",
"createdBy": "crn::service:payments-api",
"srcAssetId": "Jd9a89ZESjjCuUD9DJD9Al",
"destAssetId": "WRhAxxWpTKb5U7pXyxQjjY",
"amount": "2000",
"activityType": "value-in",
"activityNumber": "3"
},
{
"ref": "adRGJqMyMhmGfnDXasRZ",
"type": "transfer",
"kind": "payment",
"refType": "payment-request",
"assetId": "WRhAxxWpTKb5U7pXyxQjjY",
"srcParty": "crn::user:5a3b1ba7-d01k-409f-ld0a-jd81k0ald",
"destParty": "Coffee Ltd",
"createdAt": "2022-03-31T20:35:54.717Z",
"createdBy": "crn::service:payments-api",
"srcAssetId": "WRhAxxWpTKb5U7pXyxQjjY",
"destAssetId": "Jd9a89ZESjjCuUD9DJD9Al",
"amount": "3000",
"activityType": "value-out",
"activityNumber": "2"
},
{
"ref": "H4SZKwMcU9VCmnGEqDA7Mn",
"type": "increment-balance",
"kind": "topup",
"refType": "topup",
"assetId": "WRhAxxWpTKb5U7pXyxQjjY",
"createdAt": "2022-03-31T02:37:47.207Z",
"createdBy": "crn::application:rhea",
"destAssetId": "WRhAxxWpTKb5U7pXyxQjjY",
"amount": "7600",
"activityType": "value-in",
"activityNumber": "1"
}
]
}

List Asset Activities

Returns a paginated list of Asset Activities .

Query Parameters

Attributes

  • bankAccountId

    string

    The bankAccountId of the assets that activities should be returned for.

Request
curl -X GET \
https://service.centrapay.com/api/asset-activities \
-H 'x-api-key: <TOKEN>'
Response
{
"items": [
{
"ref": "C2kaVDzGaCpJLSbBfusu5W",
"type": "transfer",
"kind": "payment",
"refType": "payment-request",
"assetId": "ExVHwdGEFugJWVXWi4riNq",
"srcParty": "crn::user:46d42f1f-2816-4ce9-9781-fe93e8ebb0c6",
"destParty": "Dev Smoke Test Merchant",
"createdAt": "2023-11-28T21:18:40.583Z",
"accountId": "6QXN8cq8XVwEJeYe3XH9fe",
"createdBy": "crn::service:payments-api",
"srcAssetId": "ExVHwdGEFugJWVXWi4riNq",
"destAssetId": "WTNEcn8HHd2YgVsKRyvcPh",
"amount": "1",
"activityType": "value-out",
"activityNumber": "2",
"bankAccountId": "7GEDRsP9cyB9fScBziSmJa"
},
{
"ref": "9qyT2gthTt4Dv7AX5U1zkY",
"type": "transfer",
"kind": "payment",
"refType": "payment-request",
"assetId": "ExVHwdGEFugJWVXWi4riNq",
"srcParty": "crn::user:46d42f1f-2816-4ce9-9781-fe93e8ebb0c6",
"destParty": "Dev Smoke Test Merchant",
"createdAt": "2023-11-28T03:37:23.145Z",
"accountId": "6QXN8cq8XVwEJeYe3XH9fe",
"createdBy": "crn::service:payments-api",
"srcAssetId": "ExVHwdGEFugJWVXWi4riNq",
"destAssetId": "WTNEcn8HHd2YgVsKRyvcPh",
"amount": "1",
"activityType": "value-out",
"activityNumber": "3",
"bankAccountId": "7GEDRsP9cyB9fScBziSmJa"
},
{
"assetId": "WxPhZtcBsf19yXjo8gVv9Y",
"activityNumber": "1",
"createdAt": "2022-11-07T22:12:57.224Z",
"createdBy": "crn::application:rhea",
"activityType": "created",
"accountId": "6QXN8cq8XVwEJeYe3XH9fe",
"status": "active"
}
]
}