Palbase Auth API · API
/auth/transactionsCreate a transaction to approve
Creates a pending transaction for the signed-in user and returns the challenge the user's device must sign to approve it (POST /auth/transactions/{id}/approve). The challenge binds the amount and payee, and expires after 5 minutes. amount is a plain decimal — digits, optionally a point and at most 4 digits, at most 16 digits before the point, no sign or exponent; anything else answers 400 invalid_amount. The amount is stored, signed and answered in one canonical form with exactly 4 fraction digits (29.99 becomes 29.9900), here and on every read. exempt is informational: it reports whether the transaction would qualify for a strong-authentication exemption; approval is still required.
Called by a signed-in user of your app, with their token and the publishable key.
Headers
Idempotency-Keystring · optionalMakes the create safe to send again: a repeat with the same key and the same request gets the first answer back (marked `Idempotent-Replayed: true`) instead of a second record. Kept for 24 hours; at most 255 characters.Request body
amountstring · requiredDecimal amount, e.g. `29.99`: digits, optionally a point and at most 4 digits; at most 16 digits before the point.currencystring · requiredCurrency code, e.g. `EUR`.payee_idstring · optionalAt most 255 bytes.payee_namestring · optionalAt most 255 bytes. Stored encrypted.curl -X POST "https://<your-ref>.palbase.studio/auth/transactions" \
-H "apikey: $PALBASE_PUBLISHABLE_KEY" \
-H "authorization: Bearer $USER_ACCESS_TOKEN" \
-H "content-type: application/json" \
-d '{"amount":"string","currency":"string"}'Responses
201Transaction created
400Validation failed or required field missing
401Missing, invalid, or expired credentials
409Conflict with current resource state (duplicate, race)
413The request carries an Idempotency-Key and its body is larger than 1 MiB (`request_too_large`).
422The Idempotency-Key was already used with a different request (`idempotency_key_reused`).
503Downstream dependency unavailable (typically HIBP / breach service)
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation CreateTransaction of auth's contract.