Link Search Menu Expand Document

Asset Categories

Centrapay digital assets are categorized as either Money, Gift Cards or Tokens. Depending on the asset category it will have different attributes available and different rules governing how they can be obtained, shared or spent.

Contents

Asset Model

All assets have the following fields along with the additional fields that are specific to its category.

Required Fields

Field Type Description
id String The asset’s unique identifier.
accountId String The asset’s owning Centrapay account id.
category String Asset category (“money”, “giftcard”, or “token”).
type String Asset type id used by payment option asset types.
liveness String Either “main” (live payments allowed) or “test”.
description String Displayable asset description.
createdAt Date String Date when the asset was created or issued.
status String “active” if the asset can be used for payments.

Money

Money assets, being backed by real currency, are the most flexible asset types. Money assets can be exchanged relatively freely within the same asset type.

Required Fields

Beyond the base fields, money assets also have the following:

Field Type Description
currency String Currency code, eg “NZD”
balance Numeric String Current balance in the currency’s smallest denomination (ie. cents).

Gift Cards

Gift cards are similar to money but have greater spending restrictions and are not always backed by real currency. Gift cards usually have an expiry date, are typically tied to a small number of merchants, and can only be sent in their entirety.

Beyond the base fields, gift card assets also have the following fields.

Required Fields

Field Type Description
issuer String The identifier for the issuer of the gift card.
currency String Currency code, eg “NZD”
balance Numeric String Current balance in the currency’s smallest denomination (ie. cents).
initialBalance Numeric String The balance when the asset was created.

Optional Fields

Field Type Description
externalId String The asset identifier from the issuing system.
expiresAt Date String The date when the asset expires.
balanceUpdatedAt Date String The date when the balance was last observed to be updated.

Tokens (EXPERIMENTAL)

Tokens may have value represented in multiple currencies. Token assets have all the base fields as well as the following fields.

Required Fields

Field Type Description
value Array<Token Value> Token values in supported currencies.

Optional Fields

Field Type Description
validFrom Date String The date when the asset becomes spendable.
expiresAt Date String The date when the asset expires.

Token Value Object

Field Type Description
currency String Currency code, eg “NZD”.
amount Numeric String Value in the currency’s smallest denomination (ie. cents).