Skip to main content
A payment session is the direct way to pay when you already know the merchant, the items, and the total. You create the session, the owner enters their card in Prava’s secure page, and you receive one-time credentials to complete the checkout. Use this flow when you found the product. If you want Prava to help discover the product too, see Agentic shopping instead.
The agent must be linked first. If it isn’t, session commands exit with Agent not linked. Run: prava setup --name "<name>".

prava sessions create

Each --product is a JSON object:
For multiple units of the same item, set "quantity"; don’t repeat --product or bake counts into the description. The total must reconcile with the line items.
On success:
Give the Payment URL to the owner. They open it and enter their card in Prava’s secure page; the card details never pass through the agent.

prava sessions poll

Wait for the card to be entered and tokenized (exchanged for one-time credentials that stand in for the real card):
While waiting it prints dots; once the owner completes card entry:
poll waits up to 10 minutes for the owner to enter the card; that’s the CLI’s card-entry window. The underlying session expires 15 minutes after creation; once it does, create a new session.

What you receive

These credentials are single-use and expire quickly. Complete the checkout immediately after polling; don’t cache, log, or reuse them. If they expire, create a new session.

Exit codes

Session commands use exit codes so an agent can branch reliably:

Common outcomes

Next: use the token to complete a checkout, or drive the merchant’s checkout directly with the returned credentials.