Skip to content

API

TRYSA PAY API.

Two endpoints are live today: start a payment and verify it. Nothing else is public yet.

Base URL

https://trysa.app/api/v1

Keys

Create keys in your workspace under Developers. Publishable keys (trysa_pk_…) can only start a payment and are safe in a browser. Secret keys (trysa_sk_…) must stay on your server; they are rejected if sent from a browser. Test and live keys are separate.

Start a payment

curl https://trysa.app/api/v1/payments/initialize \
  -H "Authorization: Bearer $TRYSA_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount": 500000, "currency": "NGN", "email": "client@example.com"}'

amount is in the smallest currency unit (kobo for NGN). The response includes reference and checkout_url. Send the customer to checkout_url. Starting a payment does not mean it succeeded.

Verify a payment

curl https://trysa.app/api/v1/payments/verify/REFERENCE \
  -H "Authorization: Bearer $TRYSA_SECRET_KEY"

Secret key only. Treat this result, not the browser redirect, as the source of truth.

Errors

Errors return { "status": "error", "code": "…", "message": "…" }. Requests are rate limited; a 429 means wait and retry.

Clients, bookings, invoices and messages endpoints are not available yet. Questions about the API: api@trysa.app.