Fees

Start a fee payment

Starts a fee payment through the school's own payment provider and returns the checkout link.

POSThttps://api.klasstack.com/v1/payments

  • fees:write
  • Billable
  • Test key: example response

Authorizations

  • Authorizationstringheaderrequired

    Your secret key as a bearer token, in the form Bearer ks_live_sk_... or Bearer ks_test_sk_.... Keep it on your server. A test key gets the documented example and touches no school data.

Headers

  • idempotency-keystringheader

    A key of your own that makes this write safe to retry: the same key returns the first response instead of writing again.

Body

application/json

  • amountinteger

  • sessionIdinteger

  • studentIdinteger

  • callbackUrlstring

  • paymentMethodIdinteger

Response

200, application/json

  • dataobjectrequired

    Show child attributes
    • transactionReferencestringrequired

    • statusstringrequired

    • amountnumberrequired

      Major units of the school currency (naira for NGN), not kobo.

    • currencystringrequired

    • authorizationUrlstring or nullrequired

      The provider's hosted checkout (the payment link). Null once paid.

    • paidbooleanrequired

  • metaobjectrequired

    Show child attributes
    • request_idstringrequired

      Also returned in the X-Request-ID header.

    • paginationobject

      Show child attributes
      • limitintegerrequired

        Required range: x <= 100

      • has_morebooleanrequired

      • next_cursorstring or nullrequired

        Send this back as cursor for the next page. Opaque: never parse it.

Errors

What each code means, and what to do about it, is in the errors guide.

Webhook events

This call can trigger payment.succeeded. See the webhooks guide for the payload and how to verify it.