---
name: else-payments
description: Buy budgeted cards and gifts, or prepare direct USDC and x402 payments for your own Solana wallet to sign.
homepage: https://elsepay.co
---

# Else agent payments

Operate for the human or business that authorized this agent. Use only its assigned key, product permissions and spending limits. Read https://elsepay.co/docs and https://elsepay.co/openapi.json for the exact contract. API origin: https://elsepay.co/v1.

## Setup

Else does not require customer KYC or identity-document uploads. The owner connects a Solana wallet at https://elsepay.co/app, funds their Else balance, and creates an agent under Agents. The owner sets the total budget, rolling daily limit, per-order limit, allowed products and key expiry. Budgets include provider and Else fees. Rewards, cashback and referral bonuses are inactive and do not fund purchases.

An agent uses its scoped `ELSE_API_KEY`. Never ask for a wallet seed, private key or provider credentials. Never use the owner's CLI session in an autonomous agent job. Owner CLI sessions can create and revoke agents and approve purchases, and expire after 24 hours. They cannot withdraw funds.

CLI installation requires Node.js 20 or later:

```bash
npm install -g https://elsepay.co/cli/elsepay-cli-1.1.0.tgz
elsepay --help
```

The owner can run `elsepay auth login` and approve the displayed code in their signed-in console. A device code expires after ten minutes. Do not approve a code the owner did not initiate. Owner-created agent keys are stored in an owner-only local CLI config and can be selected with `--agent NAME`. Server overrides never receive another origin's saved credentials.

## Purchase loop

1. Read `GET /me` to check your assigned policy. The owner must fund their shared balance separately.
2. For a US card, quote `POST /quotes` with `{"kind":"agent_card","amount":"10.00","currency":"USD"}`. For international, use `international_card`, whole USD amounts from 100.00 to 1,000.00. US cards support USD face values from 5.00 to 1,000.00. Merchant and product restrictions apply.
3. For gifts, search `GET /catalog/gifts?country=US&q=Amazon`. Use a returned product ID, country, currency and allowed denomination. Quote `{"kind":"gift_card","product_id":"RETURNED_ID","country":"US","currency":"USD","amount":"25.00"}`. A gift card is for its stated brand and region.
4. Display monetary amounts with exactly two decimal places. Keep the full API precision for calculations, limit checks and purchase requests. Read the quote's full `total_usdc`, fee breakdown and `expires_at`. Quotes expire after two minutes. The total must fit every assigned limit. A quote does not move funds.
5. Submit `POST /orders` with `{"quote_id":"RETURNED_QUOTE_ID"}` and an `Idempotency-Key` header: one unique 8-120 character key per intended purchase. Retain that key and the returned order ID. The same key can only refer to the same quote.
6. Inspect `order.state`. `awaiting_approval` reserves funds and waits for the owner to approve that exact quote before expiry. The owner can approve or reject it in the console or CLI. Expired or rejected approvals release the reservation.
7. Poll `GET /orders/ORDER_ID?refresh=true` for card delivery. An accepted request or pending order is not a ready card. International cards can take up to 24 hours. Only ready delivery should be treated as usable.
8. If your key has `secrets:read` and the principal authorized access, call `POST /orders/ORDER_ID/reveal` with `{}`. Keep card numbers, CVV, billing details and gift codes out of ordinary logs, public messages, analytics and unnecessary model transcripts.

CLI equivalents: `cards quote`, `gifts search`, `gifts quote`, `orders create`, `orders get --refresh`, and `orders reveal --reveal`. Add `--json` for machine output. Explicit reveal commands output secrets; other commands redact them. `--wait` only polls reads for up to two minutes. CLI exit 0 means command success, 2 an error, 3 still pending; always inspect the order state.

## Recovery and limits

- On a timeout, unreadable response or ambiguous failure, do not start another purchase. Recover the original using `GET /requests/IDEMPOTENCY_KEY` or `elsepay orders recover KEY --json`. The CLI records its request ID before sending a purchase.
- Never split a purchase to bypass an owner, daily, per-order or provider limit. Ask the owner to decide what to change.
- `review` means an operator must reconcile the payment. It is not permission to retry. Failed delivery and provider refunds do not automatically mean spendable funds have returned.
- Respect HTTP 429 and Retry-After. Device polling is at most once every five seconds. Authentication and secret reads must not be bypassed.
- Revoking a key stops new API requests. It does not erase card details already revealed or stop an already accepted provider payment. Else does not claim issuer merchant locks or card freezing.
- Agents cannot create other agents, raise their own limits, approve their own purchases or withdraw owner funds.

## Other features

Direct wallet payments are independent of Laso and the Else checkout ledger. Read https://elsepay.co/payments/openapi.json and https://elsepay.co/docs#wallet. API base: https://elsepay.co/payments/v1. No Else key is needed. The API only prepares unsigned transactions or reads public chain data. Else never signs or broadcasts. Use only a wallet/signing policy explicitly authorized by your principal.

- `elsepay wallet balance --address "$WALLET" --json` reads the main associated native USDC account.
- `elsepay wallet prepare --from "$WALLET" --to "$RECIPIENT" --amount 10.00 --json` returns an unsigned transfer, expiry, exact mint/amount/recipient, network fee and token-account rent. Verify every field and instruction using your trusted signer before signing and broadcasting.
- `elsepay wallet request --address "$WALLET" --amount 10.00 --json` creates a shareable payment link, not proof of receipt.
- `elsepay wallet status "$SIGNATURE" --json` checks an existing transaction. Unknown or pending does not establish failure. Never send a replacement because confirmation is delayed.
- `elsepay x402 prepare --from "$WALLET" --service "$URL" --recipient "$MERCHANT" --max 1.00 --challenge challenge.json --json` prepares a v2 exact native USDC payment on Solana mainnet. Obtain the original public challenge without payment or credentials. Pin the service URL, recipient and cap. Only one payee, version 0, an existing recipient USDC account and a separate fee sponsor are supported.
- For x402, partially sign the returned transaction with your trusted wallet, replace `paymentPayload.payload.transaction` with the base64 signed bytes, then base64-encode the complete envelope as `PAYMENT-SIGNATURE`. Send it once to the same HTTPS GET resource. The service sponsor completes signing and settlement. Do not broadcast the partial transaction yourself.
- Never forward Else keys, owner sessions or wallet secrets to an external service. Never automatically retry a signed x402 authorization after an ambiguous result. A service response is not on-chain settlement proof.

Else card/gift agent budgets DO NOT apply to external wallet payments. Enforce the principal's wallet permissions, spending caps, recipient allowlist and approval rules at the signer. Do not use wallet payments to evade any purchase limit. Direct transfers and x402 payments are public on Solana. Umbra privacy operations remain a separate wallet flow.

Umbra is the wallet-controlled privacy layer for encrypted balances and private transfers. Checkout funding remains a finalized public USDC receipt. Payout availability is separate from cards and gifts. Do not infer PayPal or Venmo availability from this skill.
