Quickstart

Get from zero to your first authorized swipe in 60 seconds.

Sandbox is free

Everything below works against SOREN_MODE=sandbox without issuing or banking partner credentials. Live mode flips on when your provider keys arrive.

1. Create an account

Sign up at sorenpay.com/signup. Pick Business to get a workspace with KYB onboarding, scoped cards, and AI agent registration.

2. Grab your API key

After onboarding, head to Developers → API keys and create a key with * scope for testing.

Treat as secret

The apk_… token is shown once at creation. Store it somewhere your runtime can read (a secret manager or environment variable).

3. Make your first call

Get the treasury snapshotbash
curl https://api.sorenpay.com/api/treasury \
-H "authorization: Bearer apk_<your key>"

Expected response:

{
"snapshot": {
  "fiatUsdCents": 0,
  "stablecoinUsdCents": 0,
  "totalUsdCents": 0,
  "monthSpendUsdCents": 0
},
"ledger": []
}

4. Mint a virtual card

Mint a scoped agent cardbash
curl -X POST https://api.sorenpay.com/api/cards \
-H "authorization: Bearer apk_<your key>" \
-H "content-type: application/json" \
-H "idempotency-key: $(uuidgen)" \
-d '{
  "holderKind": "agent",
  "holderLabel": "claude-runtime-prod",
  "monthlyLimitUsdCents": 50000,
  "perTxnLimitUsdCents": 5000,
  "allowedMccs": ["7372"],
  "allowedMerchants": ["openai", "anthropic"]
}'

Returns the card row with reapCardToken, last4, and the scoped policy. In live mode you'd also pass a cardholderId from POST /api/cardholders.

5. Simulate a swipe

Trigger the auth engine with a sandbox webhook:

Simulate a card authorizationbash
curl -X POST https://api.sorenpay.com/api/webhooks/reap-authorization \
-H "content-type: application/json" \
-H "reap-signature: <hmac-of-body>" \
-d '{
  "cardToken": "<reapCardToken from step 4>",
  "merchant": { "name": "OpenAI", "mcc": "7372" },
  "amount": { "currency": "USD", "cents": 1500 }
}'

Response shows the decision + reason + ms budget:

{
"decision": "APPROVE",
"reason": "ok",
"evaluatedMs": 38
}

What's next