> For the complete documentation index, see [llms.txt](https://debitllama.gitbook.io/debitllama/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://debitllama.gitbook.io/debitllama/account-creation-and-checkout-flow.md).

# Account Creation and Checkout flow

A combination of different cryptography schemes is used to create account abstractions

### Account Creation

When creating and account, Alice needs to compute a secret that will be used to control the account.\
The secret is used to compute a commitment which is a poseidon hash of the secret.

The secret is then either stored inside the MCP server or encrypted  with metamask's encryption key.\
\
When the smart contract is called to create the account, the encrypted secret is saved along with the commitment.

### Checkout flow

When Alice navigates to the checkout page first she needs to log in.

Subscription payment intents can be created using Agent's checkout method or manually on the checkout page

The secret is used to compute a zkProof using a commitment-reveal scheme and it contains the parameters of the subscription which are immutable.\
The zero-knowledge proof is passed to the server where it's stored for future processing.<br>

The proof is picked up by the relayer who will submit the transaction on-behalf of alice to call the smart contract and relay the payments to the merchant, Bob.

### Subscription Flow

The subscription only requires the ZKSnark and will be automatically completed, no more interaction required from the users as long as the wallet balance covers the payments.

The merchants must run intent solvers to complete the transactions as each merchant processes the payment for themselves.&#x20;
