A Wallet is an Asset that represents Money API . The Wallet maintains a record of all transactions it has participated in. A Wallet has a single balance and a single currency.
A Settlement Wallet is a special type of Wallet that can only receive or refund money related to a Payment Request API . This means you cannot topup, withdraw, or send money from this Wallet.
Attributes
Attributes
/api/wallets
This endpoint allows you to create a Wallet.
Attributes
-
accountId
-
ledgerId
-
settlement
Errors
-
ACCOUNT_MAX_WALLETS_REACHED
Request
curl -X POST \
https://service.centrapay.com/api/wallets \
-H 'content-type: application/json' \
-H 'x-api-key: <TOKEN>' \
-d '
{
"accountId": "Te2uDM7xhDLWGVJU3nzwnh",
"ledgerId": "centrapay.nzd.main",
"settlement": "true"
}
'
Response
{
"id": "WRhAxxWpTKb5U7pXyxQjjY",
"accountId": "Te2uDM7xhDLWGVJU3nzwnh",
"category": "money",
"type": "centrapay.nzd.main",
"liveness": "main",
"description": "NZD",
"createdAt": "2021-01-01T00:00:00.000Z",
"status": "active",
"currency": "NZD",
"balance": "0",
"availableBalance": "6000",
"settlement": true
}
Request
curl -X GET \
https://service.centrapay.com/api/wallets \
-H 'x-api-key: <TOKEN>'
Response
[
{
"id": "WRhAxxWpTKb5U7pXyxQjjY",
"accountId": "Te2uDM7xhDLWGVJU3nzwnh",
"ledgerId": "centrapay.nzd.main",
"currency": "NZD",
"balance": "2000",
"availableBalance": "6000"
},
{
"id": "NQ1yeromwnWPD2hY41L2yS",
"accountId": "Te2uDM7xhDLWGVJU3nzwnh",
"ledgerId": "centrapay.nzd.test",
"currency": "NZD",
"balance": "20",
"availableBalance": "6000"
}
]
/api/wallets/{walletId}/transactions
This endpoint allows you to list Wallet Transactions.
Request
curl -X GET \
https://service.centrapay.com/api/wallets/WRhAxxWpTKb5U7pXyxQjjY/transactions \
-H 'x-api-key: <TOKEN>'
Response
{
"items": [
{
"activityNumber": "1",
"amount": "5000",
"value": "5000",
"createdAt": "2020-06-17T18:00:23.000Z",
"srcParty": "12-4000-100001-00",
"destWalletId": "EBVSreNmpsE2Pazw3SipXC",
"topupId": "77hqHDzw6KaaG2P2hoshUB"
}
]
}