This endpoint returns accounts by commitment for the access token owner. The endpoints also serve as a way to refresh cached balance. The backend will query the blockchain and update the account
Commitment
The commitment is a Poseidon hash stored on-chain as Bytes32 inside the smart contracts and serves as an identifier for accounts and it's used for the zero-knowledge proofs, we prove we know the preimage of this hash when verifying proofs, among other things.
The commitment is used by the server as an account identifier and lets you query the account by substituting it to the [commitment] parameter.
To query the blockchain manually, you find information in the smart contract here.
Available Methods: GET
The following URL will return you the account by commitment.
It will also refresh account balances if there is a difference between the on-chain balance and the cached balance
When Relaying a transaction fails due to Account Balance Too Low, the on-chain account balances must be topped up first and then refreshed to resume the payments.
The balances are automatically refreshed using the front-end and can be done through this API endpoint also.
Updating Account balances only works for authenticated users! Users can only refresh their own account's balances.
Pagination
The endpoint will return all the payment intents created with this Account which can be used with the pagination API. The URL to paginate the results is same as explained before and will paginate Payment intents
all_payment_intents - You find all the payment intents created with this account paginated inside this object
all_payment_intents.pagination - The pagination object is used as described before in the Schema
all_payment_intents.data - An array of payment intents created with this account
missing_payments - Payment intents with the status_text ACCOUNTBALANCETOOLOW are fetched separately. These payments are delayed as the account failed to make payments in time.
Filtering
The filter query parameter lets you filter payment intents using these keys, to filter payment intents , check out the /api/v1/payment_intents page !