Skip to main content

API Authentication

Our API is secured by API keys, please make sure you don’t share these keys with anyone! They should only be used in a secure server side environment, our API isn't supported for use in the browser, see our Embed SDK instead.

You can find your API key in the integrations section of the merchants admin.


We recommend passing your API key in the Authorization header, like so:

$ curl -X GET https://api.payhere.co/api/v1/user -H "Authorization: Bearer ${api_key_here}"

access_token parameter

If you are wanting to test GET endpoints quickly you can pass your API key as a parameter labelled access_token

GET https://api.payhere.co/api/v1/user?access_token=${api_key_here}