Skip to content

Wallets (1.0.0)

The Wallets API enables you to determine the amount of a given currency belonging to an account. Each account may have multiple wallets, but a wallet belongs to only one account. For example, Alice may have a Wallet in USD, a Wallet in LindenDollars, and a Wallet in SandDollars.

Download OpenAPI description
Languages
Servers
Mock server
https://thunes-tilia-docs.redocly.app/_mock/openapi/prod/wallets/openapi/
Staging
https://wallets.staging.tilia-inc.com/
Production
https://wallets.tilia-inc.com/

webhooks

Webhooks

Get wallet balances

Request

Get wallet balances for the specified account.

Security
tilia_auth
Path
account_idstring(AccountId)<= 36 charactersrequired

The account ID.

Example: acct_2TiDFXHVFMlAuyy7ovvz3YPKv9b
Query
currencystring

The currency to filter by (e.g. USD).

curl -i -X GET \
  'https://thunes-tilia-docs.redocly.app/_mock/openapi/prod/wallets/openapi/balances/acct_2TiDFXHVFMlAuyy7ovvz3YPKv9b?currency=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Balances response

Bodyapplication/json
payloadobject(BalancesResponse)

BalancesResponse used to show state of all wallets

codesArray of strings

Array of codes if failure

Example: null
messageArray of strings

Array of error messages if failure

Example: null
statusstring

Success or Failure

Example: "Success"
Response
application/json
{ "payload": { "account_id": "acct_2TiDFXHVFMlAuyy7ovvz3YPKv9b", "balances": {} }, "codes": null, "message": null, "status": "Success" }

Get wallet by ID

Request

Get wallet for the specified wallet id. For Wallet Payment Methods (i.e. payment methods with provider='wallet'), the payment_method.psp_reference=wallet.wallet_id.

Security
tilia_auth
Path
wallet_idstring(WalletId)<= 36 charactersrequired

The wallet ID.

Example: wal_2V2cKKqYoaj018K0EXBauwcurbd
curl -i -X GET \
  https://thunes-tilia-docs.redocly.app/_mock/openapi/prod/wallets/openapi/v2/wallet/wal_2V2cKKqYoaj018K0EXBauwcurbd \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Wallet by id response

Bodyapplication/json
statusstring

Success or Failure

Example: "Success"
messageArray of strings

Array of error messages if failure

Example: null
codesArray of strings

Array of codes if failure

Example: null
payloadobject(Wallet)

Wallet model return used to represent state of wallet

Response
application/json
{ "status": "Success", "message": null, "codes": null, "payload": { "wallet_id": "wal_2V2cKKqYoaj018K0EXBauwcurbd", "account_id": "acct_2TiDFXHVFMlAuyy7ovvz3YPKv9b", "description": "USD Wallet", "currency": "USD", "current_balance": 100, "active": 1, "tags": [] } }

Get wallets by account

Request

Get list of wallets for the specified account.

Security
tilia_auth
Path
account_idstring(AccountId)<= 36 charactersrequired

The account ID.

Example: acct_2TiDFXHVFMlAuyy7ovvz3YPKv9b
curl -i -X GET \
  https://thunes-tilia-docs.redocly.app/_mock/openapi/prod/wallets/openapi/v2/account/acct_2TiDFXHVFMlAuyy7ovvz3YPKv9b/wallets \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Wallets by account response

Bodyapplication/json
statusstring

Success or Failure

Example: "Success"
messageArray of strings

Array of error messages if failure

Example: null
codesArray of strings

Array of codes if failure

Example: null
payloadobject(GetWalletsByAccountIDResponse)

BalancesResponse used to show state of all wallets

Response
application/json
{ "status": "Success", "message": null, "codes": null, "payload": { "count": 1, "wallets": [] } }

Create a custom wallet type

Request

Enables you to create a custom Tilia Wallet to use for nonstandard transaction flows. Reach out to Tilia to define the new wallet type.

NOTE: A wallet created from this endpoint will not have an associated payment method. Hence, the wallet would not be usable for purchase in the Checkout Widget. To enable purchase using this custom wallet, create an associated wallet payment method (as described in the Create a Custom Wallet payment method document in the Payments API reference section).

Security
tilia_auth
Bodyapplication/jsonrequired

Request for creating a custom wallet for an account

account_idstring<= 36 charactersrequired
Example: "acct_2TiDFXHVFMlAuyy7ovvz3YPKv9b"
wallet_typestringrequired

The name of the wallet type. This value must match the value configured by Tilia in your account's settings.

Example: "publisher_hosted"
tagsArray of arrays

List of tags to attach to the wallet.

Example: ["coin:TOK"]
curl -i -X POST \
  https://thunes-tilia-docs.redocly.app/_mock/openapi/prod/wallets/openapi/v2/wallet/custom \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "account_id": "acct_2TiDFXHVFMlAuyy7ovvz3YPKv9b",
    "wallet_type": "publisher_hosted",
    "tags": [
      "coin:TOK"
    ]
  }'

Responses

Response for the create a custom Wallet request

Bodyapplication/json
statusstring

Success or Failure

Example: "Success"
messageArray of strings

Array of error messages if failure

Example: null
codesArray of strings

Array of codes if failure

Example: null
payloadobject(CreateCustomWalletResponse)

Response payload with a created custom wallet ID.

Response
application/json
{ "status": "Success", "message": null, "codes": null, "payload": { "wallet_id": "wal_2V2cKKqYoaj018K0EXBauwcurbd", "account_id": "acct_2TiDFXHVFMlAuyy7ovvz3YPKv9b", "description": "USD Wallet", "currency": "USD", "current_balance": 100, "active": 1, "tags": [] } }