Skip to main content

Accounts

An account represents a wallet on the Provenance blockchain. A program is responsible for creating their customer/end user accounts.

There are 2 main uses of accounts:

  • Accounts associated with Profiles (users and business you create). These accounts are akin to a deposit account.
  • Accounts used to manage business/accounting functions for your program.

All completed accounts are FDIC insured via Figure Pay bank partners.

Transactions are ledgered per-account.

Create an account for a program

Create an account and associate it with a program. The new program account will be associated with the current program, which is determined through authentication. There can be one primary account for a program, but can be multiple non-primary accounts.

Program account requests allow the option of explicitly including a unique id for idempotency.

POST /programs/accounts

{
"id": "4ec32db7-72a6-4f2e-a1ee-d5d8aeaa8bfc",
"name": "Funding Account",
"is_primary": true
}

Response:

{
"id": "4ec32db7-72a6-4f2e-a1ee-d5d8aeaa8bfc",
"blockchain_address": "tp180pfr6g45upsrta04l2xd8v08x9jntljgx0gpo",
"balance_coins": 0,
"balance_usd": 0,
"account_number": "100012347",
"routing_number": "000123456788",
"program_id": "8f9ff701-3f78-4f1f-8168-385854c6fd2a",
"name": "Funding Account",
"status": "OPEN"
}

Create an account for a profile

Create an account and associate it with a profile created on behalf of your end-users.

Account requests allow the option of explicitly including a unique id for idempotency.

An account cannot be created unless the associated profile is in the APPROVED state and has been KYC/AML verified.

POST /profiles/:profile_id/accounts

{
"id": "be285151-9160-482a-9c8d-a29fc072086a",
"name": "Account 1"
}

Response:

{
"id": "be285151-9160-482a-9c8d-a29fc072086a",
"blockchain_address": "tp180pfr6g45upsrta04l2xd8v08x9jntljgx0gzu",
"balance_coins": 0,
"balance_usd": 0,
"account_number": "100012345",
"routing_number": "000123456789",
"program_id": "8f9ff701-3f78-4f1f-8168-385854c6fd2a",
"name": "Account 1",
"status": "OPEN"
}

Retrieve an account

Fetch account information for a profile including the account ID, blockchain address, balance, ACH account and routing numbers, and the program ID.

GET /profiles/:profile_id/accounts/:account_id

Response:

{
"id": "be285151-9160-482a-9c8d-a29fc072086a",
"blockchain_address": "tp180pfr6g45upsrta04l2xd8v08x9jntljgx0gzu",
"balance_coins": 25000,
"balance_usd": 250,
"account_number": "100012345",
"routing_number": "000123456789",
"program_id": "8f9ff701-3f78-4f1f-8168-385854c6fd2a",
"name": "Account 1",
"status": "OPEN"
}

Retrieve all accounts for a given profile

Fetch the accounts for a requested profile. Returns a list of each account's information, which includes the account ID, blockchain address, balance, ACH account and routing numbers, and the program ID.

GET /profiles/:profile_id/accounts

Response:

{
[
{
"id": "be285151-9160-482a-9c8d-a29fc072086a",
"blockchain_address": "tp180pfr6g45upsrta04l2xd8v08x9jntljgx0gzu",
"balance_coins": 25000,
"balance_usd": 250,
"account_number": "100012345",
"routing_number": "000123456789",
"program_id": "8f9ff701-3f78-4f1f-8168-385854c6fd2a",
"name": "Account 1",
"status": "OPEN"
},
{
"id": "aaf4bbd8-c3df-4da3-931c-2f3e4f76e0ff",
"blockchain_address": "ew180pfr6g45upsrta04l2xd8v08x9jntljgx0gba",
"balance_coins": 25000,
"balance_usd": 250,
"account_number": "100012346",
"routing_number": "000123456790",
"program_id": "8f9ff701-3f78-4f1f-8168-385854c6fd2a",
"name": "Account 2",
"status": "OPEN"
}
]
}

Retrieve account transactions

As noted above, transactions are ledgered per-account.

This response will be paginated.

GET /profiles/:profile_id/accounts/:account_id/transactions \
--data-urlencode "types=CARD, CREDIT, FEE, INBOUND, INCENTIVE, INTRA, LOAN_PAYMENT, OUTBOUND, REWARD, SYSTEM" \
--data-urlencode "starting_at=2022-01-06" \
--data-urlencode "ending_before=2022-01-08" \
--data-urlencode "next_cursor=2022-01-07T15:52:23.442264-05:00" \
--data-urlencode "limit=100" \

{
"data": [
{
"id": "aaf4bbd8-c3df-4da3-931c-2f3e4f76e0ff",
"from_account_d": "e3ff8564-d8aa-447f-8b80-ffb3f93192b1",
"to_account_id": "a944c0e1-e560-4e49-9bef-7fdb0e7551f4",
"amount_coins": 7500,
"note": "Descriptive message associated with the transaction",
"status": "COMPLETE",
"type": "INTRA",
"created_dt": "2022-01-07T15:52:23.442264-05:00"
},
{
"id": "aaf4bbd8-c3df-4da3-931c-2f3e4f76e0ff",
"from_account_d": "e3ff8564-d8aa-447f-8b80-ffb3f93192b1",
"to_account_id": "99f98415-9adf-4747-b997-5631bae0e8c0",
"amount_coins": 2500,
"note": "Descriptive message associated with the transaction",
"status": "COMPLETE",
"type": "INTRA",
"created_dt": "2022-01-07T15:52:23.442264-05:00"
}
],
"limit": 2,
"next_cursor": "2022-01-07T15:52:23.442376-05:00"
}

Retrieve account cards

Fetch the cards for a requested account. Returns a list of each cards's information, which includes the account ID, expiration, last four digits, and status.

GET /profiles/:profile_id/accounts/:account_id/cards

[
{
"account_id": "0cbd4f31-20fb-4d3c-ad9e-103254b89268",
"created_dt": "2022-01-02T03:04:05.123456-05:00",
"expiration": "2024-11-31",
"id": "v-401-0cbd4f31-20fb-4d3c-ad9e-103254b89268",
"pan_last_four": "1234",
"status": "ACTIVE",
"updated_dt": "2022-01-02T03:04:05.123457-05:00"
},
{
"account_id": "8eadaeb3-19bf-47cc-844c-46474d901637",
"created_dt": "2022-01-02T03:04:05.123456-05:00",
"expiration": "2026-07-12",
"id": "v-401-4f016e58-ba5f-4a54-b727-85cdda1fd61e",
"pan_last_four": "7261",
"status": "ACTIVE",
"updated_dt": "2022-01-02T03:04:05.123457-05:00"
}
]